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

Contents of /MITgcm/tools/build_options/linux_amd64_pgf77

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


Revision 1.9 - (show annotations) (download)
Fri Aug 8 23:02:44 2014 UTC (9 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.8: +5 -1 lines
- set F90FLAGS to FFLAGS and F90OPTIM to FOPTIM (needed to compile
   pkg/atm_phys which is used in experiment atm_gray)
- set also F90FIXEDFORMAT (but not sure when this is necessary)

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.8 2013/08/27 23:10:08 jmc Exp $
4 # $Name: $
5 #
6 # Build options for PGI compiler on Linux AMD64 platform
7 #
8 # tested with PGI version 10.9 on baudelaire (Linux 2.6.34.7-61.fc13.x86_64), using:
9 # - sh,bash:
10 # > export PGI=/srv/software/pgi/pgi-10.9
11 # > export PATH=$PGI/linux86-64/10.9/bin:$PATH
12 # > export MANPATH=$MANPATH:$PGI/linux86-64/10.9/man
13 # > export LM_LICENSE_FILE=$PGI/license.dat
14 # - csh,tcsh:
15 # > setenv PGI /srv/software/pgi/pgi-10.9
16 # > set path=($PGI/linux86-64/10.9/bin $path)
17 # > setenv MANPATH "$MANPATH":$PGI/linux86-64/10.9/man
18 # > setenv LM_LICENSE_FILE $PGI/license.dat
19 #
20 # and tested also with MPI on acesgrid (Fedora Core 15), using:
21 # module load pgi (Version 11.7)
22 # and with mpich2:
23 # module load mvapich2
24 # or with openmpi: (support also OpenMP to run mpi+mth)
25 # module load openmpi
26
27 #-------
28 # compile (genmake2 -omp) and run with OpenMP: needs to set environment var.
29 # OMP_NUM_THREADS and generally, needs to increase the thread stack-size:
30 # - sh,bash:
31 # > export OMP_NUM_THREADS=2
32 # > export OMP_STACKSIZE=400m
33 # - csh,tcsh:
34 # > setenv OMP_NUM_THREADS 2
35 # > setenv OMP_STACKSIZE 400m
36 #-------
37
38 if test "x$MPI" = xtrue ; then
39 CC=mpicc
40 FC=mpif77
41 F90C=mpif90
42 else
43 CC=pgcc
44 FC=pgf77
45 F90C=pgf90
46 fi
47
48 DEFINES="-DWORDLENGTH=4"
49 if test "x$ALWAYS_USE_F90" = x1 ; then
50 FC=$F90C
51 else
52 DEFINES="$DEFINES -DNML_EXTENDED_F77"
53 fi
54 CPP='cpp -traditional -P'
55 F90FIXEDFORMAT='-Mfixed'
56 EXTENDED_SRC_FLAG='-Mextend'
57 GET_FC_VERSION="-V"
58 OMPFLAG='-mp'
59
60 NOOPTFLAGS='-O0'
61 NOOPTFILES=''
62
63 FFLAGS="$FFLAGS -byteswapio -Ktrap=fp"
64 #- might want to use '-r8' for fizhi pkg:
65 #FFLAGS="$FFLAGS -r8"
66
67 if test "x$IEEE" = x ; then #- with optimisation:
68 FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse'
69 #FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform"
70 else #- no optimisation + IEEE :
71 #FFLAGS="$FFLAGS -Mdclchk" #- pkg/zonal_filt does not pass with declaration-check
72 FOPTIM='-pc=64 -O0 -Kieee'
73 fi
74
75 F90FLAGS=$FFLAGS
76 F90OPTIM=$FOPTIM
77
78 INCLUDEDIRS=''
79 INCLUDES=''
80 LIBS=''
81
82 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
83 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
84 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
85 #- used for parallel (MPI) DIVA
86 MPIINCLUDEDIR="$MPI_INC_DIR"
87 #MPI_HEADER_FILES='mpif.h mpiof.h'
88 fi

  ViewVC Help
Powered by ViewVC 1.1.22