1 |
#!/bin/bash |
2 |
# |
3 |
# $Header$ |
4 |
# $Name$ |
5 |
# |
6 |
# These are the build options used with the Intel 9.x compiler for |
7 |
# testing on Beagle. |
8 |
# |
9 |
# Please note that the appropriate module commands: |
10 |
# |
11 |
# module add intel/9.1.051 |
12 |
# module add mpich-mx/1.2.7..1/intel/9.1.051 |
13 |
# |
14 |
# will add /home/ibm/util/mpich-mx-1.2.7..1/icc/9.1.051/lib, |
15 |
# /opt/intel/cce/9.1.051/lib and /opt/intel/fce/9.1.051/lib |
16 |
# to LD_LIBRARY_PATH which is needed by any executables generated |
17 |
# with this optfile. |
18 |
# The SGE -V option for exporting environment variables may also be |
19 |
# helpful if you encounter missing-library problems. Or, |
20 |
# alternatively, one may choose to link with one of the intel |
21 |
# "-static" or "-i-static" flags. |
22 |
|
23 |
|
24 |
mpichhome=/home/ibm/util/mpich-mx-1.2.7..1/icc/9.1.051 |
25 |
#netcdfhome=/home/software/netcdf/netcdf-3.6.2/intel-9.1.051 |
26 |
netcdfhome=/home/ibm/util/netcdf-3.6.2 |
27 |
|
28 |
|
29 |
FC='mpif77' |
30 |
CC='mpicc' |
31 |
F90C='mpif90 -fixed -c ' |
32 |
LINK='mpif77' |
33 |
INCLUDES="-I$mpichhome/include -I$netcdfhome/include" |
34 |
LIBS="-L$mpichhome/lib -L$netcdfhome/lib" |
35 |
|
36 |
|
37 |
# -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic) |
38 |
DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DIFORT' |
39 |
CPP='cpp -traditional -P' |
40 |
|
41 |
NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_ke.F' |
42 |
|
43 |
if test "x$IEEE" = x ; then |
44 |
# No need for IEEE-754 |
45 |
NOOPTFLAGS='-O2' |
46 |
FOPTIM='-O3 -align' |
47 |
# ifort options: |
48 |
# -132 fixed-form line length is 132 characters |
49 |
# -r8 REAL is REAL*8 |
50 |
# -i4 INTEGER is INTEGER*4 |
51 |
# -w95 don't warn about use of Fortran 95 extensions |
52 |
# -W0 disable all warning messages |
53 |
# -WB turns a compile-time bounds check error into a warning |
54 |
# -xT optimize for Intel Core2 and Xeon 51xx |
55 |
# -fno-alias don't assume aliasing (assume that different variables DON'T refer to the same memory location) |
56 |
# -assume byterecl record length in OPEN statements is in bytes |
57 |
# -convert big_endian binary files contain big-endian data |
58 |
FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian' |
59 |
# FFLAGS='-132 -O3 -xT -fPIC -ipo -fno-alias' |
60 |
else |
61 |
# Try to follow IEEE-754 |
62 |
NOOPTFLAGS='-O0' |
63 |
# -CB check bounds |
64 |
# FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS' |
65 |
FOPTIM='-O0 -noalign' |
66 |
# -pc64 round floating point values to 64 bits |
67 |
# one could also try |
68 |
# -mp maintain precision |
69 |
FFLAGS='-pc64 -132 -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian' |
70 |
# FFLAGS='-132 -O3 -xT -fPIC -ipo -fno-alias' |
71 |
# FLAGS='-mp -132 -r8 -i4 -w95 -W0 -WB -assume byterecl -convert big_endian' |
72 |
fi |
73 |
F90FLAGS=$FFLAGS |
74 |
F90OPTIM=$FOPTIM |
75 |
|
76 |
NOOPTFILES=$NOOPTFILES' mitcplr_char2real.F mitcplr_real2char.F' |
77 |
NOOPTFILES=$NOOPTFILES' mitcplr_char2int.F mitcplr_int2char.F mds_byteswap.F' |