Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/SUPER-UX_SX-ACE_sxf90_awi is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
4e715a61b5 Mart*0001 #!/bin/bash
                0002 #
                0003 # for cross compiling on stan1.awi.de
                0004 # uname -a:
                0005 # Linux stan1.awi.de 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 17:04:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
                0006 # before using this build-options file make sure you have the correct
                0007 # modules loaded, currently:
                0008 # module load sxf90 sxc++ sxmpi sxnetcdf
                0009 
                0010 
                0011 CC='sxcc -sxace'
                0012 if test "x$MPI" = xtrue ; then
                0013   FC='sxmpif90'
                0014   LINK='sxmpif90'
                0015  #LINK='sxmpif90 -p' # with profiler
                0016 else
                0017   FC='sxf90'
                0018   LINK='sxf90'
                0019 fi
                0020 
                0021 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X)  X ## _"
                0022 # nec use
12dace3fd6 Mart*0023 DEFINES='-DTARGET_NEC_SX -DWORDLENGTH=1 -DHAVE_CLOC -UHAVE_SIGREG -DSEAICE_VECTORIZE_LSR -DSEAICE_LSR_ZEBRA -DCG2D_OUTERLOOPITERS=10 -DCG3D_OUTERLOOPITERS=10'
4e715a61b5 Mart*0024 CPP='/lib/cpp -traditional -P'
                0025 RMFILES='*.L'
                0026 
                0027 FFLAGS='-Pstack -sxace'
                0028 # automatic inlining for routines < 50 lines (default) and in the same file
                0029 # where they are to be inlined (we do not have too many of those)
f2a0935bd8 Mart*0030 FFLAGS="$FFLAGS -pi"
4e715a61b5 Mart*0031 
                0032 # This is how you inline external routines if they are longer than 50 lines
                0033 # and live in a separate file (the actual routines depend on the packages
                0034 # used, therefore there are only a few examples here); unfortunately, these
                0035 # flags break the genmake2 tests, so they get an extra flag variable that
                0036 # is not tested in genmake2
                0037 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'
                0038 # additional candidates for inlining are parts of packages that are not
                0039 # always used, therefore use this at your own risk:
f2a0935bd8 Mart*0040 #FEXTRAFLAGS="${FEXTRAFLAGS} -pi fullmsg exp= expin="
4e715a61b5 Mart*0041 #
                0042 # Note: explicit inlining requires that all files (*.f) are already
                0043 # available, so that the building sequence should be 
                0044 # genmake2 [OPTIONS] && make depend && make small_f && make
                0045 
                0046 #-- additional options:
                0047 # include a formated code listing and a listing of compiler transformations
                0048 # in *.L files
f2a0935bd8 Mart*0049 #FFLAGS="$FFLAGS -R2"
4e715a61b5 Mart*0050 # assume a loop count of 5,000,000 instead of estimating it from field
                0051 # declarations and include details messages about vectorization (if -R2
                0052 # specified)
                0053 #FFLAGS=$FFLAGS' -Wf "-pvctl noassume loopcnt=5000000 fullmsg"'
                0054 # trace output for performance analysis
                0055 #FFLAGS=$FFLAGS' -ftrace'
                0056 # default automatic optimization level
                0057 #FOPTIM='-C vopt'
                0058 
f2a0935bd8 Mart*0059 # these files require lower optimization
                0060 NOOPTFILES='ini_forcing.F mom_calc_visc.F'
                0061 NOOPTFILES="$NOOPTFILES ptracers_dyn_state_data_mod.F ptracers_dyn_state_mod.F"
4e715a61b5 Mart*0062 if test "x$IEEE" = x ; then
f2a0935bd8 Mart*0063     # highest automatic optimization level, handle with care
                0064     FOPTIM='-C hopt'
                0065     NOOPTFLAGS='-C vopt'
4e715a61b5 Mart*0066 else
f2a0935bd8 Mart*0067     if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
                0068         FOPTIM='-C vsafe'
                0069         NOOPTFLAGS=$FOPTIM
                0070     else                          #- development/check options:
                0071         # enable runtime checking of array bounds and arguments of routines
                0072         FOPTIM='-C vsafe -g -eC -eP'
                0073         NOOPTFLAGS=$FOPTIM
                0074         # remove extra flags and explicit inlining
                0075         FEXTRAFLAGS=
                0076     fi
4e715a61b5 Mart*0077 fi
                0078 
f2a0935bd8 Mart*0079 # awi specific paths and stuff, available only after "module load sxnetcdf"
                0080 INCLUDES="-I${SX_NETCDF_INC}"
4e715a61b5 Mart*0081 LIBS="-L${SX_NETCDF_LIB} -lnetcdf"
                0082 
                0083 if test "x$MPI" = xtrue ; then
f2a0935bd8 Mart*0084     # path to mpi header files, available only after "module load sxmpi"
4e715a61b5 Mart*0085     INCLUDES="$INCLUDES -I${SX_BASE_MPI}/include"
                0086 fi
                0087