Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/linux_ia64_cray_cca 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
95215268e9 Mart*0001 #!/bin/bash
                0002 #
                0003 # Tested on cca at ecmwf.int: 
                0004 # http://www.ecmwf.int/en/computing/our-facilities/supercomputer
                0005 #
                0006 # this requires that the PrgEnv is "cray", i.e. one needs to
                0007 # switch out of the current PrgEnv like this:
                0008 # module load PrgEnv-cray
                0009 # or if something else is loaded
                0010 # module switch PrgEnv-???? PrgEnv-cray
                0011 # after switching the programming environment, the netcdf model needs 
                0012 # to be loaded (and unloaded if it was loaded before)
                0013 # module unload netcdf
                0014 # module load netcdf
                0015 # after "module load netcdf" NETCDF_DIR should be available
                0016 # NETCDF_ROOT = $NETCDF_DIR
                0017 # notes on useful MPI flags (to be set at runtime):
                0018 # export MPICH_COLL_SYNC=1
                0019 #  Adds a barrier before collectives, use this if CrayPAT makes your code
                0020 #  run faster.
                0021 # export MPICH_CPUMASK_DISPLAY=1
                0022 #  Shows the binding of each MPI rank by core and hostname
                0023 # export MPICH_ENV_DISPLAY=1
                0024 #  Print to stderr the value of all MPI environment variables at runtime.
                0025 # export MPICH_MPIIO_STATS=1
                0026 #  Prints some MPI-IO stats to stderr that can be useful for optimisation
                0027 # export MPICH_RANK_REORDER_DISPLAY=1
                0028 #  Prints the node that each rank is residing on, useful for checking 
                0029 #  MPICH_RANK_REORDER_METHOD results.
                0030 # export MPICH_VERSION_DISPLAY=1
                0031 #  Display library version and build information.
                0032 
                0033 FC=ftn
                0034 F90C=ftn
                0035 CC=cc
                0036 # requires that all static libraries are available:
                0037 #LINK='ftn -static'
                0038 LINK='ftn -h byteswapio'
                0039 # for adjoint runs the default makedepend often cannot handle enough files
                0040 #MAKEDEPEND=tools_xmakedepend
                0041 
                0042 DEFINES='-DWORDLENGTH=4'
                0043 CPP='cpp -traditional -P'
                0044 #F90FIXEDFORMAT='-fixed -Tf'
                0045 #EXTENDED_SRC_FLAG=''
                0046 #OMPFLAG=''
                0047 
                0048 NOOPTFLAGS="-O0"
                0049 # reduce floating point reordering
                0050 #NOOPTFLAGS="-O0 -hfp1"
                0051 NOOPTFILES=''
                0052 
                0053 FFLAGS="$FFLAGS"
                0054 #- might want to use '-r8' for fizhi pkg:
                0055 #FFLAGS="$FFLAGS -r8" ???
                0056 
                0057 if test "x$IEEE" = x ; then     #- with optimisation:
d585ddc7fa Mart*0058 # this is the default
                0059 #   FOPTIM='-O2'
                0060 # more aggressive (and recommended in some only document)
                0061     FOPTIM='-O3 -hfp3'
95215268e9 Mart*0062 else
                0063   if test "x$DEVEL" = x ; then  #- no optimisation + IEEE :
                0064     FOPTIM='-O0 -hfp0'
                0065    # -fltconsistency
                0066   else                          #- development/check options:
                0067     FOPTIM='-O0 -hfp0'
                0068     FOPTIM="$FOPTIM -g -hfp0 -Rbc -rm -hmsgs -hnegmsgs"
                0069   fi
                0070 fi
                0071 
                0072 F90FLAGS=$FFLAGS
                0073 F90OPTIM=$FOPTIM
                0074 CFLAGS="-O0 $MCMODEL"
                0075 
                0076 INCLUDEDIRS=''
                0077 INCLUDES=''
                0078 LIBS=''
                0079 
                0080 # after "module load netcdf" NETCDF_DIR should be available
                0081 NETCDF_ROOT=$NETCDF_DIR
                0082 INCLUDEDIRS="${NETCDF_ROOT}/include"
                0083 INCLUDES="-I${NETCDF_ROOT}/include"
                0084 LIBS="-L${NETCDF_ROOT}/lib"
                0085 
                0086 MPI_INC_DIR=$MPICH_DIR/include
                0087 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0088     LIBS="$LIBS -lmpich"
                0089     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0090     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
                0091     #- used for parallel (MPI) DIVA
                0092     MPIINCLUDEDIR="$MPI_INC_DIR"
                0093    #MPI_HEADER_FILES='mpif.h mpiof.h'
                0094 fi
                0095