1 |
dimitri |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
|
|
# $Header: $ |
4 |
|
|
# $Name: $ |
5 |
|
|
|
6 |
|
|
# Used for serial and mpi compilation on discover at NCCS with: |
7 |
|
|
# module load comp/intel-13.1.2.183 other/mpi/mvapich2-1.8.1/intel-13.1.2.183 |
8 |
|
|
|
9 |
|
|
if test "x$MPI" = xtrue ; then |
10 |
|
|
FC=mpif90 |
11 |
|
|
CC=mpicc |
12 |
|
|
else |
13 |
|
|
FC=ifort |
14 |
|
|
CC=icc |
15 |
|
|
fi |
16 |
|
|
|
17 |
|
|
DEFINES='-DWORDLENGTH=4' |
18 |
|
|
CPP='/lib/cpp -traditional -P' |
19 |
|
|
EXTENDED_SRC_FLAG='-132' |
20 |
|
|
OMPFLAG='-openmp' |
21 |
|
|
CFLAGS='-fPIC' |
22 |
|
|
LDADD='-shared-intel' |
23 |
|
|
|
24 |
|
|
LIBS='-L/usr/local/other/SLES11.1/mvapich2/1.8.1/intel-13.1.2.183/lib' |
25 |
|
|
INCLUDES='-I/usr/local/other/SLES11.1/mvapich2/1.8.1/intel-13.1.2.183/include' |
26 |
|
|
INCLUDEDIRS='/usr/local/other/SLES11.1/mvapich2/1.8.1/intel-13.1.2.183/include' |
27 |
|
|
#- used for parallel (MPI) DIVA |
28 |
|
|
MPIINCLUDEDIR='/usr/local/other/SLES11.1/mvapich2/1.8.1/intel-13.1.2.183/include' |
29 |
|
|
#MPI_HEADER_FILES='mpif.h mpiof.h mpif_parameters.h' |
30 |
|
|
|
31 |
|
|
NOOPTFLAGS='-O0 -fPIC' |
32 |
|
|
|
33 |
|
|
if test "x$IEEE" = x ; then |
34 |
|
|
# No need for IEEE-754 |
35 |
|
|
FFLAGS="$FFLAGS -fPIC -W0 -WB -convert big_endian -assume byterecl -align" |
36 |
|
|
FOPTIM='-O2 -ip -fp-model precise -axSSSE4.2,SSSE3 -traceback -ftz' |
37 |
|
|
NOOPTFILES='seaice_growth.F calc_oce_mxlayer.F fizhi_lsm.F fizhi_clockstuff.F' |
38 |
|
|
else |
39 |
|
|
# Try to follow IEEE-754 |
40 |
|
|
FFLAGS="$FFLAGS -fPIC -w95 -W0 -WB -convert big_endian -assume byterecl -noalign" |
41 |
|
|
FOPTIM='-O0' |
42 |
|
|
fi |
43 |
|
|
#- might want to use '-r8' for fizhi pkg: |
44 |
|
|
#FFLAGS="$FFLAGS -r8" |
45 |
|
|
|
46 |
|
|
#- For really big executable (> 2 GB), uncomment following 2 lines |
47 |
|
|
#FFLAGS="$FFLAGS -mcmodel=medium -shared-intel" |
48 |
|
|
#CFLAGS="$CFLAGS -mcmodel=medium -shared-intel" |