Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/linux_ia32_pgf77 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
2ff82eb834 Ed H*0001 #!/bin/bash
                0002 #
1545b7c5c2 Jean*0003 # Build options for portland-group compiler (pgi) on Linux IA32 platform
d568843b75 Jean*0004 
1545b7c5c2 Jean*0005 # Tested on author, pgi 6.1 on faulks (FC 6) using:
                0006 # (sh,bash)  export PGI=/usr/local/pkg/pgi/pgi-6.1-5
                0007 #            export PATH="$PGI/linux86/6.1/bin:$PATH"
                0008 
                0009 # MPI : Tested on aces cluster (pgi 5.2, FC 2), using:
                0010 #       module add mpich/pgi
                0011 #       export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-pgi/include'
                0012 #       export NETCDF_ROOT='/usr/local/pkg/pgi/pgi-5.2/linux86/5.2'
                0013 
                0014 if test "x$MPI" = xtrue ; then
                0015   CC='mpicc'
                0016   FC='mpif77'
                0017   F90C='mpif90'
                0018 else
                0019   CC='pgcc'
                0020   FC='pgf77'
                0021   F90C='pgf90'
                0022 fi
                0023 
                0024 DEFINES="-DWORDLENGTH=4"
                0025 if test "x$ALWAYS_USE_F90" = x1 ; then
                0026     FC=$F90C
                0027 else
                0028     DEFINES="$DEFINES -DNML_EXTENDED_F77"
                0029 fi
f8aa876f2e Ed H*0030 CPP='cpp -traditional -P'
d568843b75 Jean*0031 EXTENDED_SRC_FLAG='-Mextend'
7a8d0b199d Jean*0032 GET_FC_VERSION="-V"
f8aa876f2e Ed H*0033 
1545b7c5c2 Jean*0034 NOOPTFLAGS='-O0'
                0035 NOOPTFILES=''
                0036 
                0037 FFLAGS="$FFLAGS -byteswapio"
                0038 if test "x$IEEE" = x ; then     #- with optimisation:
                0039     FFLAGS="$FFLAGS -Mnodclchk"
                0040    #FOPTIM='-tp p6 -v -O2 -Munroll'
0f6386062b Cons*0041     FOPTIM='-fastsse -Mvect=cachesize:524288,transform'
1545b7c5c2 Jean*0042 else                            #- no optimisation + IEEE :
                0043     FOPTIM='-O0 -Mscalarsse -Mcache_align -Mnoflushz -Kieee'
f8aa876f2e Ed H*0044 fi
d568843b75 Jean*0045 #- might want to use '-r8' for fizhi pkg:
                0046 #FFLAGS="$FFLAGS -r8"
f10e3a8bdd Ed H*0047 
1545b7c5c2 Jean*0048 F90FLAGS=$FFLAGS
                0049 F90OPTIM=$FOPTIM
                0050 CFLAGS='-O0'
                0051 
                0052 INCLUDEDIRS=''
                0053 INCLUDES=''
                0054 LIBS=''
                0055 
                0056 if [ "x$NETCDF_ROOT" != x ] ; then
                0057     INCLUDEDIR="${NETCDF_ROOT}/include"
                0058     INCLUDES="-I${NETCDF_ROOT}/include"
                0059     LIBDIR="${NETCDF_ROOT}/lib"
                0060     LIBS="-L${NETCDF_ROOT}/lib"
                0061 elif [ "x$NETCDF_HOME" != x ]; then
                0062     INCLUDEDIR="${NETCDF_HOME}/include"
                0063     INCLUDES="-I${NETCDF_HOME}/include"
                0064     LIBDIR="${NETCDF_HOME}/lib"
                0065     LIBS="-L${NETCDF_HOME}/lib"
                0066 fi
                0067 
                0068 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
                0069     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
                0070     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
15978f0412 Jean*0071     #- used for parallel (MPI) DIVA
1545b7c5c2 Jean*0072     MPIINCLUDEDIR="$MPI_INC_DIR"
15978f0412 Jean*0073    #MPI_HEADER_FILES='mpif.h mpiof.h'
1545b7c5c2 Jean*0074 fi