#!/bin/bash # # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/Attic/linux_amd64_ifort+mpi_beagle,v 1.4 2009/09/23 18:38:33 jmc Exp $ # $Name: $ # # These are the build options used with the Intel 10.x compiler for # testing on Beagle. # # Use after # # module add darwin # module add mitgcm # # (tested with darwin/20090605 mitgcm/20090605, i.e., # 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) # # These modules set FFLAGS, CFLAGS and CPPFLAGS for mpich and netcdf. # # The SGE -V option for exporting environment variables may also be # helpful if you encounter missing-library problems. Or, # alternatively, one may choose to link with one of the intel # "-static" or "-i-static" flags. FC='mpif77' CC='mpicc' F90C='mpif90 -fixed -c ' LINK='mpif77' INCLUDES="$CPPFLAGS" LIBS="$LDFLAGS" # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic) DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DIFORT' CPP='cpp -traditional -P' EXTENDED_SRC_FLAG='-132' #OMPFLAG='-openmp' NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_ke.F mon_ke.F' if test "x$IEEE" = x ; then # No need for IEEE-754 NOOPTFLAGS='-O2' FOPTIM='-O3 -align' # ifort options: # -132 fixed-form line length is 132 characters # -r8 REAL is REAL*8 # -i4 INTEGER is INTEGER*4 # -w95 don't warn about use of Fortran 95 extensions # -W0 disable all warning messages # -WB turns a compile-time bounds check error into a warning # -xT optimize for Intel Core2 and Xeon 51xx # -fno-alias don't assume aliasing (assume that different variables DON'T refer to the same memory location) # -assume byterecl record length in OPEN statements is in bytes # -convert big_endian binary files contain big-endian data # -shared-intel avoids static library mismatch (?) FFLAGS="$FFLAGS -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian -shared-intel" else # Try to follow IEEE-754 NOOPTFLAGS='-O0' # -CB check bounds # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS' FOPTIM='-O0 -noalign' # -pc64 round floating point values to 64 bits # one could also try # -mp maintain precision FFLAGS="$FFLAGS -pc64 -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian -shared-intel" fi F90FLAGS=$FFLAGS F90OPTIM=$FOPTIM NOOPTFILES=$NOOPTFILES' mds_byteswap.F'