Oasis3 4.0.2
os.h
Go to the documentation of this file.
00001 #ifdef __sgi
00002 #ifdef _COMPILER_VERSION
00003 !the MIPSPro compiler defines _COMPILER_VERSION
00004 #define sgi_mipspro
00005 #else
00006 #define sgi_generic
00007 #endif
00008 #endif
00009 
00010 #if defined(sgi_mipspro)
00011 #define SGICRAY
00012 #define SGICRAY_MPP
00013 #endif
00014 
00015 !most compilers support Cray pointers
00016 !if you find a compiler that does not, #undef this inside a suitable #ifdef
00017 !
00018 ! Remark from Luis Kornblueh:
00019 ! Cray pointer cause problems with 64 bit addressing. Associated integers
00020 !  need to be 64 bit. This is not necessarily the case. The mpp_io package
00021 !  needs to be revised in this respect. use_CRI_pointer is deactivated
00022 !  for the moment. (Reporter: Rene Redler)
00023 !
00024 #undef use_CRI_pointers
00025 
00026 #if defined __NAGf95 || defined __G95__
00027 #undef use_CRI_pointers
00028 #endif
00029 
00030 #ifdef __SX
00031 ! Some elder revision (older than revison 270) of the SX Fortran compiler
00032 ! have only limited Cray pointer support. For these use_CRI_pointers
00033 ! needs to be undefined.
00034 #endif
00035 
00036 #ifdef __SXdbl4
00037 ! When -A dbl4 is used on NEC-SX both 4-byte reals become 8-byte reals.
00038 ! (and 8-byte reals stay 8-byte reals, so they are both the same)
00039     ! by forbidding 4-byte reals, 4-byte cmplx is also forbidden. Also variables
00040     ! declared with a kind parameter are modified. When -A dbl4 shall be used
00041     ! no_4byte_reals needs to be applied in fft.f90.
00042     ! We recommend to use -A idbl4 instead which does not touch variables declared
00043     ! with the KIND parameter. RRedler
00044 #define no_4byte_reals
00045     ! I think by redefining FLOAT_KIND to 8, I no longer need to redefine NF_*
00046     ! but I will ll leave these in for now. Balaji.
00047 #ifndef __PARNETCDF
00048 #define FLOAT_KIND 8
00049 #define NF_GET_VAR_REAL nf_get_var_double
00050 #define NF_GET_VARA_REAL nf_get_vara_double
00051 #define NF_GET_ATT_REAL nf_get_att_double
00052 #else
00053 #define FLOAT_KIND 8
00054 #define NFMPI_GET_VAR_REAL nfmpi_get_var_double
00055 #define NFMPI_GET_VARA_REAL nfmpi_get_vara_double
00056 #define NFMPI_GET_ATT_REAL nfmpi_get_att_double
00057 #endif
00058 #endif
00059 
00060 !Modifications for Oasis - next lines commented and replaced
00061 !values of kind: double and long are 8-byte, float and int are 4-byte
00062 !#if defined(SGICRAY)
00063 !#define DOUBLE_KIND 8
00064 !#define FLOAT_KIND 4
00065 !#define LONG_KIND 8
00066 !#define INT_KIND 4
00067 !#define SHORT_KIND 2
00068 !#define POINTER_KIND 4
00069 !#else
00070 !!these might be different on non-SGICRAY, I believe
00071 !#define DOUBLE_KIND 8
00072 !#define FLOAT_KIND 4
00073 !#define LONG_KIND 8
00074 !#define INT_KIND 4
00075 !#define SHORT_KIND 2
00076 !#define POINTER_KIND 8
00077 !#endif
00078 !
00079 !#ifdef sgi_generic
00080 !!this is for the Edinburgh n32/o32 compiler, which will not accept 8-byte ints at! any price
00081 !#define no_8byte_integers
00082 !#define LONG_KIND 4
00083 !#endif
00084 !
00085 #define DOUBLE_KIND ip_double_mpp 
00086 #define FLOAT_KIND ip_single_mpp
00087 #define LONG_KIND ip_i8_mpp
00088 #define INT_KIND ip_i4_mpp
00089 #define SHORT_KIND ip_i2_mpp
00090 
00091 #ifdef __crayx1
00092 #undef use_CRI_pointers
00093 
00094 #define no_4byte_reals
00095 #define no_4byte_cmplx
00096 #define  __no_8byte_integers
00097 #define NF_GET_VAR_REAL nf_get_var_double
00098 #define NF_GET_VARA_REAL nf_get_vara_double
00099 #define NF_GET_ATT_REAL nf_get_att_double
00100 
00101 !
00102 #define DOUBLE_KIND ip_double_mpp 
00103 #define FLOAT_KIND ip_single_mpp
00104 #define LONG_KIND ip_i8_mpp
00105 #define INT_KIND ip_i4_mpp
00106 #define SHORT_KIND ip_i4_mpp
00107 #endif
 All Data Structures Namespaces Files Functions Variables Defines