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