segmentation fault with large arrays and openmp
807575Sep 10 2008 — edited Sep 18 2008My questions concerns segmentation faults in Fortran with big arrays and openmp. It is similar to other questions that have been posted at this forum, but I have not found any answer that has helped me.
I used to run Fortran code at work, but I am unable to do so after our hardware and software were updated. The details of the upgrade are the following:
Old hardware Sun Fire v890
New hardware Sun Fire x4600 M2
Old operative system Solaris 10
New operative system Linux CentOS 5.2 (RHEL)
Fortran compiler (then as now) Sun compiler from Sunstudio 10
On the old server, I successfully ran code with small, medium size, and large arrays, in sequence and in parallel mode (using OpenMP). Sometimes, I would encounter segmentation faults on the old server, but I was able to get rid of them by increasing the stacksize with the ulimit S s command.
On the new server, the code with small, medium size, and large arrays can be compiled, and runs well in sequence. When I introduce OpenMP commands, I can execute the code with the small arrays, but I cannot execute the code with medium size and large arrays
The code is EXACTLY the same as the one that worked on the old server.
When I use the debugger, the error message I get is
"Reading ld-linux-x86-64.so.2
Reading libfai.so.1
Reading libfsu.so.1
Reading libmtsk.so.1
Reading libpthread.so.0
Reading libm.so.6
Reading libc.so.6
Reading librt.so.1
Reading libdl.so.2
t@null (l@1) program terminated by signal SEGV (Segmentation fault)
Current function is ny (optimized)
1 SUBROUTINE NY(N,rask,IFLAG,NFEV,nydata,r,lambda,cfschool)"
I have increased the stacksize to unlimited on the new server with the ulimit S -s command. I have also increased the stacksize that is available per thread to unlimited with the command export stacksize=unlimited command. In addition, I have tried fixed values for the stacksize rather than setting it to unlimited. None of this has helped.
After I have increased the stacksize on the new server, the environment settings are:
"core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2101248
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 2101248
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited"
Does anyone know what I can do (short of rewriting all the code) to execute my programs with openmp with large arrays on the new server ?
Lage