Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/unsupported/linux_amd64_ifort+mpi_beagle 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
5558b5cc72 Oliv*0001 #!/bin/bash
                0002 #
                0003 #
239879186f Oliv*0004 #  These are the build options used with the Intel 10.x compiler for
5558b5cc72 Oliv*0005 #  testing on Beagle.
                0006 #
239879186f Oliv*0007 #  Use after
5558b5cc72 Oliv*0008 #
239879186f Oliv*0009 #    module add darwin
                0010 #    module add mitgcm
                0011 #
                0012 #  (tested with darwin/20090605 mitgcm/20090605, i.e.,
                0013 #  intel/10.0.025 mx/1.0 netcdf/3.6.2/intel-10.0.025 mpich-mx/1.2.7..7/intel-10.0.025)
                0014 #
                0015 #  These modules set FFLAGS, CFLAGS and CPPFLAGS for mpich and netcdf.
5558b5cc72 Oliv*0016 #
                0017 #  The SGE -V option for exporting environment variables may also be
                0018 #  helpful if you encounter missing-library problems.  Or,
                0019 #  alternatively, one may choose to link with one of the intel
                0020 #  "-static" or "-i-static" flags.
                0021 
                0022 FC='mpif77'
                0023 CC='mpicc'
                0024 F90C='mpif90 -fixed -c '
                0025 LINK='mpif77'
d43c1a14b0 Oliv*0026 for path in $(echo "$CPATH" | sed 's/:/ /g'); do
                0027   CPPFLAGS="$CPPFLAGS -I$path"
                0028 done
239879186f Oliv*0029 INCLUDES="$CPPFLAGS"
d43c1a14b0 Oliv*0030 # for static linkage:
                0031 #LIBS="$LDFLAGS -static"
                0032 # for dynamic linkage:
a51cfd6bec Oliv*0033 LIBS="$LDFLAGS -shared-intel"
5558b5cc72 Oliv*0034 
d43c1a14b0 Oliv*0035 
5558b5cc72 Oliv*0036 # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic)
                0037 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DIFORT'
                0038 CPP='cpp  -traditional -P'
08bdbd4b74 Jean*0039 EXTENDED_SRC_FLAG='-132'
a5566b88fb Jean*0040 GET_FC_VERSION="--version"
08bdbd4b74 Jean*0041 #OMPFLAG='-openmp'
5558b5cc72 Oliv*0042 
08bdbd4b74 Jean*0043 NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_ke.F mon_ke.F'
5558b5cc72 Oliv*0044 
                0045 if test "x$IEEE" = x ; then
                0046     #  No need for IEEE-754
                0047     NOOPTFLAGS='-O2'
a51cfd6bec Oliv*0048     # use this for exact checkpointing (slightly slower):
d43c1a14b0 Oliv*0049     FOPTIM='-O2 -pc64 -mieee-fp -align'
                0050     # use this for flighty faster execution but with roundoff errors in checkpointing:
                0051     # FOPTIM='-O2 -align'
5558b5cc72 Oliv*0052     # ifort options:
                0053     # -132        fixed-form line length is 132 characters
                0054     # -r8         REAL is REAL*8
                0055     # -i4         INTEGER is INTEGER*4
                0056     # -w95        don't warn about use of Fortran 95 extensions
                0057     # -W0         disable all warning messages
                0058     # -WB         turns a compile-time bounds check error into a warning
                0059     # -xT         optimize for Intel Core2 and Xeon 51xx
c76e16a7bc Jean*0060     # -fno-alias  don't assume aliasing (assume that different variables DON'T refer to the same memory location)
5558b5cc72 Oliv*0061     # -assume byterecl     record length in OPEN statements is in bytes
                0062     # -convert big_endian  binary files contain big-endian data
239879186f Oliv*0063     # -shared-intel        avoids static library mismatch (?)
c76e16a7bc Jean*0064     FFLAGS="$FFLAGS -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"
5558b5cc72 Oliv*0065 else
                0066     #  Try to follow IEEE-754
                0067     NOOPTFLAGS='-O0'
                0068     # -CB         check bounds
                0069     # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
                0070     FOPTIM='-O0 -noalign'
                0071     # -pc64       round floating point values to 64 bits
                0072     # one could also try
                0073     # -mp         maintain precision
c76e16a7bc Jean*0074     FFLAGS="$FFLAGS -pc64 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian"
5558b5cc72 Oliv*0075 fi
c76e16a7bc Jean*0076 #- might want to use '-r8' for fizhi pkg:
                0077 #FFLAGS="$FFLAGS -r8"
                0078 
5558b5cc72 Oliv*0079 F90FLAGS=$FFLAGS
                0080 F90OPTIM=$FOPTIM
                0081 
08bdbd4b74 Jean*0082 NOOPTFILES=$NOOPTFILES' mds_byteswap.F'
239879186f Oliv*0083