/[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.8 - (show annotations) (download)
Tue Aug 27 23:10:08 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64o, checkpoint65, checkpoint65a
Changes since 1.7: +13 -2 lines
set flag OMPFLAG to compile with OpenMP (multi-threads):
 tested on acesgrid with MPI (module pgi & openmpi) and without.

1 #!/bin/bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.7 2013/07/22 18:40:45 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 EXTENDED_SRC_FLAG='-Mextend'
56 GET_FC_VERSION="-V"
57 OMPFLAG='-mp'
58
59 NOOPTFLAGS='-O0'
60 NOOPTFILES=''
61
62 FFLAGS="$FFLAGS -byteswapio -Ktrap=fp"
63 #- might want to use '-r8' for fizhi pkg:
64 #FFLAGS="$FFLAGS -r8"
65
66 if test "x$IEEE" = x ; then #- with optimisation:
67 FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse'
68 #FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform"
69 else #- no optimisation + IEEE :
70 #FFLAGS="$FFLAGS -Mdclchk" #- pkg/zonal_filt does not pass with declaration-check
71 FOPTIM='-pc=64 -O0 -Kieee'
72 fi
73
74 INCLUDEDIRS=''
75 INCLUDES=''
76 LIBS=''
77
78 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
79 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
80 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
81 #- used for parallel (MPI) DIVA
82 MPIINCLUDEDIR="$MPI_INC_DIR"
83 #MPI_HEADER_FILES='mpif.h mpiof.h'
84 fi

  ViewVC Help
Powered by ViewVC 1.1.22