I am generating an access violation when the program tries to initialise a variable in a common block
The debugger output is a follows:
pgdbg> Signalled ACCESS_VIOLATION at 0x425353, function recini, file recini.for, line 115
#115: npvt = 0
This is the common block (in total):
INTEGER NPVT, PVTLEN, PVTPOI, LPVT
REAL PVTTAB
COMMON /GASPVT/ NPVT, PVTLEN(MXPVTN), PVTPOI(MXPVTN)
& ,PVTTAB(MXPVTT,3), LPVT
The code is very large, and there are many other common blocks. The program was originally written many years ago and has been running commercially for over 20 years.
I have been unable to duplicate the error by only running the subroutine which carries out the initialisation as a main program - this routine by itself runs correctly.
The program runs correctly (apparently) on Salford, Lahey and Intel compilers and I am trying to port to PGI. I am using Windows XP with 4 GB memory, 32 bit OS. To execute under Intel and Salford, I need to set a large stack space (eg Intel link /stack:50000000 and under Salford slink I use virtual common -vc -stack:64000000)
Do you have any suggestions ?
Andrew