/[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.9 - (hide annotations) (download)
Fri Aug 8 23:02:44 2014 UTC (9 years, 9 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 ce107 1.1 #!/bin/bash
2     #
3 jmc 1.9 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pgf77,v 1.8 2013/08/27 23:10:08 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.9 F90FIXEDFORMAT='-Mfixed'
56 jmc 1.2 EXTENDED_SRC_FLAG='-Mextend'
57 jmc 1.3 GET_FC_VERSION="-V"
58 jmc 1.8 OMPFLAG='-mp'
59 jmc 1.2
60 ce107 1.1 NOOPTFLAGS='-O0'
61 jmc 1.4 NOOPTFILES=''
62    
63     FFLAGS="$FFLAGS -byteswapio -Ktrap=fp"
64     #- might want to use '-r8' for fizhi pkg:
65     #FFLAGS="$FFLAGS -r8"
66 jmc 1.2
67 jmc 1.4 if test "x$IEEE" = x ; then #- with optimisation:
68 jmc 1.3 FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse'
69     #FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform"
70 jmc 1.4 else #- no optimisation + IEEE :
71     #FFLAGS="$FFLAGS -Mdclchk" #- pkg/zonal_filt does not pass with declaration-check
72 jmc 1.3 FOPTIM='-pc=64 -O0 -Kieee'
73 ce107 1.1 fi
74    
75 jmc 1.9 F90FLAGS=$FFLAGS
76     F90OPTIM=$FOPTIM
77    
78 jmc 1.4 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 jmc 1.7 #- used for parallel (MPI) DIVA
86 jmc 1.4 MPIINCLUDEDIR="$MPI_INC_DIR"
87 jmc 1.7 #MPI_HEADER_FILES='mpif.h mpiof.h'
88 jmc 1.4 fi

  ViewVC Help
Powered by ViewVC 1.1.22