[Insight-developers] Infinite loops
Luis Ibanez
ibanez@cs.unc.edu
Mon, 23 Apr 2001 10:27:31 -0400
Daniel,
I don't have access right now to a Linux machine, so
I'm trying to identify the problem directly from the
code and the outputs on the dashboard. However, something
seems to be wrong among the outputs reported on the dashboard:
When you killed the tests, where they still printing output ?
This is for this morning for
itkImageToImageTranslationMeanSquaresGradientDescent
Iterations Answer(should be -7,-3) Final Message
Irix: 200 -6.99351 -2.99616 Test passed
Intel C++ 200 -6.99351 -2.99616 Test Passed
Linux 2.4.0 GetValue() messages are present (as expected)
200 -6.99351 -2.99616 Test Passed
But... a segmentation violation is reported at the end.
Linux 2.2.14 the GetValue() messages are missing(!), the number of
iterations
is not being printed, the reported solution is
-7.15854 -3.00822
and a segmentation violation is reported.
This definitely looks like an older version of the test.
It seems that the update from the repository have some
problem... (?)
SunOS 5.7 Very similar to Linux 2.2.14. Messages added recently are
missing.
The reported output is:
-7.1584 -3.00822
and a segmentation violation is reported.
The tests are explicitly limited to 200 iterations, they shouldn't be
going in infinite loops. One possible source of error is that inside
the Mapper we are using exceptions to report when a point is outside
the range of the target image, the number of these exceptions can be
quite large (as high as the number of pixels in the image), and it is
not clear how each compiler manage this high flow of exceptions. I'd
notice that in VC++ the debuger is overloaded a cause of the high number
of exceptions. My guess is that the gcc compiler expects exceptions to
be an not so common event (this code could be throwing about 2000 of the
in each iterations). In that case we should replace the code:
try {
value = mapper.GetValue( point );
}
catch()
{
value = 0;
}
for a "contract" style code with a preconditions like:
if( mapper.IsPointInside( point ) )
{
value = mapper.GetValue();
}
else
{
value = 0;
}
I'll remove those test until I can try them on a Linux machine.
Thanks
Luis
-------------------------------------------
"Daniel J. Blezek, Ph.D." wrote:
>
> Luis,
>
> When I came in this morning, I killed these jobs which had been running
> since Saturday morning. Do you have access to a Linux machine to do some
> testing? Oddly enough, it only seems to be affecting my RedHat 6.2
> machine, not the RedHat 7.0 machine. Could be a compiler difference.
>
> -dan
>
> >
> > "Blezek, Daniel J (CRD)" wrote:
> > >
> > > Hi all,
> > >
> > > I've had to regularly kill the following tests on Linux
> > >
> > > ./itkImageToImageTranslationNormalizedCorrelationGradientDescentRegistrationTest
> > > ./itkImageToImageTranslationMeanSquaresRegularStepGradientDescentRegistrationTest
> > >
> > > Any ideas where the code may be having a problem?
> > >
> > > -dan
> > >