This git repository contains a simplified version of the "baselibs" module first developed by Gerhard Theurich and later maintained by Eugene Mirvis, Denis Nadeau, and Matthew Thompson. The current version only includes a minimal set of libraries needed for building GEOS at NASA/GSFC.
Library | Version |
---|---|
ESMF | v8.7.0 |
FMS | 2024.03 |
netCDF | 4.9.2 |
netCDF Fortran | 4.6.1 |
netCDF C++ | 4.3.1 |
HDF5 | 1.14.5 |
HDF4 | 4.2.16-2 |
GFE | v1.16.0 |
xgboost | v1.6.0 |
libyaml | 0.2.5 |
antlr2 | 2.7.7 |
GSL | 2.8 |
jpeg | 9f |
zlib | 1.3.1 |
szip | 2.1.1 |
curl | 8.10.1 |
UDUNITS2 | 2.2.28 |
NCO | 5.2.8 |
CDO | 2.4.4 |
nccmp | 1.9.1.0 |
HDF-EOS2 | 3.0 |
HDF-EOS5 | 2.0 |
SDP Toolkit | 5.2.20 |
-
C compiler, preferably gcc
-
Fortran compiler. Tested compilers are GNU, Intel, and NAG. PGI support was once available, but has not been tested in a while.
-
The MPI library. On a Linux desktop/laptop, Open MPI is recommended. Make sure mpicc, mpifort, etc is on your path. Try compiling a simple "Hello, world!" program with mpicc and running it; sometimes you need to set your
LD_LIBRARY_PATH
so that the runtime MPI libraries can be found.Linux Note: many Linux distributions now have Open MPI packages. However these either lack Fortran altogether or use gfortran. You must have Open MPI with Fortran support, and the Fortran compiler used to build MPI must the Fortran compiler you will be using.
-
on Linux, make sure "bison" and "flex" are installed; on generic Unix platforms, make sure you have "yacc" and "lex".
-
on Darwin, GNU sed is needed for ESMF Applications. This sed must be visible as sed (and not, say, gsed as installed by Brew)
-
CMake of a recent vintage
ESMA Baselibs can be obtained in two ways via a tarball or through git.
Recent releases of ESMA Baselibs have a complete tarball uploaded as an asset on the Releases page. These are the files denoted by:
ESMA-Baselibs-x.y.z.COMPLETE.tar.xz
The COMPLETE
indicates that they have completed all the steps needed
to get Baselibs via git (see below). Note that to save space, this
tarball is tarred with --exclude-vcs
so the libraries that are
normally git repositories, will not be in this tarball.
ESMA Baselibs is based on submodules so you need to clone with:
git clone --recurse-submodules -b <TAG> https://github.com/GEOS-ESM/ESMA-Baselibs.git
Note that there is an additional step needed for building a complete ESMA Baselibs when retrieved via Git. There are six libraries that are not on git at present:
- GSL
- szlib
- CDO
- HDF-EOS
- HDF-EOS 5
- SDP Toolkit
to get these libraries, run:
make download
Note that this step will occur automatically the first time Baselibs is built, but in case you want to build on a system without internet access (say, a compute node), this command should be run first on a head node.
If you are feeling lucky, building can be just as simple as
cd ESMA-Baselibs
make install ESMF_COMM=<mpistack> (prefix=<dir>)
make verify ESMF_COMM=<mpistack>
where <mpistack>
is one of the ESMF MPI stack names, such as:
- mpt
- openmpi
- mpich
- mvapich2
- intelmpi
see esmf/INSTALL
for more information.
You can optionally pass in a prefix
to determine where Baselibs will
be built. If you don't, the system uses config.guess
=>
x86_64-pc-linux-gnu
(on most Linux) to install to:
../x86_64-pc-linux-gnu/$FC/Linux
If the Baselibs do not build out of the repository, then you will need to customize a few things. For example, to choose the ifort compiler under Linux, just enter this
-
BUILD=ESSENTIALS
Use this to only build the libraries essential for building and running GEOS GCM
-
BUILD=MAPL
Use this to only build the libraries essential for building and running MAPL
-
CONFIG_SETUP
This is to help detail what combination of compiler and MPI was used. If unspecified, the default is the value of
FC
-
ROOTDIR
Root directory for installing the binaries; the installation directory will be at
prefix = $(ROOTDIR)/$(SYSNAME)/$(CONFIG_SETUP)/$(ARCH)
where $(ARCH) is the result of
uname -s
, e.g., Linux. -
prefix
Bypass the definition above and install at this directory. It is no recommended that you specify this - specify ROOTDIR instead
For GEOS, if you have BASEDIR
set in your environment which points to the location where
the lib/
, bin/
, etc. directories exist, you need do nothing else.
If not, you'll need to pass in the Baselibs as:
cmake .. -DBASEDIR=<BASEDIR_LOC> ...
where BASEDIR_LOC
is such that BASEDIR_LOC/lib
, etc. exists.
For additional information, contact Matthew.Thompson@nasa.gov
Please check out our contributing guidelines.
All files are currently licensed under the Apache-2.0 license, see LICENSE
.
Previously, the code was licensed under the NASA Open Source Agreement, Version 1.3.