Warning, /tools/build_options/unsupported/linux_ia32_ifort+mpi_aces 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
4647ba122e Ed H*0001 #!/bin/bash
0002 #
0003 #
19dc9f5cc6 Jean*0004 # build options used with the Intel compiler, version 8 and 9,
a2b7e9952a Jean*0005 # for the daily testing on ACES (which are initiated by cron jobs
19dc9f5cc6 Jean*0006 # on the "ao" head node).
4647ba122e Ed H*0007 #
19dc9f5cc6 Jean*0008 # Needs the appropriate module commands,
0009 # and DON'T FORGET to set environment variable MPI_INC_DIR to the include
0010 # directory of the selected MPI implementation
0f3dc8a567 Ed H*0011 #
19dc9f5cc6 Jean*0012 #-- using default intel (v8.1) and default mpich/intel:
0f3dc8a567 Ed H*0013 # module add mpich/intel
19dc9f5cc6 Jean*0014 # module add netcdf/3.6.1/icc
a2b7e9952a Jean*0015 # e.g.(sh,bash):
19dc9f5cc6 Jean*0016 # export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include/'
0017 # (and run using mpirun -machinefile my_list_of_nodes)
a2b7e9952a Jean*0018 #
19dc9f5cc6 Jean*0019 #-- using intel v9.0 and mpich2-intel, in this order:
0020 # module add ifc/9.0.021 icc/9.0.021 intel/9.0
0021 # module add mpich2/1.0.3/intel
0022 # module add netcdf/3.6.1/icc
0023 # module add mpiexec (<-- to run with mpiexec)
a2b7e9952a Jean*0024 # e.g.(sh,bash):
19dc9f5cc6 Jean*0025 # export MPI_INC_DIR='/usr/local/pkg/mpich2/mpich2-1.0.3/intel/include/'
0026 # (and run using mpiexec)
0f3dc8a567 Ed H*0027 #
19dc9f5cc6 Jean*0028 #-- Multi-Threading with OpenMP:
0029 # -several problems with earlier version of ifort (including some version 8)
0030 # -with version 9 and more recent one:
0031 # 1) compile with genmake2 -omp option ;
a2b7e9952a Jean*0032 # 2) needs to set environment variable OMP_NUM_THREADS, and generally,
19dc9f5cc6 Jean*0033 # needs also to increase the thread stack-size:
a2b7e9952a Jean*0034 # (sh, bash) > export OMP_NUM_THREADS=2
19dc9f5cc6 Jean*0035 # > export KMP_STACKSIZE=400m
0036 # (csh,tcsh) > setenv OMP_NUM_THREADS 2
0037 # > setenv KMP_STACKSIZE 400m
a2b7e9952a Jean*0038 # NOTE: set KMP_STACKSIZE in .bashrc/.profile/.cshrc/.tcshrc is the easiest
19dc9f5cc6 Jean*0039 # way (I found) to set it for all proc; not an issue (?) for OMP_NUM_THREADS
0f3dc8a567 Ed H*0040
19dc9f5cc6 Jean*0041 # Notes: the PBS -V option for exporting environment variables does not work
0042 # => need to set all env var on compute nodes
4647ba122e Ed H*0043
0f3dc8a567 Ed H*0044 FC='mpif77'
0045 CC='mpicc'
2e3e20a8cc Chri*0046 F90C='mpif90 -fixed -c '
0f3dc8a567 Ed H*0047 LINK='mpif77'
19dc9f5cc6 Jean*0048
a2b7e9952a Jean*0049 #-- for NetCDF:
19dc9f5cc6 Jean*0050 INCLUDES="-I$NETCDF_INCDIR"
0051 INCLUDEDIRS=$NETCDF_INCDIR
0052 LIBS="-L$NETCDF_LIBDIR"
0053
0054 #- for MPI:
0055 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
0056 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
0057 MPIINCLUDEDIR="$MPI_INC_DIR"
0058 MPI_HEADER_FILES='mpif.h mpiof.h'
0059 MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'
4647ba122e Ed H*0060
0f3dc8a567 Ed H*0061 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
4647ba122e Ed H*0062 CPP='cpp -traditional -P'
e399bdfb27 Jean*0063 EXTENDED_SRC_FLAG='-132'
19dc9f5cc6 Jean*0064 OMPFLAG='-openmp'
0f3dc8a567 Ed H*0065
0066 NOOPTFLAGS='-O0'
0067 NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F'
4647ba122e Ed H*0068
0069 # Note that the -mp switch is for ieee "maintain precision" and is
0070 # roughly equivalent to -ieee
0071 if test "x$IEEE" = x ; then
0072 FOPTIM='-O3 -align'
0f3dc8a567 Ed H*0073 #P3 FOPTIM=$FOPTIM' -tpp6 -xWKM'
0074 #P4 FOPTIM=$FOPTIM' -tpp7 -xWKM'
a2b7e9952a Jean*0075 FFLAGS="$FFLAGS -r8 -i4 -w95 -W0 -WB -assume byterecl -convert big_endian"
4647ba122e Ed H*0076 else
0f3dc8a567 Ed H*0077 # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
e399bdfb27 Jean*0078 FOPTIM='-O0 -noalign -CB -CU -CV'
a2b7e9952a Jean*0079 FFLAGS="$FFLAGS -w95 -W0 -WB -pc64 -xW -assume byterecl -convert big_endian"
0080 # FLAGS="$FFLAGS -mp -w95 -W0 -WB -assume byterecl -convert big_endian"
4647ba122e Ed H*0081 fi
a2b7e9952a Jean*0082 #- might want to use '-r8' for fizhi pkg:
0083 #FFLAGS="$FFLAGS -r8"
0084
56d32fc8c1 Jean*0085 F90FLAGS=$FFLAGS
0086 F90OPTIM=$FOPTIM
4647ba122e Ed H*0087
0f3dc8a567 Ed H*0088 NOOPTFILES=$NOOPTFILES' mitcplr_char2real.F mitcplr_real2char.F'
0089 NOOPTFILES=$NOOPTFILES' mitcplr_char2int.F mitcplr_int2char.F mds_byteswap.F'
19dc9f5cc6 Jean*0090