Hello,
I have compiled a legacy CFD code using the pgf77/pgcc compilers.
The code has conditional compiler directives that compile either using “Parallel Do” OpenMP (Newly added) or the legacy SGI parallel “C$DO ACROSS” (Previously coded and validated).
The code runs fine on Unix shared memory computers.
However, I get a memory access error when I run the PGI version on my dual Xeon processor Intellistation computer running Windows 2000 Pro with OMP_NUM_THREADS=2 and NCPUS=2. Here are the two error, one from each thread:
The instruction at “0x00587906” referenced memory at"0xfaf9e60c". The memory could not be “written”.
The instruction at “0x00587d88” referenced memory at"0xde93a0e4". The memory could not be “written”.
The funny thing is that when I run the same version of code with OMP_NUM_THREADS=1 and NCPUS=1 the code runs fine. I don’t know if its a problem with my code or with the OpenMP compiler?
I have tried compiling using the older SGI “C$DO ACROSS” syntax that was already coded and which has been well tested on Various computers over time as a check to ensure that maybe I didn’t introduce something with the New OpenMP commands. Both versions crash due to a memory access error when I specify running using 2 processors, but both run fine if I just indicate to use 1 processor. Why does this happen?
Care has been taken to insure that necessary Loop variables and other variables within the parallelized loops have been specified as “PRIVATE”
Do I need to use a special compiler flag for the Xeon processor? Is there some compiler flag I need for OpenMP codes to prevent memory access errors? It there a Windows OpenMP debugger, it seems like the PGI debugger is only for LINUX, or am I mistaken?
Thanks for any solutions that the forum might be able to offer.
-Steven Speer