2007-12-07

A hang-up under Ubuntu

Today, a hang-up of munimatch under Ubuntu and gfortran compiler has been found during work on processing of globular clusters images. Munimatch hang-ups with the listing on output:

f@filip:/tmp/munipack/munimatch$ mt ref=m5_06R.SRT m5_06V.SRT

Match files : m5_06R.SRT -> m5_06V.SRT

Matrix : 1.0025209128 -0.0000284573
0.0000284573 1.0025209128
Shift : -38.8969865074 18.3495641725
Scale : 0.9975158490

The parent process has been consumed of all CPU time and indicate no progress after a while. Experiments under Gentoo shows equivalent behaviour.

The detailed inspection of source code revealed problem on this line:
do while(.true.)
read(1,'(T7,2F9.3)',end=970,iostat=ii) x,y
i = i + 1
...

The code fails when an error occured (during line read when format is different) and iostat sets error variable to a non-zero value. The replace of the line with equivalent code

read(1,'(A)',end=970,err=970) RADEK1
read(RADEK1,'(T7,2F9.3)',iostat=ii) x,y

corrects of the hung-up problem. The experience shows that the intel ifc compiler, g77 and sun's fortran compilers work without any problems. It may be a bug in gfortran compiler. (Moreover, additional, an index range error has been corrected also.)

Update. The described bug has been corrected. Excellent work! Thank you!

No comments: