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