Well, I got side tracked for a bit on a non-convergence issue which has been a thorn in my side for the past couple of months. Part of the aortic tracking algorithm was varying between runs by a degree small enough for the overall result to relatively consistent but large enough to cause downstream problems. I have gone through the major portions of the algorithm with a fine tooth comb and nothing seemed to stop the result from varying. After almost a week of meticulous debugging of each individual line of code to isolate the portion that was causing the problem, I found that the root cause of the error was not necessarily the code itself, but rather the interaction between the code and the run time driver which determines how the GPU code is executed. Specifically, during the very first step of the algorithm, the modified gradient algorithm is applied to the data. For some reason, this otherwise straight forward code was producing slightly different results with sequential runs. I actually narrowed it down to 1 line of code which, if removed, would stop the variability all together. Interestingly, the drift did not show up in every scan. As best I can determine, the root cause of the problem is that the memory access pattern for that portion of the code is pretty rough and so there must be some issue that arises there. At any rate, now that it is "fixed", I can get back to sorting the paths traced out by the iliac tracking algorithm.
The next issue is that in the process of debugging the code, I uncovered numerous small issues which were contributing to the overall issues. Now I have to go back and piece it all back together to make sure that nothing got broken in the process. Specifically, I had to go through and clean up how the statistical data and results are stored. The aortic tracking algorithm is running much more smoothly now that the code has been streamlined.
No comments:
Post a Comment