Warning, /tools/build_options/unsupported/linux_ia32_sunf90+mpi_generic 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 #
0003 # Build options for the Sun fortran compiler with a generic MPI
0004 # DON'T FORGET to set environment variable MPI_INC_DIR to the include
0005 # directory of your MPI implementation
6144427bd2 Jean*0006
8cfe52d849 Cons*0007 FC=${FC:=mpif77}
0008 F90C=${F90C:=mpif90}
0009 CC=${CC:=mpicc}
0010 LINK=${F90C}
0011 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
0012 DEFINES='-DWORDLENGTH=4'
0013 CPP='cpp -traditional -P'
0014 NOOPTFLAGS='-O0 -g -m32 -xfilebyteorder=big16:%all -u -r8const'
0015 NOOPTFILES=''
0016 EXTENDED_SRC_FLAG='-e'
0017 OMPFLAG='-xopenmp'
0018
0019 if test "x$DEVEL" != x ; then
0020 FFLAGS='-xfilebyteorder=big16:%all -u -r8const -g -xs -C -xcommonchk -xcheck=init_local -fpover'
0021 else
0022 FFLAGS='-xfilebyteorder=big16:%all -u -r8const'
0023 fi
0024
0025 if test "x$IEEE" = x ; then
0026 # No need for IEEE-754
0027 FOPTIM='-fast -m32 -xvector=simd -xpad=local'
0028 LIBS="$LIBS -lmopt"
0029 else
0030 # Try to follow IEEE-754
0031 # FOPTIM='-O0 -m32'
0032 FOPTIM='-fast -m32 -xpad=local -fsimple=1'
0033 fi
0034 F90FLAGS=$FFLAGS
0035 F90OPTIM=$FOPTIM
0036 CFLAGS='-O3 -m32'
0037
0038 if [ "x$NETCDF_ROOT" != x ] ; then
0039 INCLUDEDIR="${NETCDF_ROOT}/include"
0040 INCLUDES="-I${NETCDF_ROOT}/include"
0041 LIBDIR="${NETCDF_ROOT}/lib"
0042 LIBS="-L${NETCDF_ROOT}/lib"
0043 elif [ "x$NETCDF_HOME" != x ]; then
0044 INCLUDEDIR="${NETCDF_HOME}/include"
0045 INCLUDES="-I${NETCDF_HOME}/include"
0046 LIBDIR="${NETCDF_HOME}/lib"
0047 LIBS="-L${NETCDF_HOME}/lib"
0048 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
0049 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
0050 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
0051 INCLUDEDIR="${NETCDF_INC}"
0052 INCLUDES="-I${NETCDF_INC}"
0053 LIBDIR="${NETCDF_LIB}"
0054 LIBS="-L${NETCDF_LIB}"
0055 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
0056 INCLUDEDIR="${NETCDF_INCDIR}"
0057 INCLUDES="-I${NETCDF_INCDIR}"
0058 LIBDIR="${NETCDF_LIBDIR}"
0059 LIBS="-L${NETCDF_LIBDIR}"
0060 elif test -d /usr/include/netcdf-3 ; then
0061 INCLUDES='-I/usr/include/netcdf-3'
0062 LIBS='-L/usr/lib/netcdf-3'
0063 elif test -d /usr/include/netcdf ; then
0064 INCLUDES='-I/usr/include/netcdf'
0065 elif test -d /usr/local/netcdf ; then
0066 INCLUDES='-I/usr/local/netcdf/include'
0067 LIBS='-L/usr/local/netcdf/lib'
0068 elif test -d /usr/local/include/netcdf.inc ; then
0069 INCLUDES='-I/usr/local/include'
0070 LIBS='-L/usr/local/lib'
0071 fi
0072
0073 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
0074 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
0075 MPIINCLUDEDIR="$MPI_INC_DIR"
0076 MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
0077 MPI_HEADER_FILES_INC=${MPI_HEADER_FILES_INC:='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'}
0078