Questions when using pgf90 on AMD64

Questions when using pgf90 on AMD64
1.when I compile the FORTRAN source code in 32-bit, the variables are all initialized to zero by default. This is what I want. But when I compile the FORTRAN source code in 64-bit, then the variables cannot be initialized by default. Are there some switches to force the compiler to initialize the variable, or some tools to help me find which variable was used before initialized? This is important to me, because some old software running correctly in 32-bit when the variables are not initialized by hand. If find which variable was used before initialized by hand when porting 32-bit to 64-bit, it will be loaded down with trivial details.

2.why pgf90 do not support the data type real*16? If so, what is superiority of 64-bit?

Compiler: pgf90 v.5.2
OS: Turbo Linux 2.4.21-4smp 64 bit
Hardware: Opteron 2.4G



  1. There is not a magic switch to do this for you. The closest to a magic switch is -Msave, but I have a feeling that won’t help you since -Msave says to treat each variable as if it had the save attribute. Still, for simple examples, they will be initialized to zero the first time they are used. As a safer alternative, you could put your variables into a common block or a module and they will be initialized to zero.

  2. pgf90 currently does not support real*16. The superiority of 64-bit comes from the fact that 64-bit allows use of the medium memory model and large arrays. So, your program’s data can be larger than 2GB. 64-bits also allow more machine instructions, registers and a larger word length, so programs will usually run faster on 64-bits than 32-bits. However, there are some exceptions (see the article on the medium memory model in this forum for example).

I hope this helps,


REAL*16 would require support for 128-bit floating point arithmetic. Since neither AMD64 nor EM64T support native 128-bit floating point, this would all have to be done in library routines, which would be unacceptably slow.

You can use the save statement or attribute in a routine to initialize certain variables to zero too. However, keep in mind that when you introduce initialization through -Msave or a save statement, you are introducing additional overhead for the initialization. So, use these tools wisely. :)