1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# |
3 |
|
# $Header$ |
4 |
|
# $Name$ |
5 |
|
|
6 |
# Adapted from linux_amd64_ifort_generic_mpi |
# Adapted from linux_amd64_ifort_generic_mpi |
7 |
# with specific local path (=MPI_INC_DIR & NETCDF_ROOT ) for MPI & NetCDF |
# with specific local path (=MPI_INC_DIR & NETCDF_ROOT ) for MPI & NetCDF |
8 |
# Tested on jmc's laptop (FC.8), with MPI & Multi-Threaded (OpenMP) |
# Tested on jmc's laptop with MPI & Multi-Threaded |
9 |
# using ifort v.10.1.012 & mpich-1.2.7 (installed in /opt/intel/) |
# using intel compiler v.10.1.012 & mpich-1.2.7 (FC.8) |
10 |
|
# v.11.1.046 & mpich-1.2.7 (FC.11) |
11 |
|
# (intel compiler, mpich & netcdf installed in /opt/intel/ ) |
12 |
|
|
13 |
#------- |
#------- |
14 |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
43 |
|
|
44 |
NETCDF_ROOT='/opt/intel/netcdf-3.6.2' |
NETCDF_ROOT='/opt/intel/netcdf-3.6.2' |
45 |
MPI_INC_DIR='/opt/intel/mpich-1.2.7p1_ic-10.1.012/include' |
MPI_INC_DIR='/opt/intel/mpich-1.2.7p1_ic-10.1.012/include' |
46 |
|
#NETCDF_ROOT='/opt/intel/netcdf-4.0.1/11.1' |
47 |
|
#MPI_INC_DIR='/opt/intel/mpich-1.2.7p1_ic-11.1.046/include' |
48 |
|
|
49 |
FC=mpif77 |
FC=mpif77 |
50 |
F90C='mpif90 -fixed' |
F90C='mpif90 -fixed' |
76 |
FOPTIM='-O2 -align -xW -ip' |
FOPTIM='-O2 -align -xW -ip' |
77 |
else |
else |
78 |
# Try to follow IEEE-754 |
# Try to follow IEEE-754 |
79 |
FOPTIM='-O0 -align -xW -ip -fp-model strict' |
FOPTIM='-O0 -xW -ip -fp-model strict' |
80 |
# for automatic testing with testreport (but no relation with IEEE arithmetic): |
# for automatic testing with testreport (but no relation with IEEE arithmetic): |
81 |
FOPTIM="$FOPTIM -g -noalign -fp-stack-check -check all -fpe0 -traceback -ftrapuv" |
FOPTIM="$FOPTIM -fpe0 -ftz -fp-stack-check -check all -ftrapuv" |
82 |
|
FOPTIM="$FOPTIM -noalign -g -traceback" |
83 |
fi |
fi |
84 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
85 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
120 |
LIBS='-L/usr/local/lib64' |
LIBS='-L/usr/local/lib64' |
121 |
fi |
fi |
122 |
|
|
|
|
|
123 |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
124 |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
125 |
MPIINCLUDEDIR="$MPI_INC_DIR" |
MPIINCLUDEDIR="$MPI_INC_DIR" |