--- MITgcm/tools/build_options/linux_amd64_gfortran 2011/09/26 19:32:32 1.15 +++ MITgcm/tools/build_options/linux_amd64_gfortran 2013/07/22 18:40:45 1.20 @@ -1,6 +1,6 @@ #!/bin/bash -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_gfortran,v 1.15 2011/09/26 19:32:32 utke Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_gfortran,v 1.20 2013/07/22 18:40:45 jmc Exp $ # $Name: $ # Build options for gfortran compiler (GNU) on Linux AMD64 platform @@ -25,6 +25,13 @@ # export MPI_GCC_DIR=/srv/software/gcc/gcc-packages/gcc-4.4.5/mpich2/mpich2-1.3 # export MPI_INC_DIR=$MPI_GCC_DIR/include # export PATH=$MPI_GCC_DIR/bin:$PATH +# +# and on IRIDIS at Southampton +# http://www.southampton.ac.uk/isolutions/computing/hpc/iridis/ +# with +# module load openmpi/1.4.3/gcc-4.3.3 +# and +# export MPI_INC_DIR=$MPIROOT/include #------- # run with OpenMP: needs to set environment var. OMP_NUM_THREADS @@ -62,7 +69,7 @@ # for big objects: FFLAGS="$FFLAGS -fPIC" #- might want to use '-fdefault-real-8' for fizhi pkg: -#FFLAGS="$FFLAGS -fdefault-real-8" +#FFLAGS="$FFLAGS -fdefault-real-8 -fdefault-double-8" if test "x$IEEE" = x ; then #- with optimisation: #- full optimisation @@ -81,8 +88,8 @@ if test "x$DEVEL" = x ; then #- no optimisation + IEEE : FOPTIM='-O0' else #- development/check options: - FOPTIM='-O0' - FOPTIM="$FOPTIM -g -ffpe-trap=invalid,zero,overflow -fbounds-check" + FOPTIM='-O0 -g -fbounds-check' + FOPTIM="$FOPTIM -ffpe-trap=invalid,zero,overflow -finit-real=inf" fi fi @@ -127,12 +134,15 @@ elif test -d /usr/local/include/netcdf.inc ; then INCLUDES='-I/usr/local/include' LIBS='-L/usr/local/lib64' +elif test -d /usr/include/netcdf.inc ; then + INCLUDES='-I/usr/include' + LIBS='-L/usr/lib64' fi if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then INCLUDES="$INCLUDES -I$MPI_INC_DIR" INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" + #- used for parallel (MPI) DIVA MPIINCLUDEDIR="$MPI_INC_DIR" - MPI_HEADER_FILES='mpif.h mpiof.h' - MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' + #MPI_HEADER_FILES='mpif.h mpiof.h' fi