-init=arrays segmentation fault

-init=arrays segmentation fault

When compiling my code in debug mode, with -init=snan -init=zero -init=arrays (as advised by https://software.intel.com/en-us/articles/checking-for-unitialized-varia...) I get a segmentation fault when allocating a 'large' array (2GB) in size.

  • ulimit -s unlimited before running so that is not the problem
  • ifort (IFORT) 17.0.4 20170411
  • -init=snan -init=zero pose no problem, except when combined with -init=arrays
  • Allocating integer arrays of 5*10^8 elements (~2GB @ 4 bytes per int)
  • 536870912 is the first failing size (2^29 exactly)
  • Problem occurs on new SKL nodes with 192 GB total ram, BDW nodes

Reproduce with:

program test
  integer, dimension(:), allocatable :: x
  allocate(x(66893*8192))
end program test
ifort -O0 -g -traceback -ftrapuv -debug all -debug-parameters -align -warn all -check all,bounds,uninit -init=snan -init=zero -init=arrays -o alloc alloc.f90

 

Does -check uninit catch every use of an uninitialised array element? Because then I might not need -init=arrays at all.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Change one or both of the constants to 8-byte integer

   allocate(x(66893_8 * 8192_8))

Jim Dempsey

if that does not work then try

ulimit -m unlimited   (in addition to -s)

Jim Dempsey

Hi Jim,

The first suggestion does not change the behaviour. I am not allowed to set ulimit -m unlimited (but it is set to 187695104 kbytes = 187 GB which should be high enough.

Daan

 

>> I am not allowed to set ulimit -m unlimited

But you are allowed to set ulimit -s unlimited

This is quite strange (you should advise your system administrator of this oversight).

Jim Dempsey

Leave a Comment

Please sign in to add a comment. Not a member? Join today