Segmentation Fault in Fortran
I can compile and run a program using the absoft compiler f90 with the -s option. This seems to access more memory than is available without the -s option. But when I try the VAST pf90 compiler (with the -s option), I still get a segmentation fault error.
Is there a way to access all of the system memory with the automatic parallelization compiler?
I am on MacPro, running OS X with absoft and CBS fortran compilers. My system has 32 G of RAM. Here is the output from ulimit -H -a :
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) unlimited
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 65532
cpu time (seconds, -t) unlimited
max user processes (-u) 2500
virtual memory (kbytes, -v) unlimited
Any thoughts, ideas, suggestions greatly appreciated.




Segmentation Fault
Hi Chris
Hope this isn't teaching my grandmother to suck eggs ...
but my experience of segmentation faults with Fortran is that they are usually caused by walking off the end of an array or calling a subroutine with the wrong arguments (number, type, dimensions). So, if you are getting segfaults with code from 2 different compilers, that's what I'd look into. Next step should be to compile with array bounds checking switched on. Run again and have a look at the output.
Regards
Mark
Segmentation fault might be linked to stack size
Assuming that -check all and -warn all do not produce any warnings/error messages there is the possibility that your stack size is to small (i.e. not unlimited). I previously had problems with the stack size not being set to unlimited on linux systems and fortran code allocating a lot of memory. The following link is a discussion about the increased usage of stack causing segmentation faults when using intel compilers.
http://software.intel.com/en-us/articles/intel-fortran-compiler-increased-stack-usage-of-80-or-higher-compilers-causes-segmentation-fault/