/[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.5 - (show annotations) (download)
Wed Aug 10 00:35:36 2011 UTC (12 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.4: +20 -8 lines
more standard version to work on new acesgrid cluster:
(remove MAKEDEPEND spec, add OpenMP options, remove conflicting -Ofast
 in IEEE setting)

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

  ViewVC Help
Powered by ViewVC 1.1.22