[Dart-dev] [6238] DART/branches/development/mkmf/mkmf.template: Since the default mkmf .template is for gfortran, might as
nancy at ucar.edu
nancy at ucar.edu
Mon Jun 10 17:06:39 MDT 2013
Revision: 6238
Author: thoar
Date: 2013-06-10 17:06:39 -0600 (Mon, 10 Jun 2013)
Log Message:
-----------
Since the default mkmf.template is for gfortran, might as
well make it match the mkmf.template.gfortran
Modified Paths:
--------------
DART/branches/development/mkmf/mkmf.template
-------------- next part --------------
Modified: DART/branches/development/mkmf/mkmf.template
===================================================================
--- DART/branches/development/mkmf/mkmf.template 2013-06-10 22:35:40 UTC (rev 6237)
+++ DART/branches/development/mkmf/mkmf.template 2013-06-10 23:06:39 UTC (rev 6238)
@@ -3,49 +3,47 @@
# DART software - Copyright 2004 - 2011 UCAR. This open source software is
# provided by UCAR, "as is", without charge, subject to all terms of use at
# http://www.image.ucar.edu/DAReS/DART/DART_download
-#
-# <next few lines under version control, do not edit>
-# $URL$
-# $Id$
-# $Revision$
-# $Date$
# typical use with mkmf
-# mkmf -t mkmf.template.xxxx -c"-Duse_netCDF" ...
+# mkmf -t mkmf.template.xxxx ...
#
# Most likely NETCDF (and maybe LIBS) will need to be customized for your site
#
-#
+#
# Building DART with open-source software:
-#
+#
# All the parts (except matlab, which is optional and only used to display results)
-# needed to build and run the DART package are now possible to get free from
+# needed to build and run the DART package are now possible to get free from
# the open-source community. To compile and run DART, you will need:
-#
#
+#
# 1. The GNU GCC 4.2.0 version of the gfortran compiler. See this web page for
-# information on supported platforms and downloads:
+# information on supported platforms and downloads:
# http://gcc.gnu.org/wiki/GFortran
-#
+#
# (Note that there is a separate G95 project which distributes an alternate
-# open-source fortran distribution, and I have heard that others have
+# open-source fortran distribution, and I have heard that others have
# 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
-#
+#
# The 3.6.2 version compiled for us with this:
-#
+#
# ./configure CC=gcc FC=gfortran
# make check
# make install
#
# You can add the argument --prefix=/dir to configure to make the install
# location for the includes and libs someplace other than /usr/local.
-#
-#
+#
+#
# If you want to try the *optional* parallel execution option, you will
# need a version of the MPI libs. There are at least two open source options:
#
@@ -55,31 +53,65 @@
# or mpich from:
# http://http://www-unix.mcs.anl.gov/mpi/mpich/
#
-# Note that MPI IS NOT REQUIRED to build and run DART.
+# Note that MPI IS NOT REQUIRED to build and run DART.
#
-#
+#
# Possibly useful flags:
#
-# -ffree-form forces input file to be read as free format regardless
+# -ffree-form forces input file to be read as free format regardless
# of what file extension is has.
#
# -fdefault-real-8 force all real variables to be real*8.
#
-#
+# -ffpe-trap=invalid,overflow,precision,denormal,underflow
+#
+#
+# NOTE: there is no compile-time convert endian flag. It is a run-time option.
+# http://gcc.gnu.org/onlinedocs/gfortran/GFORTRAN_005fCONVERT_005fUNIT.html#GFORTRAN_005fCONVERT_005fUNIT
+# To treat units 10-20 as big_endian but the rest are 'native' ...
+# setenv GFORTRAN_CONVERT_UNIT 'big_endian;native:10-20'
+#
+# To treat ALL units as big_endian (the 10-20 is meaningless in this instance):
+# setenv GFORTRAN_CONVERT_UNIT 'big_endian;big_endian:10-20'
+#
+# IF YOU HAVE MORE CURRENT COMPILER INFORMATION, PLEASE SHARE IT WITH US.
MPIFC = mpif90
MPILD = mpif90
FC = gfortran
LD = gfortran
-# if $NETCDF in your environment is set to the location of the
-# include and lib directories, you are ok. otherwise set the
-# next line to the location and uncomment it.
-# NETCDF = /usr/local
+# DISCUSSION ABOUT NETCDF. DART works with both V3 and V4 flavors of netCDF.
+# Some V4 installations also require the HDF5 libraries. Some don't.
+# Some netCDF installations require both -lnetcdff and -lnetcdf, some only
+# require -lnetcdf. The permutations make it difficult to cover the possible
+# installations. Here are some candidates, you might just have to resort to
+# trial and error:
+# LIBS = -L$(NETCDF)/lib -lnetcdf
+# LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
+# LIBS = -L$(NETCDF)/lib -lnetcdf -lcurl -lhdf5_hl -lhdf5 -lz -lm
+# LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf -lcurl -lhdf5_hl -lhdf5 -lz -lm
+#
+# If you get an error "ld: library not found for -lnetcdff" (note 2 f's),
+# remove it from the LIBS line. The same is true for any library. If 'ld'
+# does not complain - it worked.
-INCS = ${NETCDF}/include
-FFLAGS = -O2 -I$(INCS) -ffree-line-length-none
+# If your NETCDF environment variable is not set correctly,
+# uncomment the following line and set value to where lib and include
+# are found for the netcdf files that match this compiler.
+#
+# NETCDF = /opt/local
-LIBS = -L${NETCDF}/lib -lnetcdf -lnetcdff
-LDFLAGS = -I$(INCS) $(LIBS)
+INCS = -I$(NETCDF)/include
+LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
+FFLAGS = -O2 -ffree-line-length-none $(INCS)
+LDFLAGS = $(FFLAGS) $(LIBS)
+#FFLAGS = -O0 -fbounds-check -frecord-marker=4 -ffpe-trap=invalid -ffree-line-length-none $(INCS)
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Id$
+# $Revision$
+# $Date$
+
More information about the Dart-dev
mailing list