Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/linux_ia32_sunf90 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
8cfe52d849 Cons*0001 #!/bin/bash
                0002 #
47f2aff820 Jean*0003 # Build options for the Sun fortran compiler (with and without MPI)
                0004 #            on Linux IA32 platform
                0005 # MPI : need to set environment variable MPI_INC_DIR to the include
                0006 #       directory of your MPI implementation
                0007 
                0008 if test "x$MPI" = xtrue ; then
                0009   CC=${CC:=mpicc}
                0010   FC=${FC:=mpif77}
                0011   F90C=${F90C:=mpif90}
                0012   LINK=${F90C}
                0013 else
                0014   CC='cc'
                0015   FC='f77'
                0016   F90C='f90'
                0017   LINK=${F90C}
                0018 fi
                0019 
8cfe52d849 Cons*0020 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
                0021 DEFINES='-DWORDLENGTH=4'
                0022 CPP='cpp  -traditional -P'
                0023 EXTENDED_SRC_FLAG='-e'
                0024 OMPFLAG='-xopenmp'
                0025 
47f2aff820 Jean*0026 NOOPTFLAGS='-O0 -g'
                0027 NOOPTFILES=''
                0028 
                0029 FFLAGS="$FFLAGS -m32 -xfilebyteorder=big16:%all -u"
                0030 #FFLAGS="$FFLAGS -r8const"
                0031 
8cfe52d849 Cons*0032 if test "x$DEVEL" != x ; then
47f2aff820 Jean*0033     FFLAGS="$FFLAGS -g -xs -C -xcommonchk -xcheck=init_local -fpover"
                0034     OMPFLAG='-xopenmp=noopt'
8cfe52d849 Cons*0035 fi
                0036 
47f2aff820 Jean*0037 if test "x$IEEE" = x ; then     #- with optimisation:
                0038     FOPTIM='-fast -xvector=simd -xpad=local'
                0039     LIBS="$LIBS -lmopt"   #- but get overwritten during NETCDF libs setting below
                0040 else                            #- no optimisation + IEEE :
                0041 #   FOPTIM='-O0'
                0042     FOPTIM='-fast -xpad=local -fsimple=1'
8cfe52d849 Cons*0043 fi
47f2aff820 Jean*0044 
8cfe52d849 Cons*0045 F90FLAGS=$FFLAGS
                0046 F90OPTIM=$FOPTIM
47f2aff820 Jean*0047 CFLAGS='-O0 -m32'
                0048 
                0049 INCLUDEDIRS=''
                0050 INCLUDES=''
                0051 #LIBS=''
8cfe52d849 Cons*0052 
                0053 if [ "x$NETCDF_ROOT" != x ] ; then
                0054     INCLUDEDIR="${NETCDF_ROOT}/include"
                0055     INCLUDES="-I${NETCDF_ROOT}/include"
                0056     LIBDIR="${NETCDF_ROOT}/lib"
                0057     LIBS="-L${NETCDF_ROOT}/lib"
                0058 elif [ "x$NETCDF_HOME" != x ]; then
                0059     INCLUDEDIR="${NETCDF_HOME}/include"
                0060     INCLUDES="-I${NETCDF_HOME}/include"
                0061     LIBDIR="${NETCDF_HOME}/lib"
                0062     LIBS="-L${NETCDF_HOME}/lib"
                0063 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
                0064     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
                0065     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
                0066     INCLUDEDIR="${NETCDF_INC}"
                0067     INCLUDES="-I${NETCDF_INC}"
                0068     LIBDIR="${NETCDF_LIB}"
                0069     LIBS="-L${NETCDF_LIB}"
                0070 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
                0071     INCLUDEDIR="${NETCDF_INCDIR}"
                0072     INCLUDES="-I${NETCDF_INCDIR}"
                0073     LIBDIR="${NETCDF_LIBDIR}"
                0074     LIBS="-L${NETCDF_LIBDIR}"
                0075 elif test -d /usr/include/netcdf-3 ; then
                0076     INCLUDES='-I/usr/include/netcdf-3'
                0077     LIBS='-L/usr/lib/netcdf-3'
                0078 elif test -d /usr/include/netcdf ; then
                0079     INCLUDES='-I/usr/include/netcdf'
                0080 elif test -d /usr/local/netcdf ; then
                0081     INCLUDES='-I/usr/local/netcdf/include'
                0082     LIBS='-L/usr/local/netcdf/lib'
                0083 elif test -d /usr/local/include/netcdf.inc ; then
                0084     INCLUDES='-I/usr/local/include'
                0085     LIBS='-L/usr/local/lib'
                0086 fi
                0087 
47f2aff820 Jean*0088 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0089     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0090     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
15978f0412 Jean*0091     #- used for parallel (MPI) DIVA
47f2aff820 Jean*0092     MPIINCLUDEDIR="$MPI_INC_DIR"
15978f0412 Jean*0093    #MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
47f2aff820 Jean*0094 fi
                0095