old 32 bit code won't run after compiling on 64 bit?


I have an older 32 bit program (not mine code) that runs really slow on my 32 bit single processor machine. So, naturally I wanted to see how fast it would be on my new 64 bit, dual processor. So, I compiled, with no options and with -Mconcur.

I did get the following error, but the .out was created.
PGF90-W-0129-Floating point overflow.

when I run the program launches, and I am asked for an input file. Then it crashes with a ‘Fortran Stop’ error.

I take it going from 32 to 64 may not be as simple as just recomiling?


Hi Buddy,

When you have a Fortran only program, moving to 64-bits should be straight forward. First, are you sure your program is crashing or is it just exiting? A ‘Fortran Stop’ message just means that you program exited at a ‘stop’ statement.

The Floating point overflow warning is a bit of a concern. This means that your using a constant real number that is too big for use in a specific context. For example, if your assigning a number bigger than 2Gb to a variable declared REAL*4. Since constants have the default kind of 4, it can even happen if you use a very large constant without changing its kind (i.e. append with an ‘_8’). Have you modified your program to use larger constants or are you compiling with “-r8”? The warning should print the line number, can you post this line?

What I’d do, is take a step back and compile your program in 64-bits with “-g”. If it still stops after you enter the input file, run again using pgdbg (the PGI debugger), and step through the code to better understand why it’s stopping. Once it works at “-g”, begin adding optimizations. Start with “-fastsse” and then compile with “-fastsse -Mconcur”, “-fastsse -Mconcur=innermost”, and “-fastsse -Mconcur=noaltcode”. Be sure to note the run times of each of the 4 flag sets to determine which option is best for your code.

Hope this helps,