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

Laurence Marks L-marks at northwestern.edu
Mon Mar 2 21:20:42 CET 2009


I saw something like this, and cured (?) it by removing the -f when
dstart was called. Does your fix work if you change the loops around
to the fast method (your loop is very slow in terms of memory access):

 do j = 1, min2
 do i = 1 , min1
!      do j = 1 , min2
          hilfsfeld(i,j)=tf(i,j)
      end do
   end do

On Mon, Mar 2, 2009 at 1:32 PM, Oleg Rubel
<oleg.rubel at physik.uni-marburg.de> wrote:
> Dear Wien2k Users and Developers,
>
> I have got a segmentation fault error in DSTART while attempting to initialize a surface structure. I use WIEN2k_08.3 (Release 18/9/2008) compiled with Intel Fortran (version 11.0) using the following options:
> FOPT     = -FR -mp1 -w -prec_div -pc80 -pad -align -DINTEL_VML -traceback
> FGEN     =
> LDFLAGS  = $(FOPT) -L/act/intel/mkl/10.1.0.015/lib/em64t -i-static
>
> The segfault takes place at 'module.f' in  'module reallocate' in line
>
>    hilfsfeld(1:min1,1:min2)=tf(1:min1,1:min2)
>
> I was able to fix the error by changing to an old fashion
>
>    integer*4 :: i, j
>    ...
>    do i = 1 , min1
>       do j = 1 , min2
>           hilfsfeld(i,j)=tf(i,j)
>       end do
>    end do
>
> for all instances 'hilfsfeld(1:min1,1:min2)=tf(1:min1,1:min2)' and 'hilfsfeld(1:min1)=tf(1:min1)' in module.f
>
> It is interesting that the error shows up only for relatively large cases. (In my case min2 = 2507459).
>
>
> Sincerely,
>
> Oleg Rubel
>
> --
> Oleg Rubel, PhD
> Thunder Bay Regional Research Institute
> 290 Munro St
> Thunder Bay, ON
> P7A  7T1, Canada
> Phone: +1-807-7663350
> E-mail: rubelo at tbh.net
> 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