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

Annotation of /MITgcm/tools/build_options/linux_amd64_pgf77

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


Revision 1.8 - (hide annotations) (download)
Tue Aug 27 23:10:08 2013 UTC (10 years, 9 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 ce107 1.1 #!/bin/bash
2     #
3 jmc 1.8 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.7 2013/07/22 18:40:45 jmc Exp $
4 ce107 1.1 # $Name: $
5     #
6 jmc 1.3 # Build options for PGI compiler on Linux AMD64 platform
7 ce107 1.1 #
8 jmc 1.3 # 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 jmc 1.4 #
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 jmc 1.8 # or with openmpi: (support also OpenMP to run mpi+mth)
25 jmc 1.4 # module load openmpi
26 jmc 1.8
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 jmc 1.3 #-------
37 ce107 1.1
38 jmc 1.4 if test "x$MPI" = xtrue ; then
39     CC=mpicc
40     FC=mpif77
41 jmc 1.5 F90C=mpif90
42 jmc 1.4 else
43     CC=pgcc
44     FC=pgf77
45 jmc 1.5 F90C=pgf90
46 jmc 1.4 fi
47 jmc 1.2
48 jmc 1.5 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 jmc 1.3 CPP='cpp -traditional -P'
55 jmc 1.2 EXTENDED_SRC_FLAG='-Mextend'
56 jmc 1.3 GET_FC_VERSION="-V"
57 jmc 1.8 OMPFLAG='-mp'
58 jmc 1.2
59 ce107 1.1 NOOPTFLAGS='-O0'
60 jmc 1.4 NOOPTFILES=''
61    
62     FFLAGS="$FFLAGS -byteswapio -Ktrap=fp"
63     #- might want to use '-r8' for fizhi pkg:
64     #FFLAGS="$FFLAGS -r8"
65 jmc 1.2
66 jmc 1.4 if test "x$IEEE" = x ; then #- with optimisation:
67 jmc 1.3 FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse'
68     #FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform"
69 jmc 1.4 else #- no optimisation + IEEE :
70     #FFLAGS="$FFLAGS -Mdclchk" #- pkg/zonal_filt does not pass with declaration-check
71 jmc 1.3 FOPTIM='-pc=64 -O0 -Kieee'
72 ce107 1.1 fi
73    
74 jmc 1.4 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 jmc 1.7 #- used for parallel (MPI) DIVA
82 jmc 1.4 MPIINCLUDEDIR="$MPI_INC_DIR"
83 jmc 1.7 #MPI_HEADER_FILES='mpif.h mpiof.h'
84 jmc 1.4 fi

  ViewVC Help
Powered by ViewVC 1.1.22