1 |
mlosch |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
mlosch |
1.9 |
# $Header: /u/gcmpack/MITgcm/tools/build_options/SUPER-UX_SX-8_sxf90_awi,v 1.8 2015/03/02 07:57:13 mlosch Exp $ |
4 |
jmc |
1.4 |
# $Name: $ |
5 |
|
|
|
6 |
mlosch |
1.1 |
# for cross compiling on sx8.awi.de |
7 |
jmc |
1.4 |
# uname -a: |
8 |
mlosch |
1.1 |
# Linux sx8 2.6.5-7.282-default #1 SMP Tue Aug 29 10:40:40 UTC 2006 ia64 ia64 ia64 GNU/Linux# |
9 |
|
|
|
10 |
mlosch |
1.8 |
CC='sxcc -sx8r' |
11 |
jmc |
1.5 |
if test "x$MPI" = xtrue ; then |
12 |
|
|
FC='sxmpif90' |
13 |
|
|
LINK='sxmpif90' |
14 |
|
|
#LINK='sxmpif90 -p' # with profiler |
15 |
|
|
else |
16 |
|
|
FC='sxf90' |
17 |
|
|
LINK='sxf90' |
18 |
|
|
fi |
19 |
|
|
|
20 |
|
|
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _" |
21 |
mlosch |
1.1 |
# nec use |
22 |
mlosch |
1.7 |
DEFINES='-DTARGET_NEC_SX -DWORDLENGTH=1 -DHAVE_CLOC -UHAVE_SIGREG -DSEAICE_VECTORIZE_LSR -DSEAICE_VECTORIZE_LSR_ZEBRA -DCG2D_OUTERLOOPITERS=10 -DCG3D_OUTERLOOPITERS=10' |
23 |
mlosch |
1.1 |
CPP='/lib/cpp -traditional -P' |
24 |
jmc |
1.5 |
RMFILES='*.L' |
25 |
mlosch |
1.1 |
|
26 |
|
|
FFLAGS='-Pstack -sx8r' |
27 |
jmc |
1.4 |
# automatic inlining for routines < 50 lines (default) and in the same file |
28 |
mlosch |
1.1 |
# where they are to be inlined (we do not have too many of those) |
29 |
|
|
FFLAGS=$FFLAGS' -pi' |
30 |
jmc |
1.5 |
|
31 |
jmc |
1.4 |
# This is how you inline external routines if they are longer than 50 lines |
32 |
|
|
# and live in a separate file (the actual routines depend on the packages |
33 |
|
|
# used, therefore there are only a few examples here); unfortunately, these |
34 |
|
|
# flags break the genmake2 tests, so they get an extra flag variable that |
35 |
mlosch |
1.2 |
# is not tested in genmake2 |
36 |
mlosch |
1.8 |
FEXTRAFLAGS='-pi auto fullmsg exp=barrier,ucase,timestep_tracer,ilnblnk,ifnblnk,cycle_tracer,pressure_for_eos,sw_temp,sw_ptmp,gsw_pt_from_ct rexp=fool_the_compiler,fool_the_compiler_r8,bar2,sw_adtg,gsw_ct_from_pt,gsw_gibbs_pt0_pt0 expin=barrier.f,timestep_tracer.f,fool_the_compiler.f,bar2.f,utils.f,cycle_tracer.f,pressure_for_eos.f,seawater.f,gsw_teos10.f' |
37 |
jmc |
1.4 |
# additional candidates for inlining are parts of packages that are not |
38 |
mlosch |
1.1 |
# always used, therefore use this at your own risk: |
39 |
|
|
#FEXTRAFLAGS=${FEXTRAFLAGS}' -pi fullmsg exp= expin=' |
40 |
jmc |
1.5 |
|
41 |
|
|
#-- additional options: |
42 |
jmc |
1.4 |
# include a formated code listing and a listing of compiler transformations |
43 |
mlosch |
1.1 |
# in *.L files |
44 |
|
|
#FFLAGS=$FFLAGS' -R2' |
45 |
|
|
# assume a loop count of 5,000,000 instead of estimating it from field |
46 |
jmc |
1.4 |
# declarations and include details messages about vectorization (if -R2 |
47 |
mlosch |
1.1 |
# specified) |
48 |
|
|
#FFLAGS=$FFLAGS' -Wf "-pvctl noassume loopcnt=5000000 fullmsg"' |
49 |
|
|
# trace output for performance analysis |
50 |
|
|
#FFLAGS=$FFLAGS' -ftrace' |
51 |
|
|
# default automatic optimization level |
52 |
jmc |
1.4 |
#FOPTIM='-C vopt' |
53 |
jmc |
1.5 |
|
54 |
mlosch |
1.1 |
if test "x$IEEE" = x ; then |
55 |
|
|
# highest automatic optimization level, handle with care |
56 |
|
|
FOPTIM='-C hopt' |
57 |
|
|
# these files require lower optimization |
58 |
|
|
NOOPTFILES='ini_forcing.F mom_calc_visc.F' |
59 |
|
|
NOOPTFLAGS='-C vopt' |
60 |
|
|
else |
61 |
|
|
FOPTIM='-C vsafe' |
62 |
|
|
fi |
63 |
|
|
|
64 |
|
|
# awi specific paths and stuff |
65 |
|
|
INCLUDES='-I/SX/usr/include -I/sx8/user2/awisoft/sx8/netcdf-4.0/dw/include' |
66 |
|
|
LIBS='-L/sx8/user2/awisoft/sx8/netcdf-4.0/dw/lib -lnetcdf' |
67 |
|
|
|
68 |
jmc |
1.5 |
if test "x$MPI" = xtrue ; then |
69 |
|
|
# this is needed for compiling on the compute nodes |
70 |
|
|
INCLUDES=$INCLUDES' -I/SX/opt/mpisx/inst/usr/include' |
71 |
|
|
fi |
72 |
|
|
|