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-variables-using-init-compiler-flag) I get a segmentation fault when allocating a 'large' array (2GB) in size.
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.
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.
>> 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).