OS-dependent pre-processor directives in mpp modules


There is a section of OS-dependent preprocessor directives at the top of each file. If you are using this code on a non-SGI/Cray machine, you may need to modify these. In particular, please see the following sections:

!machines that support Cray pointers
#if defined(SGICRAY) || defined(__alpha)
#define use_CRI_pointers
#endif

!values of kind: double and long are 8-byte, float and int are 4-byte
#if defined(SGICRAY)
#define DOUBLE_KIND 8
#define FLOAT_KIND 4
#define LONG_KIND 8
#define INT_KIND 4
#else
!these might be different on non-SGICRAY, I believe
#define DOUBLE_KIND 8
#define FLOAT_KIND 4
#define LONG_KIND 8
#define INT_KIND 4
#endif

If your machine/compiler supports Cray pointers, you should add an identifier turning on the preprocessor flag -Duse_CRI_pointers. Cray pointers are widely available on non-SGI/Cray f90 compilers as well.

Also, I have recently become aware that the f90 standard does not specify what the actual integer value of KIND for 8-byte and 4-byte real and integer variables should be. If your compiler uses values other than 8 and 4, please add that information here.

Some compilers destined for 32-bit address machines do not support 8-byte integers at all. In that case, LONG_KIND will need to be redefined to be the same as INT_KIND.

Contact me, Balaji, SGI/GFDL, if needed. In particular, any modifications to these directives that you can propose (as shown here for DEC Alpha) are welcome.


Document last modified