Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/sunos_sparc_sunf90_m64 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
6a8af2f257 Cons*0001 #!/bin/bash
                0002 #
328a12d6ae Jean*0003 # Build options for the Sun fortran compiler (with and without MPI)
                0004 #            on Sun-OS Sparc 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
6a8af2f257 Cons*0019 
                0020 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
                0021 DEFINES='-DWORDLENGTH=4'
                0022 CPP='/usr/ccs/lib/cpp -P'
                0023 EXTENDED_SRC_FLAG='-e'
                0024 OMPFLAG='-xopenmp'
                0025 
328a12d6ae Jean*0026 NOOPTFLAGS='-O0 -g'
                0027 NOOPTFILES=''
                0028 
                0029 FFLAGS="$FFLAGS -m64 -u"
                0030 #FFLAGS="$FFLAGS -r8const"
                0031 
6a8af2f257 Cons*0032 if test "x$DEVEL" != x ; then
328a12d6ae Jean*0033     FFLAGS="$FFLAGS -g -xs -C -xcommonchk -xcheck=init_local -fpover"
                0034     OMPFLAG='-xopenmp=noopt'
6a8af2f257 Cons*0035 fi
                0036 
328a12d6ae Jean*0037 if test "x$IEEE" = x ; then     #- with optimisation:
                0038     FOPTIM='-fast -xvector=lib -xpad=local'
                0039     LIBS="$LIBS -lmopt -lsunmath"   #- but get overwritten during NETCDF libs setting below
                0040 else                            #- no optimisation + IEEE :
                0041 #   FOPTIM='-O0'
                0042     FOPTIM='-fast -xpad=local -fsimple=1'
6a8af2f257 Cons*0043 fi
328a12d6ae Jean*0044 
6a8af2f257 Cons*0045 F90FLAGS=$FFLAGS
                0046 F90OPTIM=$FOPTIM
328a12d6ae Jean*0047 CFLAGS='-O0 -m64'
                0048 
                0049 INCLUDEDIRS=''
                0050 INCLUDES=''
                0051 #LIBS=''
6a8af2f257 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 ; then
                0076     INCLUDES='-I/usr/include/netcdf'
                0077 elif test -d /usr/local/netcdf ; then
                0078     INCLUDES='-I/usr/local/netcdf/include'
                0079     LIBS='-L/usr/local/netcdf/lib'
                0080 elif test -d /usr/local/include/netcdf.inc ; then
                0081     INCLUDES='-I/usr/local/include'
                0082     LIBS='-L/usr/local/lib64 -L/usr/local/lib'
                0083 fi
                0084 
328a12d6ae Jean*0085 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0086     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0087     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
15978f0412 Jean*0088     #- used for parallel (MPI) DIVA
328a12d6ae Jean*0089     MPIINCLUDEDIR="$MPI_INC_DIR"
15978f0412 Jean*0090    #MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
328a12d6ae Jean*0091 fi
                0092