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

Contents of /MITgcm/tools/build_options/linux_amd64_pathf90

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


Revision 1.6 - (show annotations) (download)
Wed Aug 10 23:27:21 2011 UTC (12 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.5: +8 -5 lines
use "LINK=..." instead of "LD=..." (since genmake2 ignores $LD)

1 #! /usr/bin/env bash
2 #
3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_pathf90,v 1.5 2011/08/10 00:35:36 jmc Exp $
4 # $Name: $
5 #
6 # Build options for PathScale (EKOPATH) Compiler on Linux x86-64
7 # first version tested on Fedore Core 3 x86-64 Opteron (Linux batsi)
8 # updated and tested on acesgrid (Fedora Core 15), using:
9 # module load ekopath (Version 4.0.10)
10 #
11 #-------
12 # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
13 # and generally, needs to increase the thread stack-size:
14 # - sh,bash:
15 # > export OMP_NUM_THREADS=2
16 # > export PSC_OMP_STACK_SIZE=400m
17 # - csh,tcsh:
18 # > setenv OMP_NUM_THREADS 2
19 # > setenv PSC_OMP_STACK_SIZE 400m
20 #-------
21
22 CC=pathcc
23 FC=pathf90
24 LINK=pathf90
25
26 DEFINES='-DWORDLENGTH=4'
27 CPP='cpp -traditional -P'
28 GET_FC_VERSION="-v"
29 OMPFLAG='-openmp'
30
31 NOOPTFLAGS='-O0 -g'
32 NOOPTFILES=''
33
34 if test "x$DEVEL" != x ; then
35 FFLAGS='-m64 -convert big_endian -fPIC -ffortran-bounds-check -trapuv -g'
36 else
37 FFLAGS='-m64 -convert big_endian -fPIC'
38 fi
39
40 if test "x$IEEE" = x ; then
41 # No need for IEEE-754
42 FOPTIM='-Ofast -LNO:fusion=2 -funsafe-math-optimizations'
43 else
44 # Try to follow IEEE-754
45 FOPTIM='-O0 -OPT:roundoff=0:IEEE_arithmetic=1 -fmath-errno -fno-fast-math'
46 fi
47
48 F90FLAGS=$FFLAGS
49 F90OPTIM=$FOPTIM
50 CFLAGS='-O0 -m64 -fPIC'
51 GSLLIB='-lgsl -lgslcblas'
52
53 if [ "x$NETCDF_ROOT" != x ] ; then
54 INCLUDEDIR="${NETCDF_ROOT}/include"
55 INCLUDES="-I${NETCDF_ROOT}/include"
56 LIBDIR="${NETCDF_ROOT}/lib"
57 LIBS="-L${NETCDF_ROOT}/lib"
58 elif [ "x$NETCDF_HOME" != x ]; then
59 INCLUDEDIR="${NETCDF_HOME}/include"
60 INCLUDES="-I${NETCDF_HOME}/include"
61 LIBDIR="${NETCDF_HOME}/lib"
62 LIBS="-L${NETCDF_HOME}/lib"
63 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
64 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
65 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
66 INCLUDEDIR="${NETCDF_INC}"
67 INCLUDES="-I${NETCDF_INC}"
68 LIBDIR="${NETCDF_LIB}"
69 LIBS="-L${NETCDF_LIB}"
70 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
71 INCLUDEDIR="${NETCDF_INCDIR}"
72 INCLUDES="-I${NETCDF_INCDIR}"
73 LIBDIR="${NETCDF_LIBDIR}"
74 LIBS="-L${NETCDF_LIBDIR}"
75 elif test -d /usr/include/netcdf-3 ; then
76 INCLUDES='-I/usr/include/netcdf-3'
77 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
78 elif test -d /usr/include/netcdf ; then
79 INCLUDES='-I/usr/include/netcdf'
80 elif test -d /usr/local/netcdf ; then
81 INCLUDES='-I/usr/local/netcdf/include'
82 LIBS='-L/usr/local/netcdf/lib'
83 elif test -d /usr/local/include/netcdf.inc ; then
84 INCLUDES='-I/usr/local/include'
85 LIBS='-L/usr/local/lib64'
86 fi

  ViewVC Help
Powered by ViewVC 1.1.22