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_ppc_xlf |
9 |
|
|
# or with OpenMP: |
10 |
|
|
# ../../../tools/genmake2 -of=../../../tools/build_options/linux_ppc_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-32' |
14 |
|
|
|
15 |
|
|
if test "x$OMP" = xtrue ; then |
16 |
|
|
CC='xlc_r -q32 -qsmp=omp' |
17 |
|
|
FC='xlf_r -q32' |
18 |
|
|
LINK='xlf_r -q32' |
19 |
|
|
else |
20 |
|
|
CC='xlc -q32' |
21 |
|
|
FC='xlf -q32' |
22 |
|
|
LINK='xlf -q32' |
23 |
|
|
fi |
24 |
|
|
|
25 |
|
|
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X" |
26 |
ce107 |
1.1 |
S64='$(TOOLSDIR)/set64bitConst.sh' |
27 |
|
|
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
28 |
|
|
CPP='/lib/cpp -traditional -P' |
29 |
jmc |
1.4 |
OMPFLAG='-qsmp=omp' |
30 |
|
|
|
31 |
|
|
#FFLAGS="$FFLAGS -qfixed=72" |
32 |
|
|
FFLAGS="$FFLAGS -qfixed=132" |
33 |
|
|
|
34 |
ce107 |
1.1 |
if test "x$IEEE" = x ; then |
35 |
|
|
# No need for IEEE-754 |
36 |
jmc |
1.4 |
FOPTIM='-O5 -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1' |
37 |
|
|
FOPTIM="$FOPTIM -qipa=noobject:partition=large:threads" |
38 |
|
|
CFLAGS="-qinlglue $FOPTIM" |
39 |
ce107 |
1.1 |
else |
40 |
jmc |
1.4 |
FOPTIM='-O3 -qstrict -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1' |
41 |
|
|
CFLAGS=$FOPTIM |
42 |
|
|
fi |
43 |
|
|
|
44 |
|
|
INCLUDES='' |
45 |
|
|
LIBS='' |
46 |
|
|
|
47 |
|
|
if [ "x$NETCDF_ROOT" != x ] ; then |
48 |
|
|
INCLUDEDIR="${NETCDF_ROOT}/include" |
49 |
|
|
INCLUDES="-I${NETCDF_ROOT}/include" |
50 |
|
|
LIBDIR="${NETCDF_ROOT}/lib" |
51 |
|
|
LIBS="-L${NETCDF_ROOT}/lib" |
52 |
ce107 |
1.1 |
fi |