25 |
# export MPI_GCC_DIR=/srv/software/gcc/gcc-packages/gcc-4.4.5/mpich2/mpich2-1.3 |
# export MPI_GCC_DIR=/srv/software/gcc/gcc-packages/gcc-4.4.5/mpich2/mpich2-1.3 |
26 |
# export MPI_INC_DIR=$MPI_GCC_DIR/include |
# export MPI_INC_DIR=$MPI_GCC_DIR/include |
27 |
# export PATH=$MPI_GCC_DIR/bin:$PATH |
# export PATH=$MPI_GCC_DIR/bin:$PATH |
28 |
|
# |
29 |
|
# and on IRIDIS at Southampton |
30 |
|
# http://www.southampton.ac.uk/isolutions/computing/hpc/iridis/ |
31 |
|
# with |
32 |
|
# module load openmpi/1.4.3/gcc-4.3.3 |
33 |
|
# and |
34 |
|
# export MPI_INC_DIR=$MPIROOT/include |
35 |
|
|
36 |
#------- |
#------- |
37 |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
57 |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
58 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
59 |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
60 |
|
F90FIXEDFORMAT='-ffixed-form' |
61 |
GET_FC_VERSION="--version" |
GET_FC_VERSION="--version" |
62 |
OMPFLAG='-fopenmp' |
OMPFLAG='-fopenmp' |
63 |
|
|
69 |
# for big objects: |
# for big objects: |
70 |
FFLAGS="$FFLAGS -fPIC" |
FFLAGS="$FFLAGS -fPIC" |
71 |
#- might want to use '-fdefault-real-8' for fizhi pkg: |
#- might want to use '-fdefault-real-8' for fizhi pkg: |
72 |
#FFLAGS="$FFLAGS -fdefault-real-8" |
#FFLAGS="$FFLAGS -fdefault-real-8 -fdefault-double-8" |
73 |
|
|
74 |
if test "x$IEEE" = x ; then #- with optimisation: |
if test "x$IEEE" = x ; then #- with optimisation: |
75 |
#- full optimisation |
#- full optimisation |
88 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
89 |
FOPTIM='-O0' |
FOPTIM='-O0' |
90 |
else #- development/check options: |
else #- development/check options: |
91 |
FOPTIM='-O0' |
FOPTIM='-O0 -g -fbounds-check' |
92 |
FOPTIM="$FOPTIM -g -ffpe-trap=invalid,zero,overflow -fbounds-check" |
FOPTIM="$FOPTIM -ffpe-trap=invalid,zero,overflow -finit-real=inf" |
93 |
fi |
fi |
94 |
fi |
fi |
95 |
|
|
134 |
elif test -d /usr/local/include/netcdf.inc ; then |
elif test -d /usr/local/include/netcdf.inc ; then |
135 |
INCLUDES='-I/usr/local/include' |
INCLUDES='-I/usr/local/include' |
136 |
LIBS='-L/usr/local/lib64' |
LIBS='-L/usr/local/lib64' |
137 |
|
elif test -d /usr/include/netcdf.inc ; then |
138 |
|
INCLUDES='-I/usr/include' |
139 |
|
LIBS='-L/usr/lib64' |
140 |
fi |
fi |
141 |
|
|
142 |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
143 |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
144 |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
145 |
|
#- used for parallel (MPI) DIVA |
146 |
MPIINCLUDEDIR="$MPI_INC_DIR" |
MPIINCLUDEDIR="$MPI_INC_DIR" |
147 |
MPI_HEADER_FILES='mpif.h mpiof.h' |
#MPI_HEADER_FILES='mpif.h mpiof.h' |
|
MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' |
|
148 |
fi |
fi |