[Wien] Fortran 90 bug (?) causes Segmentation fault in DSTART (doreallocate)

Laurence Marks L-marks at northwestern.edu
Tue Mar 3 16:46:51 CET 2009


If the speed is the same, then ifort is probably switching the loop.

This "bug" is also present in lapw2 when the hkl's are generated, and
perhaps in lapw3. I don't think it's a real fortran bug, probably
something in the OS with memory allocation (I have it myself).

On Tue, Mar 3, 2009 at 9:25 AM, Oleg Rubel
<oleg.rubel at physik.uni-marburg.de> wrote:
> Dear All,
>
> thank you very much for the comments and suggestions.
>
> I tried to benchmark Laurence's suggestion
>
>     do j = 1, min2
>         do i = 1 , min1
>         !do j = 1 , min2
>             hilfsfeld(i,j)=tf(i,j)
>         end do
>     end do
>
>     $ x dstart -c
>     DSTART ENDS
>     63.335u 11.743s 1:15.12 99.9%      0+0k 0+0io 0pf+0w
>
> vs
>
>     do i = 1, min1
>         do j = 1 , min2
>             hilfsfeld(i,j)=tf(i,j)
>         end do
>     end do
>
>     $ x dstart -c
>     DSTART ENDS
>     62.678u 11.837s 1:14.59 99.8%      0+0k 0+0io 0pf+0w
>
> It seems that there is no noticeable difference in timing, but thanks anyway.
>
> Gerhard - I did not try full static linking. Switching the
> optimization levels to -O0 does not help with the original code. I
> cannot step down to an older version of the compiler. Regarding size
> of 'tr' and 'hilfsfeld'. It seems that bounds are OK, in the sense
> that 1:min1 and 1:min2 do not go out of the bounds of 'tr' and
> 'hilfsfeld'. Usually size(tr,1)=size(hilfsfeld,1)=3 and
> size(tr,2)=>size(hilfsfeld,2). Just to remind, it works fine for
> smaller size(hilfsfeld,2). It is also not an issue of the memory
> shortage. (16 GB free is more than enough).
>
> So it looks like it is necessary to change the code. Since DSTART is
> not a bottle neck in terms of timing, I would not wary much. Important
> is that it works and probably worth changing in the release version.
>
> Sincerely,
>
> Oleg
>
> --
> Oleg Rubel, Ph.D.
> Thunder Bay Regional Research Institute
> 290 Munro St
> Thunder Bay, Ontario
> P7A 7T1, CANADA
> E-mail: Oleg.Rubel at physik.uni-marburg.de
> Homepage: http://www.staff.uni-marburg.de/~rubel/
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>



-- 
Laurence Marks
Department of Materials Science and Engineering
MSE Rm 2036 Cook Hall
2220 N Campus Drive
Northwestern University
Evanston, IL 60208, USA
Tel: (847) 491-3996 Fax: (847) 491-7820
email: L-marks at northwestern dot edu
Web: www.numis.northwestern.edu
Chair, Commission on Electron Crystallography of IUCR
www.numis.northwestern.edu/
Electron crystallography is the branch of science that uses electron
scattering to study the structure of matter.


More information about the Wien mailing list