6 |
# Build options for PGI compiler on Linux AMD64 platform |
# 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: |
# tested with PGI version 10.9 on baudelaire (Linux 2.6.34.7-61.fc13.x86_64), using: |
|
#------- |
|
9 |
# - sh,bash: |
# - sh,bash: |
10 |
# > export PGI=/srv/software/pgi/pgi-10.9 |
# > export PGI=/srv/software/pgi/pgi-10.9 |
11 |
# > export PATH=$PGI/linux86-64/10.9/bin:$PATH |
# > export PATH=$PGI/linux86-64/10.9/bin:$PATH |
16 |
# > set path=($PGI/linux86-64/10.9/bin $path) |
# > set path=($PGI/linux86-64/10.9/bin $path) |
17 |
# > setenv MANPATH "$MANPATH":$PGI/linux86-64/10.9/man |
# > setenv MANPATH "$MANPATH":$PGI/linux86-64/10.9/man |
18 |
# > setenv LM_LICENSE_FILE $PGI/license.dat |
# > 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: |
25 |
|
# module load openmpi |
26 |
#------- |
#------- |
27 |
|
|
28 |
FC=pgf77 |
if test "x$MPI" = xtrue ; then |
29 |
CC=pgcc |
CC=mpicc |
30 |
|
FC=mpif77 |
31 |
|
LINK=mpif77 |
32 |
|
else |
33 |
|
CC=pgcc |
34 |
|
FC=pgf77 |
35 |
|
fi |
36 |
|
|
37 |
DEFINES='-DWORDLENGTH=4 -DNML_EXTENDED_F77' |
DEFINES='-DWORDLENGTH=4 -DNML_EXTENDED_F77' |
38 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
40 |
GET_FC_VERSION="-V" |
GET_FC_VERSION="-V" |
41 |
|
|
42 |
NOOPTFLAGS='-O0' |
NOOPTFLAGS='-O0' |
43 |
|
NOOPTFILES='' |
44 |
|
|
45 |
|
FFLAGS="$FFLAGS -byteswapio -Ktrap=fp" |
46 |
|
#- might want to use '-r8' for fizhi pkg: |
47 |
|
#FFLAGS="$FFLAGS -r8" |
48 |
|
|
49 |
if test "x$IEEE" = x ; then |
if test "x$IEEE" = x ; then #- with optimisation: |
|
# No need for IEEE-754 |
|
|
FFLAGS="$FFLAGS -byteswapio -Ktrap=fp" |
|
50 |
FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse' |
FOPTIM='-tp k8-64 -pc=64 -O2 -Mvect=sse' |
51 |
#FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform" |
#FOPTIM="$FOPTIM -fastsse -O3 -Msmart -Mvect=cachesize:1048576,transform" |
52 |
else |
else #- no optimisation + IEEE : |
53 |
# Try to follow IEEE-754 |
#FFLAGS="$FFLAGS -Mdclchk" #- pkg/zonal_filt does not pass with declaration-check |
|
FFLAGS="$FFLAGS -byteswapio -Ktrap=fp -Mdclchk" |
|
54 |
FOPTIM='-pc=64 -O0 -Kieee' |
FOPTIM='-pc=64 -O0 -Kieee' |
55 |
fi |
fi |
|
#- might want to use '-r8' for fizhi pkg: |
|
|
#FFLAGS="$FFLAGS -r8" |
|
56 |
|
|
57 |
|
INCLUDEDIRS='' |
58 |
|
INCLUDES='' |
59 |
|
LIBS='' |
60 |
|
|
61 |
|
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
62 |
|
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
63 |
|
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
64 |
|
MPIINCLUDEDIR="$MPI_INC_DIR" |
65 |
|
MPI_HEADER_FILES='mpif.h mpiof.h' |
66 |
|
MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' |
67 |
|
fi |