00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _H_M3_system
00026 #define _H_M3_system
00027
00028 #include <stdint.h>
00029 #include <math.h>
00030
00031 #ifdef MACH_LONG4
00032 # define f90strlen int32_t
00033 #else
00034 # define f90strlen int64_t
00035 #endif
00036
00037 #ifndef MACH_FILE64
00038 # include <sys/types.h>
00039 # include <sys/stat.h>
00040 # define stat64 stat
00041 # define fseeko64 fseek
00042 #endif
00043
00044 #ifdef MACH_T3E
00045 # define malloc shmalloc
00046 # include <fortran.h>
00047 # define MACH_F77_UPPERCASE
00048 # define charArg(c) _cptofcd(c, 1)
00049 #else
00050 # define charArg(c) c
00051 #endif
00052
00053 #ifndef M3_DISK_BUFFER_SIZE
00054 #define M3_DISK_BUFFER_SIZE 8388608
00055 #endif
00056
00057 #ifndef M3_MPI_BUFFER_SIZE
00058 #define M3_MPI_BUFFER_SIZE 8388608
00059 #endif
00060
00061
00062
00063
00064
00065 #ifdef __STRICT_ANSI__
00066
00067 # define M_E 2.7182818284590452354
00068 # define M_LOG2E 1.4426950408889634074
00069 # define M_LOG10E 0.43429448190325182765
00070 # define M_LN2 0.69314718055994530942
00071 # define M_LN10 2.30258509299404568402
00072 # define M_PI 3.14159265358979323846
00073 # define M_PI_2 1.57079632679489661923
00074 # define M_PI_4 0.78539816339744830962
00075 # define M_1_PI 0.31830988618379067154
00076 # define M_2_PI 0.63661977236758134308
00077 # define M_2_SQRTPI 1.12837916709551257390
00078 # define M_SQRT2 1.41421356237309504880
00079 # define M_SQRT1_2 0.70710678118654752440
00080
00081 typedef char* caddr_t;
00082
00083 struct timezone {
00084 int tz_minuteswest;
00085 int tz_dsttime;
00086 };
00087
00088 #endif
00089
00090 #include "M3_fortran.h"
00091
00092 #endif
00093