Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/unsupported/SUPER-UX_SX-8_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
926fa73c89 Mart*0001 #!/bin/bash
                0002 #
                0003 # for cross compiling on sx8.awi.de
6144427bd2 Jean*0004 # uname -a:
926fa73c89 Mart*0005 # Linux sx8 2.6.5-7.282-default #1 SMP Tue Aug 29 10:40:40 UTC 2006 ia64 ia64 ia64 GNU/Linux#
                0006 
9fed53bc32 Mart*0007 CC='sxcc -sx8r'
efeec9505f Jean*0008 if test "x$MPI" = xtrue ; then
                0009   FC='sxmpif90'
                0010   LINK='sxmpif90'
                0011  #LINK='sxmpif90 -p' # with profiler
                0012 else
                0013   FC='sxf90'
                0014   LINK='sxf90'
                0015 fi
                0016 
                0017 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X)  X ## _"
926fa73c89 Mart*0018 # nec use
63f8fe56db Mart*0019 DEFINES='-DTARGET_NEC_SX -DWORDLENGTH=1 -DHAVE_CLOC -UHAVE_SIGREG -DSEAICE_VECTORIZE_LSR -DSEAICE_VECTORIZE_LSR_ZEBRA -DCG2D_OUTERLOOPITERS=10 -DCG3D_OUTERLOOPITERS=10'
efeec9505f Jean*0020 CPP='/lib/cpp -traditional -P'
926fa73c89 Mart*0021 RMFILES='*.L'
efeec9505f Jean*0022 
926fa73c89 Mart*0023 FFLAGS='-Pstack -sx8r'
6144427bd2 Jean*0024 # automatic inlining for routines < 50 lines (default) and in the same file
926fa73c89 Mart*0025 # where they are to be inlined (we do not have too many of those)
                0026 FFLAGS=$FFLAGS' -pi'
efeec9505f Jean*0027 
6144427bd2 Jean*0028 # This is how you inline external routines if they are longer than 50 lines
                0029 # and live in a separate file (the actual routines depend on the packages
                0030 # used, therefore there are only a few examples here); unfortunately, these
                0031 # flags break the genmake2 tests, so they get an extra flag variable that
f5a486f51f Mart*0032 # is not tested in genmake2
9fed53bc32 Mart*0033 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'
6144427bd2 Jean*0034 # additional candidates for inlining are parts of packages that are not
926fa73c89 Mart*0035 # always used, therefore use this at your own risk:
                0036 #FEXTRAFLAGS=${FEXTRAFLAGS}' -pi fullmsg exp= expin='
efeec9505f Jean*0037 
                0038 #-- additional options:
6144427bd2 Jean*0039 # include a formated code listing and a listing of compiler transformations
926fa73c89 Mart*0040 # in *.L files
                0041 #FFLAGS=$FFLAGS' -R2'
                0042 # assume a loop count of 5,000,000 instead of estimating it from field
6144427bd2 Jean*0043 # declarations and include details messages about vectorization (if -R2
926fa73c89 Mart*0044 # specified)
                0045 #FFLAGS=$FFLAGS' -Wf "-pvctl noassume loopcnt=5000000 fullmsg"'
                0046 # trace output for performance analysis
                0047 #FFLAGS=$FFLAGS' -ftrace'
                0048 # default automatic optimization level
6144427bd2 Jean*0049 #FOPTIM='-C vopt'
efeec9505f Jean*0050 
926fa73c89 Mart*0051 if test "x$IEEE" = x ; then
                0052  # highest automatic optimization level, handle with care
                0053  FOPTIM='-C hopt'
                0054  # these files require lower optimization
                0055  NOOPTFILES='ini_forcing.F mom_calc_visc.F'
                0056  NOOPTFLAGS='-C vopt'
                0057 else
                0058  FOPTIM='-C vsafe'
                0059 fi
                0060 
                0061 # awi specific paths and stuff
                0062 INCLUDES='-I/SX/usr/include -I/sx8/user2/awisoft/sx8/netcdf-4.0/dw/include'
                0063 LIBS='-L/sx8/user2/awisoft/sx8/netcdf-4.0/dw/lib -lnetcdf'
                0064 
efeec9505f Jean*0065 if test "x$MPI" = xtrue ; then
                0066     # this is needed for compiling on the compute nodes
                0067     INCLUDES=$INCLUDES' -I/SX/opt/mpisx/inst/usr/include'
                0068 fi
                0069