Skip to content

Commit

Permalink
Minor documentation and Makefile changes to support the SUMMA release
Browse files Browse the repository at this point in the history
  • Loading branch information
bartnijssen committed Jul 14, 2015
1 parent 98c0f85 commit 16389f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
20 changes: 6 additions & 14 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ FC =
# and settings. If none of this makes sense, please talk to your system
# administrator.

# Eventually we plan move to a real configure script, but for now we like
# to keep track of successful compilations of SUMMA on different platforms
# and with different compilers. If you are successful compiling SUMMA,
# please add your configuration (operating system and compiler plus
# part 0 of the Makefile) to the SUMMA wiki on github.

# gfortran compiler -- needs to be 4.8 or higher
# (works on Mac OS X with Macports)
ifeq "$(FC)" "gfortran-mp-4.8"
Expand All @@ -42,14 +48,6 @@ ifeq "$(FC)" "ifort"
LIBLAPACK = -L$(LAPK_PATH)/lib -llapack
endif

# Portland group compiler
ifeq "$(FC)" "pgf90"
NCDF_PATH = /usr/local/netcdf-4.3.0/pgi-13.8
LAPK_PATH = /usr
# define the lapack libraries
LIBLAPACK = -L$(LAPK_PATH)/lib -llapack
endif

LIBNETCDF = -L$(NCDF_PATH)/lib -lnetcdff
INCNETCDF = -I$(NCDF_PATH)/include

Expand All @@ -66,12 +64,6 @@ ifeq "$(FC)" "ifort"
FLAGS_COMM = -debug -warn all -check all -FR -O0 -auto -WB -traceback -g -fltconsistency -fpe0
FLAGS_SUMMA = -debug -warn all -check all -FR -O0 -auto -WB -traceback -g -fltconsistency -fpe0
endif
ifeq "$(FC)" "pgf90"
FLAGS1 = -Mbackslash -g -Mchkptr -Mchkstk -Mpgicoff -Minform=inform -Ktrap=divz,inv -Mprof=lines,time
FLAGS_NOAH = -g -Mr8 -Mfree
FLAGS_COMM = -Mbackslash -g -Mchkptr -Mchkstk -Mpgicoff -Minform=inform -Ktrap=fp -traceback
FLAGS_SUMMA = -Mbackslash -g -Mbounds -Mchkptr -Mchkstk -Mpgicoff -Minform=inform -Ktrap=divz,inv,ovf -traceback
endif

#========================================================================
# PART 1: Define directory paths
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/summa_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

SUMMA configuration is performed via a large number of configuration files. The format of these files is likely to change (and simplified) as we build out SUMMA's infrastructure. The following may be somewhat difficult to follow without a working example. We strongly recommend that you get the [test applications](http://ral.ucar.edu/projects/summa/datasets.php) to help you get started.
SUMMA configuration is performed via a large number of configuration files. The format of these files is likely to change (and simplified) as we build out SUMMA's infrastructure. The following may be somewhat difficult to follow without a working example. We strongly recommend that you get the [test applications](http://ral.ucar.edu/projects/summa) to help you get started.

In the following we will assume that your SUMMA source installation is in the directory `<localInstallation>` on your machine (this is not actually the name of the directory, but can be whatever you call) and that the test applications are installed in the directory `<localApplications>`. Note that these two directories can be the same, in which case everything would be in the same directory tree.

Expand Down
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ SUMMA's initial implementation is described in two papers published in [Water Re

We have successfully installed SUMMA on a number of Unix-like (*nix) operating systems, including Linux and Darwin (Mac OS X). To compile SUMMA, you will need:

* a Fortran compiler. We have successfully used the intel Fortran compiler (`ifort`), the Portland Group Fortran 90 compiler (`pgf90`), and the GNU Fortran compiler (`gfortran`), the latter of which is freely available. Since we do not use any compiler-specific extensions, you should be able to compile SUMMA with other Fortran compilers as well. If you do, please let us know and send us a copy of your Makefile.
* a Fortran compiler. We have successfully used the intel Fortran compiler (`ifort`) and the GNU Fortran compiler (`gfortran`, version 4.8 or higher), the latter of which is freely available. Since we do not use any compiler-specific extensions, you should be able to compile SUMMA with other Fortran compilers as well.

If you do not have a Fortran compiler, ou can install `gfortran` for free. The easiest way is to use a apackage manager. Which package manager depends on your *nix flavor. On OS X, you can use any of the free OS X package managers, including [MacPorts](http://www.macports.org), [fink](http://www.finkproject.org), or [homebrew](http://brew.sh). Note that `gfortran` is installed as part of the `gcc` compiler suite.
If you do not have a Fortran compiler, you can install `gfortran` for free. The easiest way is to use a package manager. Which package manager depends on your *nix flavor. On OS X, you can use any of the free OS X package managers, including [MacPorts](http://www.macports.org), [fink](http://www.finkproject.org), or [homebrew](http://brew.sh). Note that `gfortran` is installed as part of the `gcc` compiler suite.

* the NetCDF libraries. [NetCDF](http://www.unidata.ucar.edu/software/netcdf/) or the Network Common Data Format is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. They are widely used in the hydrometeorological community and eventually all SUMMA I/O will use NetCDF. Most *nix package managers include a NetCDF port. Note that you need to ensure that:

* You have NetCDF version 4.x;
* The NetCDF libraries are compiled with the same compiler as you plan to use for compiling SUMMA; and
* You have the NetCDF Fortran library installed (`libnetcdff.*`) and not just the C-version.

* the LAPACK — Linear Algebra PACKage library. [LAPACK](http://www.netlib.org/lapack/) provides a series of routines for linear algebra operations, including matrix solvers. How to install the library depends on your *nix variant and is not covered here. For example, on OS X you will get all the necessary LAPACK routines by installing the ATLAS software (again, this is easiest using a package manager).
* the LAPACK — Linear Algebra PACKage library. [LAPACK](http://www.netlib.org/lapack/) provides a series of routines for linear algebra operations, including matrix solvers. How to install the library depends on your *nix variant and is not covered here. For example, on OS X you will get all the necessary LAPACK routines by installing the ATLAS software (again, this is easiest using a package manager; note that ATLAS can take many hours to build the first time when you install it).

* a copy of the SUMMA source code from [this repo](https://github.com/UCAR/summa). You have a number of options:

Expand All @@ -59,9 +59,9 @@ Once you have all the above, you can compile SUMMA using the following steps:

1. Navigate to your local copy of the SUMMA directory and go to the `build` subdirectory;

1. Edit the `Makefile`. At the very least, you will need to set `F_MASTER` and `FC`. You may also need to set `NCDF_PATH` and `LAPK_PATH` and you may need to add some extra entries if you are using a different Fortran compiler or your setup is different (if someone wants to contribute an actual `configure` script that would be great);
1. Edit part 0 of the `Makefile`. At the very least, you will need to set `F_MASTER` and `FC`. You may also need to set `NCDF_PATH` and `LAPK_PATH` and you may need to add some extra entries if you are using a different Fortran compiler or your setup is different (if someone wants to contribute an actual `configure` script that would be great);

1. Type `make`. If all goes well, this will build SUMMA and move the executable `summa.exe` to the `bin` directory;
1. Type `make`. If all goes well, this will build SUMMA and move the executable `summa.exe` to the `bin` directory. You may get some warnings (depending on your compiler settings), but you should not get any errors;

1. Pay attention to the `make` output. You may need to set some environment variables (`LD_LIBRARY_PATH` in particular) to support dynamic linking;

Expand All @@ -74,7 +74,7 @@ Once you have all the above, you can compile SUMMA using the following steps:
If you get this far then SUMMA is installed correctly and functional.
Continue reading [SUMMA configuration](https://github.com/UCAR/summa/blob/master/docs/howto/summa_configuration.md) to learn more about how to configure SUMMA for your application. We strongly recommend that you get the [test applications](http://ral.ucar.edu/projects/summa/datasets.php) to help you get started.
Continue reading [SUMMA configuration](https://github.com/UCAR/summa/blob/master/docs/howto/summa_configuration.md) to learn more about how to configure SUMMA for your application. We strongly recommend that you get the [test applications](http://ral.ucar.edu/projects/summa) to help you get started.
## License
Expand Down

0 comments on commit 16389f5

Please sign in to comment.