/[MITgcm]/MITgcm/tools/build_options/linux_ia32_pgf77
ViewVC logotype

Diff of /MITgcm/tools/build_options/linux_ia32_pgf77

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by edhill, Mon Sep 29 16:15:24 2003 UTC revision 1.11 by jmc, Mon Jul 22 18:40:45 2013 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  #
3  #  $Header$  # $Header$
4  #  # $Name$
5    
6    # Build options for portland-group compiler (pgi) on Linux IA32 platform
7    
8    # Tested on author, pgi 6.1 on faulks (FC 6) using:
9    # (sh,bash)  export PGI=/usr/local/pkg/pgi/pgi-6.1-5
10    #            export PATH="$PGI/linux86/6.1/bin:$PATH"
11    
12    # MPI : Tested on aces cluster (pgi 5.2, FC 2), using:
13    #       module add mpich/pgi
14    #       export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-pgi/include'
15    #       export NETCDF_ROOT='/usr/local/pkg/pgi/pgi-5.2/linux86/5.2'
16    
17    if test "x$MPI" = xtrue ; then
18      CC='mpicc'
19      FC='mpif77'
20      F90C='mpif90'
21    else
22      CC='pgcc'
23      FC='pgf77'
24      F90C='pgf90'
25    fi
26    
27    DEFINES="-DWORDLENGTH=4"
28    if test "x$ALWAYS_USE_F90" = x1 ; then
29        FC=$F90C
30    else
31        DEFINES="$DEFINES -DNML_EXTENDED_F77"
32    fi
33    CPP='cpp -traditional -P'
34    EXTENDED_SRC_FLAG='-Mextend'
35    GET_FC_VERSION="-V"
36    
37    NOOPTFLAGS='-O0'
38    NOOPTFILES=''
39    
40    FFLAGS="$FFLAGS -byteswapio"
41    if test "x$IEEE" = x ; then     #- with optimisation:
42        FFLAGS="$FFLAGS -Mnodclchk"
43       #FOPTIM='-tp p6 -v -O2 -Munroll'
44        FOPTIM='-fastsse -Mvect=cachesize:524288,transform'
45    else                            #- no optimisation + IEEE :
46        FOPTIM='-O0 -Mscalarsse -Mcache_align -Mnoflushz -Kieee'
47    fi
48    #- might want to use '-r8' for fizhi pkg:
49    #FFLAGS="$FFLAGS -r8"
50    
51    F90FLAGS=$FFLAGS
52    F90OPTIM=$FOPTIM
53    CFLAGS='-O0'
54    
55    INCLUDEDIRS=''
56    INCLUDES=''
57    LIBS=''
58    
59  DEFINES='-DWORDLENGTH=4'  if [ "x$NETCDF_ROOT" != x ] ; then
60  LN='/bin/ln -s'      INCLUDEDIR="${NETCDF_ROOT}/include"
61  CPP='/lib/cpp -traditional -P'      INCLUDES="-I${NETCDF_ROOT}/include"
62  FC='pgf77'      LIBDIR="${NETCDF_ROOT}/lib"
63  FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend'      LIBS="-L${NETCDF_ROOT}/lib"
64  FOPTIM='-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee'  elif [ "x$NETCDF_HOME" != x ]; then
65        INCLUDEDIR="${NETCDF_HOME}/include"
66        INCLUDES="-I${NETCDF_HOME}/include"
67        LIBDIR="${NETCDF_HOME}/lib"
68        LIBS="-L${NETCDF_HOME}/lib"
69    fi
70    
71    if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
72        INCLUDES="$INCLUDES -I$MPI_INC_DIR"
73        INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
74        #- used for parallel (MPI) DIVA
75        MPIINCLUDEDIR="$MPI_INC_DIR"
76       #MPI_HEADER_FILES='mpif.h mpiof.h'
77    fi

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22