[Dart-dev] [4621] DART/trunk/mkmf: Made the NETCDF variable "mandatory".
nancy at ucar.edu
nancy at ucar.edu
Tue Jan 4 10:35:57 MST 2011
Revision: 4621
Author: thoar
Date: 2011-01-04 10:35:57 -0700 (Tue, 04 Jan 2011)
Log Message:
-----------
Made the NETCDF variable "mandatory".
The NETCDF setting is commented out (in most cases) so that
the user MUST have the right setting as an environment variable
or MUST edit the template file.
If the default was to have bounds checking ON, it
is now OFF by default and an example of how to turn
it on is shown as a comment at the end of the file.
Most other changes are simply beautifying.
Modified Paths:
--------------
DART/trunk/mkmf/mkmf.template.Hamburg
DART/trunk/mkmf/mkmf.template.absoft.osx
DART/trunk/mkmf/mkmf.template.g95
DART/trunk/mkmf/mkmf.template.gfortran
DART/trunk/mkmf/mkmf.template.intel.linux
DART/trunk/mkmf/mkmf.template.intel.osx
DART/trunk/mkmf/mkmf.template.lahey.linux
DART/trunk/mkmf/mkmf.template.nec
DART/trunk/mkmf/mkmf.template.pathscale.linux
DART/trunk/mkmf/mkmf.template.pgi.cray
DART/trunk/mkmf/mkmf.template.pgi.linux
DART/trunk/mkmf/mkmf.template.pgi.osx
DART/trunk/mkmf/mkmf.template.sgi.altix
DART/trunk/mkmf/mkmf.template.sgi.mips
DART/trunk/mkmf/mkmf.template.xlf.aix
DART/trunk/mkmf/mkmf.template.xlf.osx
-------------- next part --------------
Modified: DART/trunk/mkmf/mkmf.template.Hamburg
===================================================================
--- DART/trunk/mkmf/mkmf.template.Hamburg 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.Hamburg 2011-01-04 17:35:57 UTC (rev 4621)
@@ -80,11 +80,12 @@
FC = ifort
LD = ifort
-# this generally needs to be customized for your machine:
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
NETCDF = /sw/etch-ia32/netcdf-3.6.2-intel
INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
- FFLAGS = -O2 -fpe0 -vec-report0 $(INCS)
+FFLAGS = -O2 -fpe0 -vec-report0 $(INCS)
LDFLAGS = $(FFLAGS) $(LIBS) -static
Modified: DART/trunk/mkmf/mkmf.template.absoft.osx
===================================================================
--- DART/trunk/mkmf/mkmf.template.absoft.osx 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.absoft.osx 2011-01-04 17:35:57 UTC (rev 4621)
@@ -75,11 +75,17 @@
MPILD = mpif90
FC = f90
LD = f90
-NETCDF = /Users/thoar/Absoft
-INCS = ${NETCDF}/include
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /Users/thoar/Absoft
+
+INCS = ${NETCDF}/include
LIBS = -L${NETCDF}/lib -lnetcdf
- FFLAGS = -YEXT_NAMES=LCS -YEXT_SFX=_ -en -altiVec -O0 -Rb -Rc -g -p$(INCS)
+FFLAGS = -YEXT_NAMES=LCS -YEXT_SFX=_ -en -altiVec -O0 -Rb -Rc -g -p$(INCS)
+LDFLAGS = -unixlib $(FFLAGS) $(LIBS)
+
+
#FFLAGS = -YEXT_NAMES=LCS -YEXT_SFX=_ -en -altiVec -O0 -Rb -Rc -p$(INCS)
#FFLAGS = -YEXT_NAMES=LCS -YEXT_SFX=_ -en -altiVec -O0 -N113 -f free -Rb -Rc -p$(INCS) -I$(INCS)
#FFLAGS = -YEXT_NAMES=LCS -YEXT_SFX=_ -en -altiVec -O0 -Rb -Rc -N26 -p$(INCS) -I$(INCS)
-LDFLAGS = -unixlib $(FFLAGS) $(LIBS)
Modified: DART/trunk/mkmf/mkmf.template.g95
===================================================================
--- DART/trunk/mkmf/mkmf.template.g95 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.g95 2011-01-04 17:35:57 UTC (rev 4621)
@@ -65,9 +65,13 @@
MPILD = mpif90
FC = g95
LD = g95
-NETCDF = /usr/local/netcdf
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /usr/local/netcdf
+
INCS = -I${NETCDF}/include
-FFLAGS = -O2 $(INCS)
LIBS = -L${NETCDF}/lib -lnetcdf
+FFLAGS = -O2 $(INCS)
LDFLAGS = $(FFLAGS) $(LIBS)
Modified: DART/trunk/mkmf/mkmf.template.gfortran
===================================================================
--- DART/trunk/mkmf/mkmf.template.gfortran 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.gfortran 2011-01-04 17:35:57 UTC (rev 4621)
@@ -32,6 +32,10 @@
# successfully compiled other fortran code with that compiler, but we have
# not tried it with DART yet.)
#
+# NOTE: The 4.1.2 compiler made the HORRIBLE choice of changing the default
+# record header size for unformatted writes such that it was incompatible
+# with every existing binary file. Specifying -frecord-marker=4 is crucial
+# to have any hope of success.
#
# 2. The netCDF software library package. See:
# http://www.unidata.ucar.edu/software/netcdf
@@ -65,6 +69,8 @@
#
# -fdefault-real-8 force all real variables to be real*8.
#
+# -ffpe-trap=invalid,overflow,precision,denormal,underflow
+#
# Comment about netcdf libraries:
# We call NetCDF from Fortran 90, so we need the fortran interface
# library. In some versions of netcdf (e.g. 4.x), the fortran
@@ -79,9 +85,15 @@
MPILD = mpif90
FC = gfortran
LD = gfortran
-NETCDF = /usr/local
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /usr/local
+
INCS = -I${NETCDF}/include
-FFLAGS = -O2 $(INCS) -ffree-line-length-none
LIBS = -L${NETCDF}/lib -lnetcdff -lnetcdf
+FFLAGS = -O2 $(INCS) -ffree-line-length-none
LDFLAGS = $(FFLAGS) $(LIBS)
+#FFLAGS = -O0 -fbounds-check -frecord-marker=4 -ffpe-trap=invalid $(INCS)
+
Modified: DART/trunk/mkmf/mkmf.template.intel.linux
===================================================================
--- DART/trunk/mkmf/mkmf.template.intel.linux 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.intel.linux 2011-01-04 17:35:57 UTC (rev 4621)
@@ -90,8 +90,9 @@
FC = ifort
LD = ifort
-# this will probably need to be customized for your machine.
-#NETCDF = /contrib/netcdf
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /contrib/netcdf
INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
@@ -99,5 +100,10 @@
LDFLAGS = $(FFLAGS) $(LIBS)
# for development or debugging, use this instead:
-#FFLAGS = -C -check noarg_temp_created -pc64 -fpe0 -mp -O0 $(INCS)
+# FFLAGS = -C -check noarg_temp_created -fpe0 -mp -O0 -g -convert big_endian $(INCS)
+# FFLAGS = -C -check noarg_temp_created -fpe0 -vec-report0 -fp-model precise -O0 -g $(INCS)
+# FFLAGS = -fpe0 -vec-report0 -O3 -g $(INCS)
+# -warn argument_checking,declarations,uncalled,uninitialized,unused \
+# Some optimized (BLAS, LAPACK) libraries are available with:
+# LIBS = -L$(NETCDF)/lib -lnetcdf -lmkl -lmkl_lapack -lguide -lpthread
Modified: DART/trunk/mkmf/mkmf.template.intel.osx
===================================================================
--- DART/trunk/mkmf/mkmf.template.intel.osx 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.intel.osx 2011-01-04 17:35:57 UTC (rev 4621)
@@ -33,13 +33,19 @@
MPILD = mpif90
FC = ifort
LD = ifort
-NETCDF = /usr/local
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /usr/local
+
INCS = -I${NETCDF}/include
LIBS = -L${NETCDF}/lib -lnetcdf
+
# for Intel 9.x:
-FFLAGS = $(INCS) -O2
+FFLAGS = $(INCS) -O2
LDFLAGS = $(INCS) -Wl,-stack_size,10000000 $(LIBS)
+
# for Intel 10.x:
-#FFLAGS = $(INCS) -O2 -m64 -heap-arrays
+#FFLAGS = $(INCS) -O2 -m64 -heap-arrays -vec-report0 -fpe0
#LDFLAGS = $(INCS) $(LIBS)
Modified: DART/trunk/mkmf/mkmf.template.lahey.linux
===================================================================
--- DART/trunk/mkmf/mkmf.template.lahey.linux 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.lahey.linux 2011-01-04 17:35:57 UTC (rev 4621)
@@ -79,10 +79,14 @@
MPILD = mpif90
FC = lf95
LD = lf95
-NETCDF = /contrib/netcdf/3.5.1-lahey-6.2-32
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /contrib/netcdf/3.5.1-lahey-6.2-32
+
INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
-FFLAGS = -Wa,--32 --trap --wide --o2 $(INCS)
+FFLAGS = -Wa,--32 --trap --wide --o2 $(INCS)
LDFLAGS = $(FFLAGS) $(LIBS)
# for debugging or development, here are some suggested flags:
Modified: DART/trunk/mkmf/mkmf.template.nec
===================================================================
--- DART/trunk/mkmf/mkmf.template.nec 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.nec 2011-01-04 17:35:57 UTC (rev 4621)
@@ -22,7 +22,11 @@
FC = sxmpif90
LD = sxmpif90
CC = sxmpic++
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
NETCDF = /opt/sx/netcdf
+
CPPFLAGS = -D__SXdbl4
FFLAGS = -dw -Wf"-A dbl4" -R2 -ts. -Pmulti -Chopt -I$(NETCDF)/include
CFLAGS = -Xa
Modified: DART/trunk/mkmf/mkmf.template.pathscale.linux
===================================================================
--- DART/trunk/mkmf/mkmf.template.pathscale.linux 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.pathscale.linux 2011-01-04 17:35:57 UTC (rev 4621)
@@ -44,13 +44,20 @@
#MPIFC=$(MPI_HOME)/bin/mpif90
#MPILD=$(MPI_HOME)/bin/mpif90
#----------------------------------------------------------------------
+
MPIFC=mpif90
MPILD=mpif90
FC = pathf90
LD = pathf90
-NETCDF = /home/lightning/thoar/netcdf-3.6.0p1-pathcc-pathf90-2.0-64
-LIBS = -L$(NETCDF)/lib -lnetcdf
-FFLAGS = -O2 -I$(NETCDF)/include
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /home/lightning/thoar/netcdf-3.6.0p1-pathcc-pathf90-2.0-64
+
+INCS = -I$(NETCDF)/include
+LIBS = -L$(NETCDF)/lib -lnetcdf
+FFLAGS = -O2 $(INCS)
LDFLAGS = $(FFLAGS) $(LIBS)
+
# for development/debugging, use these flags instead:
#FFLAGS = -Wuninitialized -ffortran-bounds-check -fullwarn -O0 -I$(NETCDF)/include
Modified: DART/trunk/mkmf/mkmf.template.pgi.cray
===================================================================
--- DART/trunk/mkmf/mkmf.template.pgi.cray 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.pgi.cray 2011-01-04 17:35:57 UTC (rev 4621)
@@ -55,33 +55,19 @@
# If you add the -Mprof=func flag to get profiling information, you must
# add it to both FFLAGS and LDFLAGS.
#
-# Compiler versions we have run this on:
-#
-# Compiler Information (pgf90 -V):
-# pgf90 6.0-1 64-bit target on x86-64 Linux
-# Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
-# Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
-#
-# Compiler Information (pgf90 -V):
-# pgf90 6.1-1 32-bit target on x86 Linux
-# Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
-# Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
-# The machine 'fisher' has no mpi; use mkmf_xxx without the -mpi flag
-# when building the executables in the model/*/work directories.
-#
-# On lightning, load the 'lsf' module to get mpif90 in your path.
-# (as well as the 'pgi' module.)
-
MPIFC = ftn
MPILD = ftn
FC = ftn
LD = ftn
-NETCDF = /opt/cray/netcdf/4.0.1.3/netcdf-pgi
-INCS = -I$(NETCDF)/include
-FFLAGS = -O2 $(INCS)
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /opt/cray/netcdf/4.0.1.3/netcdf-pgi
+
+INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
+FFLAGS = -O2 $(INCS)
LDFLAGS = $(INCS) $(LIBS)
# for development or debugging, use this for flags:
Modified: DART/trunk/mkmf/mkmf.template.pgi.linux
===================================================================
--- DART/trunk/mkmf/mkmf.template.pgi.linux 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.pgi.linux 2011-01-04 17:35:57 UTC (rev 4621)
@@ -77,13 +77,16 @@
MPILD = mpif90
FC = pgf90
LD = pgf90
-NETCDF = /usr/local/netcdf-pgi
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /usr/local/netcdf-pgi
+
INCS = -I$(NETCDF)/include
-
-FFLAGS = -O2 $(INCS)
LIBS = -L$(NETCDF)/lib -lnetcdf
-LDFLAGS = $(INCS) $(LIBS)
+FFLAGS = -O2 $(INCS)
+LDFLAGS = $(FFLAGS) $(LIBS)
# for development or debugging, use this for flags:
-#FFLAGS = -O0 -Ktrap=fp -pc 64 $(INCS)
+#FFLAGS = -O0 -C -Ktrap=fp -pc 64 $(INCS)
Modified: DART/trunk/mkmf/mkmf.template.pgi.osx
===================================================================
--- DART/trunk/mkmf/mkmf.template.pgi.osx 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.pgi.osx 2011-01-04 17:35:57 UTC (rev 4621)
@@ -55,12 +55,15 @@
MPILD = mpif90
FC = pgf90
LD = pgf90
-NETCDF = /usr/local/netcdf-pgi
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /usr/local/netcdf-pgi
+
INCS = -I$(NETCDF)/include
-
-FFLAGS = -O2 $(INCS)
LIBS = -L$(NETCDF)/lib -lnetcdf
-LDFLAGS = $(INCS) $(LIBS)
+FFLAGS = -O2 $(INCS)
+LDFLAGS = $(FFLAGS) $(LIBS)
# for development or debugging, use this for flags:
#FFLAGS = -O0 -Ktrap=fp -pc 64 $(INCS)
Modified: DART/trunk/mkmf/mkmf.template.sgi.altix
===================================================================
--- DART/trunk/mkmf/mkmf.template.sgi.altix 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.sgi.altix 2011-01-04 17:35:57 UTC (rev 4621)
@@ -60,9 +60,13 @@
MPILD = ifort -lmpi
FC = ifort
LD = ifort
-NETCDF = /opt/pd/netcdf/3.6.0-p1/
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /opt/pd/netcdf/3.6.0-p1
+
INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
-FFLAGS = -C -O0 $(INCS)
-LDFLAGS = -O0 $(INCS) $(LIBS)
+FFLAGS = -O0 $(INCS)
+LDFLAGS = $(FFLAGS) $(LIBS)
Modified: DART/trunk/mkmf/mkmf.template.sgi.mips
===================================================================
--- DART/trunk/mkmf/mkmf.template.sgi.mips 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.sgi.mips 2011-01-04 17:35:57 UTC (rev 4621)
@@ -23,16 +23,19 @@
# Compiler Information [f90 -version]:
# MIPSpro Compilers: Version 7.4.3m
#
-#
+
MPIFC = f90
MPILD = f90 -lmpi
FC = f90
LD = f90
+
# NETCDF is location of include (header) files,
# NETCDFLIB is location of modules and libs
+
NETCDF = /usr/local
NETCDFLIB = /usr/local/lib64/r4i4
-INCS = -I$(NETCDF)/include -I$(NETCDFLIB)
+
+INCS = -I$(NETCDFLIB) -I$(NETCDF)/include
+LIBS = -L$(NETCDFLIB) -lnetcdf
FFLAGS = -64 -i4 -r8 -O0 $(INCS)
-LIBS = -L$(NETCDFLIB) -lnetcdf
-LDFLAGS = -64 -dont_warn_unused $(INCS) $(LIBS)
+LDFLAGS = -dont_warn_unused $(FFLAGS) $(LIBS)
Modified: DART/trunk/mkmf/mkmf.template.xlf.aix
===================================================================
--- DART/trunk/mkmf/mkmf.template.xlf.aix 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.xlf.aix 2011-01-04 17:35:57 UTC (rev 4621)
@@ -40,7 +40,7 @@
# -qdpc double precision constants
# -qrealsize=8 autopromote (more than you think)
# -qintsize=4 ditto
-#
+
MPIFC = mpxlf95_r
MPILD = mpxlf95_r
FC = xlf90_r
Modified: DART/trunk/mkmf/mkmf.template.xlf.osx
===================================================================
--- DART/trunk/mkmf/mkmf.template.xlf.osx 2011-01-04 17:07:38 UTC (rev 4620)
+++ DART/trunk/mkmf/mkmf.template.xlf.osx 2011-01-04 17:35:57 UTC (rev 4621)
@@ -52,8 +52,12 @@
MPILD = mpif90
FC = xlf90
LD = xlf90
-NETCDF = /Users/thoar/netcdf-3.5.1
+
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value properly.
+# NETCDF = /Users/thoar/netcdf-3.5.1
+
INCS = -I${NETCDF}/include
-FFLAGS = -qsuffix=f=f90:cpp=F90 -qarch=auto -qmaxmem=-1 -O0 -C $(INCS)
LIBS = -L${NETCDF}/lib -lnetcdf
-LDFLAGS = $(LIBS)
+FFLAGS = -qsuffix=f=f90:cpp=F90 -qarch=auto -qmaxmem=-1 -O2 $(INCS)
+LDFLAGS = $(FFLAGS) $(LIBS)
More information about the Dart-dev
mailing list