1 |
jmc |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
# $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_ifort+authors,v 1.3 2011/08/12 23:09:08 jmc Exp $ |
4 |
|
|
# $Name: $ |
5 |
|
|
|
6 |
|
|
# Build options for the intel 9.0 fortran compiler |
7 |
|
|
# ph: use ifort compiler options -convert big_endian -assume byterecl |
8 |
|
|
|
9 |
|
|
# tested on faulks (FC.6) |
10 |
|
|
# was also tested on hugo (FC.4, FC.9), eddy (FC.5) |
11 |
|
|
|
12 |
|
|
# OpenMP : Tested on hugo, eddy and faulks |
13 |
|
|
#------- |
14 |
|
|
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
15 |
|
|
# and generally, needs to increase the stack-size: |
16 |
|
|
# - sh,bash: |
17 |
|
|
# > export OMP_NUM_THREADS=2 |
18 |
|
|
# > export KMP_STACKSIZE=400m |
19 |
|
|
# - csh,tcsh: |
20 |
|
|
# > setenv OMP_NUM_THREADS 2 |
21 |
|
|
# > setenv KMP_STACKSIZE 400m |
22 |
|
|
#------- |
23 |
|
|
|
24 |
|
|
FC=/usr/local/pkg/intel/intel_fc_90/bin/ifort |
25 |
|
|
F90C=$FC |
26 |
|
|
LINK="$FC -i-static -no-ipo" |
27 |
|
|
|
28 |
|
|
DEFINES='-DWORDLENGTH=4' |
29 |
|
|
CPP='cpp -traditional -P' |
30 |
|
|
F90FIXEDFORMAT='-fixed -Tf' |
31 |
|
|
EXTENDED_SRC_FLAG='-132' |
32 |
|
|
GET_FC_VERSION="--version" |
33 |
|
|
OMPFLAG='-openmp' |
34 |
|
|
|
35 |
|
|
INCLUDES='-I/usr/local/pkg/netcdf/netcdf-3.5.1/include' |
36 |
|
|
|
37 |
|
|
# Note that the -mp switch is for ieee "maintain precision" and is |
38 |
|
|
# roughly equivalent to -ieee |
39 |
|
|
if test "x$IEEE" = x ; then |
40 |
|
|
FOPTIM='-O3 -align' |
41 |
|
|
#P3 FOPTIM=$FOPTIM' -tpp6 -xWKM' |
42 |
|
|
#P4 FOPTIM=$FOPTIM' -tpp7 -xWKM' |
43 |
|
|
FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl" |
44 |
|
|
else |
45 |
|
|
FOPTIM='-O0 -noalign -check all' |
46 |
|
|
FFLAGS="$FFLAGS -w95 -W0 -WB -xN -pc64 -convert big_endian -assume byterecl" |
47 |
|
|
#FFLAGS="$FFLAGS -mp -w95 -W0 -WB" |
48 |
|
|
fi |
49 |
|
|
#- might want to use '-r8' for fizhi pkg: |
50 |
|
|
#FFLAGS="$FFLAGS -r8" |
51 |
|
|
|
52 |
|
|
F90FLAGS=$FFLAGS |
53 |
|
|
F90OPTIM=$FOPTIM |
54 |
|
|
|