1 |
#!/bin/bash |
2 |
# |
3 |
# $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_ifort+mpi_ice_nas,v 1.21 2017/07/10 18:43:04 dimitri Exp $ |
4 |
# $Name: $ |
5 |
|
6 |
# Used to run the testreport on pleiades with: |
7 |
# module load comp-intel/2016.2.181 mpi-sgi/mpt.2.14r19 hdf4/4.2.12 hdf5/1.8.18_mpt netcdf/4.4.1.1_mpt |
8 |
# works on all types of nodes |
9 |
|
10 |
FC=ifort |
11 |
CC=icc |
12 |
|
13 |
CPP='/lib/cpp -traditional -P' |
14 |
DEFINES='-DALLOW_USE_MPI -DWORDLENGTH=4 -DINTEL_COMMITQQ' |
15 |
F90FIXEDFORMAT='-fixed -Tf' |
16 |
EXTENDED_SRC_FLAG='-132' |
17 |
GET_FC_VERSION="--version" |
18 |
OMPFLAG='-openmp' |
19 |
|
20 |
#NOOPTFLAGS='-O1 -fp-model precise' |
21 |
NOOPTFLAGS='-O0' |
22 |
NOOPTFILES='' |
23 |
|
24 |
CFLAGS='-O0' |
25 |
FFLAGS="$FFLAGS -convert big_endian -assume byterecl" |
26 |
|
27 |
#- for big setups, compile & link with "-fPIC" or set memory-model to "medium": |
28 |
CFLAGS="$CFLAGS -fPIC" |
29 |
FFLAGS="$FFLAGS -fPIC" |
30 |
#- For really big executable (> 2 GB), uncomment following 2 lines |
31 |
#FFLAGS="$FFLAGS -mcmodel=medium -shared-intel" |
32 |
#CFLAGS="$CFLAGS -mcmodel=medium -shared-intel" |
33 |
#- might want to use '-r8' for fizhi pkg: |
34 |
#FFLAGS="$FFLAGS -r8" |
35 |
|
36 |
LDADD='-shared-intel' |
37 |
|
38 |
FFLAGS="$FFLAGS -W0 -WB" |
39 |
if test "x$IEEE" = x ; then #- with optimisation: |
40 |
FOPTIM='-O2 -ipo -fp-model precise -align -axCORE-AVX2 -xSSE4.2 -traceback -ftz' |
41 |
NOOPTFILES='seaice_growth.F calc_oce_mxlayer.F fizhi_lsm.F fizhi_clockstuff.F ini_parms.F' |
42 |
else |
43 |
if test "x$DEVEL" = x ; then #- no optimisation + IEEE : |
44 |
FOPTIM='-O0 -noalign' |
45 |
else #- development/check options: |
46 |
#FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict" |
47 |
FOPTIM="-O0 -noalign -g -traceback" |
48 |
NOOPTFLAGS=$FOPTIM |
49 |
NOOPTFILES='adread_adwrite.F mdsio_rw_field.F mdsio_rw_slice.F' |
50 |
FOPTIM="$FOPTIM -warn all -warn nounused" |
51 |
FOPTIM="$FOPTIM -fpe0 -ftz -fp-stack-check -check all -ftrapuv" |
52 |
fi |
53 |
fi |
54 |
|
55 |
F90FLAGS=$FFLAGS |
56 |
F90OPTIM=$FOPTIM |
57 |
|
58 |
LIBS='-L/nasa/sgi/mpt/2.14r19/lib -lmpi -L/nasa/netcdf/4.4.1.1_mpt/lib -lnetcdf' |
59 |
INCLUDES='-I/nasa/sgi/mpt/2.14r19/include -I/nasa/netcdf/4.4.1.1_mpt/include' |
60 |
#INCLUDEDIRS='/nasa/sgi/mpt/2.14r19/include' |
61 |
|
62 |
#- used for parallel (MPI) DIVA |
63 |
MPIINCLUDEDIR='/nasa/sgi/mpt/2.14r19/include' |
64 |
#MPI_HEADER_FILES='mpif.h mpiof.h' |