1 |
#!/bin/bash |
#!/bin/bash |
2 |
# |
|
3 |
# $Header$ |
# $Header$ |
4 |
# $Name$ |
# $Name$ |
5 |
# |
|
6 |
|
|
7 |
# Tested with gcc-gfortran v4.1.x as shipped with Fedora Core 6,7,8 |
# Tested with gcc-gfortran v4.1.x as shipped with Fedora Core 6,7,8 |
8 |
# with gcc-gfortran v4.3.x as shipped with Fedora Core 9,10 |
# with gcc-gfortran v4.3.x as shipped with Fedora Core 9,10 |
11 |
# fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ', |
# fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ', |
12 |
# which results in run-time errors.) |
# which results in run-time errors.) |
13 |
|
|
14 |
|
# OpenMP : Tested on dickens with gcc-gfortran v4.3.2 as shipped with FC 10 |
15 |
|
#------- |
16 |
|
# run with OpenMP: needs to set environment var. OMP_NUM_THREADS |
17 |
|
# and generally, needs to increase the thread stack-size: |
18 |
|
# - sh,bash: |
19 |
|
# > export OMP_NUM_THREADS=2 |
20 |
|
# > export GOMP_STACKSIZE=400m |
21 |
|
# - csh,tcsh: |
22 |
|
# > setenv OMP_NUM_THREADS 2 |
23 |
|
# > setenv GOMP_STACKSIZE 400m |
24 |
|
#------- |
25 |
|
|
26 |
FC=gfortran |
FC=gfortran |
27 |
F90C=gfortran |
F90C=gfortran |
30 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
31 |
NOOPTFLAGS='-O0' |
NOOPTFLAGS='-O0' |
32 |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
33 |
|
OMPFLAG='-fopenmp' |
34 |
|
|
35 |
if test "x$DEVEL" != x ; then |
if test "x$DEVEL" != x ; then |
36 |
FFLAGS='-g -Wall -W -ffpe-trap=invalid,zero,overflow -fbounds-check' |
FFLAGS='-g -Wall -W -ffpe-trap=invalid,zero,overflow -fbounds-check' |
83 |
INCLUDES="-I${NETCDF_INCDIR}" |
INCLUDES="-I${NETCDF_INCDIR}" |
84 |
LIBDIR="${NETCDF_LIBDIR}" |
LIBDIR="${NETCDF_LIBDIR}" |
85 |
LIBS="-L${NETCDF_LIBDIR}" |
LIBS="-L${NETCDF_LIBDIR}" |
86 |
|
elif test -d /sopt/netcdf/netcdf3-gcc-serial; then |
87 |
|
INCLUDES='-I/sopt/netcdf/netcdf3-gcc-serial/include' |
88 |
|
LIBS='-L/sopt/netcdf/netcdf3-gcc-serial/lib' |
89 |
elif test -d /usr/include/netcdf-3 ; then |
elif test -d /usr/include/netcdf-3 ; then |
90 |
INCLUDES='-I/usr/include/netcdf-3' |
INCLUDES='-I/usr/include/netcdf-3' |
91 |
LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3' |
LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3' |