I have a trouble in running a PGI compiled Fortran program on Cray XT4. This is an MPI program compiled with PGI 7.1.4, 7.2.2 and 7.2.3. The code has a segmentation fault in a subroutine. Compiled with -O0 and -g, the core dump points to an ENDIF in the subroutine. Around the ENDIF are just simple assigment statements where I can’t find anything wrong.
The subroutine takes in 103 arguments among which around 70 arguments are double precision arrays with 1400 up to 5900 elements each (depending on the number of processes). The total size of argments is a few MB per process so it’s not like a memory overflow. It’s also not like a memory violation as all arguments are well declared.
The code can successfully run if compiled by gcc on the same XT4 machine.
With these observations, I can’t find what causes the segfault. Does anybody have any clue of the possible causes? Is there any possible situation for PGI compiled code to report a segfault? Your ideas are appreciated.