I’m still searching for a way to parallelize my code; Cuda and OpenACC both had issues, so I’m looking at OpenMP (running version 13.2 of PGI Fortran on Windows 7). But the Universe isn’t making it easy on me.
If I compile my code with the following command
pgfortran -o code.exe -mp -Minfo=mp code.f90
then the code crashes before it gets to the parallel region. In fact, it crashes during variable initialization for a called subroutine (inlining doesn’t change this). If I run the code in PGI’s debugger, I get the following error message:
Signalled ACCESS_VIOLATION at 0x1400E4E4C, function _builtin_stinit
Which points me to the following line of assembly code (if this even matters):
50 pushq %rax
- If I leave off the OpenMP tags everything works fine.
- I can remove all code associated with OpenMP, including the !$omp lines themselves, and still get this behavior if I compile with the -mp flag.
- I still get this error even after I’ve increased my stack size to 512MB using the (DOS) command “set OMP_STACKSIZE=512M”.
What’s going on here?
Edit: Is this even the right forum for this question? Should I have posted in “Programming and Compiling”?