- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- 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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change one or both of the constants to 8-byte integer
allocate(x(66893_8 * 8192_8))
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if that does not work then try
ulimit -m unlimited (in addition to -s)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> 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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page