7 |
# first version tested on Fedore Core 3 x86-64 Opteron (Linux batsi) |
# first version tested on Fedore Core 3 x86-64 Opteron (Linux batsi) |
8 |
# updated and tested on acesgrid (Fedora Core 15), using: |
# updated and tested on acesgrid (Fedora Core 15), using: |
9 |
# module load ekopath (Version 4.0.10) |
# module load ekopath (Version 4.0.10) |
10 |
# |
# Also tested with MPI on acesgrid, using: |
11 |
|
# module load ekopath (Version 4.0.10) |
12 |
|
# and with mpich1: |
13 |
|
# module load mvapich |
14 |
|
# or with mpich2: |
15 |
|
# module load mvapich2 |
16 |
|
# or with openmpi: |
17 |
|
# module load openmpi |
18 |
|
|
19 |
#------- |
#------- |
20 |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
21 |
# and generally, needs to increase the thread stack-size: |
# and generally, needs to increase the thread stack-size: |
27 |
# > setenv PSC_OMP_STACK_SIZE 400m |
# > setenv PSC_OMP_STACK_SIZE 400m |
28 |
#------- |
#------- |
29 |
|
|
30 |
CC=pathcc |
if test "x$MPI" = xtrue ; then |
31 |
FC=pathf90 |
CC=mpicc |
32 |
LINK=pathf90 |
FC=mpif90 |
33 |
|
LINK=mpif90 |
34 |
|
else |
35 |
|
CC=pathcc |
36 |
|
FC=pathf90 |
37 |
|
LINK=pathf90 |
38 |
|
fi |
39 |
|
|
40 |
DEFINES='-DWORDLENGTH=4' |
DEFINES='-DWORDLENGTH=4' |
41 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
42 |
EXTENDED_SRC_FLAG='-extend-source' |
EXTENDED_SRC_FLAG='-extend-source' |
43 |
GET_FC_VERSION="-v" |
GET_FC_VERSION="--version" |
44 |
OMPFLAG='-openmp' |
OMPFLAG='-openmp' |
45 |
#OMPFLAG='-openmp -OPT:early_mp=ON' |
#OMPFLAG='-openmp -OPT:early_mp=ON' |
46 |
|
|
56 |
#FOPTIM='-Ofast -LNO:fusion=2 -funsafe-math-optimizations' |
#FOPTIM='-Ofast -LNO:fusion=2 -funsafe-math-optimizations' |
57 |
#- high optimisation (-O3), might find Pb with few S/R; fully safe: switch to -O2: |
#- high optimisation (-O3), might find Pb with few S/R; fully safe: switch to -O2: |
58 |
FOPTIM='-O3 -LNO:fusion=2 -funsafe-math-optimizations' |
FOPTIM='-O3 -LNO:fusion=2 -funsafe-math-optimizations' |
59 |
|
NOOPTFILES="$NOOPTFILES mon_set_iounit.F" |
60 |
else |
else |
61 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
62 |
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math' |
71 |
CFLAGS='-O0 -m64 -fPIC' |
CFLAGS='-O0 -m64 -fPIC' |
72 |
GSLLIB='-lgsl -lgslcblas' |
GSLLIB='-lgsl -lgslcblas' |
73 |
|
|
74 |
|
INCLUDEDIRS='' |
75 |
|
INCLUDES='' |
76 |
|
LIBS='' |
77 |
|
|
78 |
if [ "x$NETCDF_ROOT" != x ] ; then |
if [ "x$NETCDF_ROOT" != x ] ; then |
79 |
INCLUDEDIR="${NETCDF_ROOT}/include" |
INCLUDEDIR="${NETCDF_ROOT}/include" |
80 |
INCLUDES="-I${NETCDF_ROOT}/include" |
INCLUDES="-I${NETCDF_ROOT}/include" |
110 |
LIBS='-L/usr/local/lib64' |
LIBS='-L/usr/local/lib64' |
111 |
fi |
fi |
112 |
|
|
113 |
|
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
114 |
|
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
115 |
|
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
116 |
|
MPIINCLUDEDIR="$MPI_INC_DIR" |
117 |
|
MPI_HEADER_FILES='mpif.h mpiof.h' |
118 |
|
MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' |
119 |
|
fi |