#!/bin/bash # # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_ifort_beagle,v 1.1 2009/06/16 15:21:59 jahn Exp $ # $Name: $ # # These are the build options used with the Intel 10.x compiler for # testing on Beagle without mpi. # # 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='ifort' CC='icc' #F90C='mpif90 -fixed -c ' LINK='ifort' # the netcdf module sets CPPFLAGS, LDFLAGS and FFLAGS INCLUDES="$CPPFLAGS" # -shared-intel needed with netcdf (namespace conflict???) LIBS="$LDFLAGS -shared-intel" # -DIFORT turns on ifort-specific declarations in darwin (RAND is not an intrinsic) DEFINES='-DWORDLENGTH=4 -DIFORT' CPP='cpp -traditional -P' NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_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 FFLAGS="$FFLAGS -132 -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian" else # Try to follow IEEE-754 NOOPTFLAGS='-O0' # 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 -132 -r8 -i4 -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian" fi #F90FLAGS=$FFLAGS #F90OPTIM=$FOPTIM NOOPTFILES=$NOOPTFILES' mitcplr_char2real.F mitcplr_real2char.F' NOOPTFILES=$NOOPTFILES' mitcplr_char2int.F mitcplr_int2char.F mds_byteswap.F'