Predefined Macro

Hello.

Is there any predefined macro of PGI Fortran Compiler?

Also, is there any macro for different OS?

I did this test it works on my mac

$ cat prog.F90
program test


#ifdef __PGI
#ifdef __APPLE__
 print*, 'hello'
#endif
#endif

end program test

$ pgfortran prog.F90 ; ./a.out
 hello

Here is how I find the macros defined.

pgfortran -c -dryrun x.f ! x.f need not exist

From the output dialog, you will see

-def unix -def __unix -def unix -def LITTLE_ENDIAN -def inline= -def osx86 -def __osx86 -def osx86 -def APPLE -def LP64 -def x86_64 -def _M_IX86 -def __NO_MATH_INLINES -def amd64 -def __PGI_STRPTIME -def extension= -def SSE -def MMX -def SSE2 -def SSE3 -def SSSE3 -def PGI_6XC -def PGI_XC_VER=60302

which is most of them.


dave