1 |
ce107 |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
jmc |
1.4 |
# $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ppc64_xlf,v 1.3 2010/03/21 22:22:53 jmc Exp $ |
4 |
jmc |
1.3 |
# $Name: $ |
5 |
ce107 |
1.1 |
|
6 |
|
|
# tested on frost, ce107 Aug 4 2005 |
7 |
|
|
# using the following invocation: |
8 |
jmc |
1.4 |
# ../../../tools/genmake2 -of=../../../tools/build_options/linux_ppc64_xlf |
9 |
|
|
# or with OpenMP: |
10 |
|
|
# ../../../tools/genmake2 -of=../../../tools/build_options/linux_ppc64_xlf -omp |
11 |
ce107 |
1.1 |
|
12 |
jmc |
1.4 |
# Tested on Big Red, ce107 Aug 30 2007, need to set NETCDF_ROOT to: |
13 |
|
|
# > export NETCDF_ROOT='/N/soft/linux-sles9-ppc64/netcdf-3.6.1-ibm-64' |
14 |
|
|
# and at NCAR (on frost ?), need to set NETCDF_ROOT to: |
15 |
|
|
# > export NETCDF_ROOT='/contrib/fe_tools/xlc64/netcdf-3.6.0-p1' |
16 |
|
|
|
17 |
|
|
if test "x$OMP" = xtrue ; then |
18 |
|
|
CC='xlc_r -q64 -qsmp=omp' |
19 |
|
|
FC='xlf_r -q64' |
20 |
|
|
LINK='xlf_r -q64' |
21 |
|
|
else |
22 |
|
|
CC='xlc -q64' |
23 |
|
|
FC='xlf -q64' |
24 |
|
|
LINK='xlf -q64' |
25 |
|
|
fi |
26 |
|
|
|
27 |
|
|
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X" |
28 |
ce107 |
1.1 |
S64='$(TOOLSDIR)/set64bitConst.sh' |
29 |
ce107 |
1.2 |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
30 |
ce107 |
1.1 |
CPP='/lib/cpp -traditional -P' |
31 |
jmc |
1.4 |
OMPFLAG='-qsmp=omp' |
32 |
|
|
|
33 |
|
|
#FFLAGS="$FFLAGS -qfixed=72" |
34 |
|
|
FFLAGS="$FFLAGS -qfixed=132" |
35 |
|
|
|
36 |
ce107 |
1.1 |
if test "x$IEEE" = x ; then |
37 |
|
|
# No need for IEEE-754 |
38 |
jmc |
1.4 |
FOPTIM='-O5 -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1' |
39 |
|
|
FOPTIM="$FOPTIM -qipa=noobject:partition=large:threads" |
40 |
|
|
CFLAGS="-qinlglue $FOPTIM" |
41 |
ce107 |
1.1 |
else |
42 |
jmc |
1.4 |
FOPTIM='-O3 -qstrict -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1' |
43 |
|
|
CFLAGS=$FOPTIM |
44 |
|
|
fi |
45 |
|
|
|
46 |
|
|
INCLUDES='' |
47 |
|
|
LIBS='' |
48 |
|
|
|
49 |
|
|
if [ "x$NETCDF_ROOT" != x ] ; then |
50 |
|
|
INCLUDEDIR="${NETCDF_ROOT}/include" |
51 |
|
|
INCLUDES="-I${NETCDF_ROOT}/include" |
52 |
|
|
LIBDIR="${NETCDF_ROOT}/lib" |
53 |
|
|
LIBS="-L${NETCDF_ROOT}/lib" |
54 |
ce107 |
1.1 |
fi |