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

Annotation of /MITgcm/tools/build_options/linux_ia32_pgf77

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


Revision 1.10 - (hide annotations) (download)
Wed Sep 7 20:05:02 2011 UTC (12 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64i, checkpoint64h, checkpoint64j, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63c, checkpoint64
Changes since 1.9: +63 -11 lines
merge linux_ia32_pgf77+mpi, +mpi_aces and +authors_fc5 versions into
 standard optfile "linux_ia32_pgf77"

1 edhill 1.1 #!/bin/bash
2     #
3 jmc 1.10 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_pgf77+authors_fc5,v 1.8 2010/12/19 22:42:23 jmc Exp $
4 jmc 1.8 # $Name: $
5 edhill 1.1
6 jmc 1.10 # Build options for portland-group compiler (pgi) on Linux IA32 platform
7 jmc 1.8
8 jmc 1.10 # 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 edhill 1.4 CPP='cpp -traditional -P'
34 jmc 1.8 EXTENDED_SRC_FLAG='-Mextend'
35 jmc 1.9 GET_FC_VERSION="-V"
36 edhill 1.4
37 jmc 1.10 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 ce107 1.7 FOPTIM='-fastsse -Mvect=cachesize:524288,transform'
45 jmc 1.10 else #- no optimisation + IEEE :
46     FOPTIM='-O0 -Mscalarsse -Mcache_align -Mnoflushz -Kieee'
47 edhill 1.4 fi
48 jmc 1.8 #- might want to use '-r8' for fizhi pkg:
49     #FFLAGS="$FFLAGS -r8"
50 edhill 1.1
51 jmc 1.10 F90FLAGS=$FFLAGS
52     F90OPTIM=$FOPTIM
53     CFLAGS='-O0'
54    
55     INCLUDEDIRS=''
56     INCLUDES=''
57     LIBS=''
58    
59     if [ "x$NETCDF_ROOT" != x ] ; then
60     INCLUDEDIR="${NETCDF_ROOT}/include"
61     INCLUDES="-I${NETCDF_ROOT}/include"
62     LIBDIR="${NETCDF_ROOT}/lib"
63     LIBS="-L${NETCDF_ROOT}/lib"
64     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     MPIINCLUDEDIR="$MPI_INC_DIR"
75     MPI_HEADER_FILES='mpif.h mpiof.h'
76     MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'
77     fi

  ViewVC Help
Powered by ViewVC 1.1.22