This section gives a brief description of to how to get the ESMF software, build it, and run the self-tests to verify the installation was successful. More detailed information on each of these steps, as well as information on running a quick_start application and linking the ESMF with your own code is found in Sections 6 and 8.
http://www.earthsystemmodeling.org -> DownloadThe source code for all other releases including the HEAD of the CVS trunk and the last stable version can be found by following the View All Releases link on the left hand navigation bar under Download:
http://www.earthsystemmodeling.org -> Download -> View All Releases
http://sourceforge.net/projects/esmf -> FilesFollow the directions on that web page to download a tar file.
gunzip esmf*.tar.gz
Then untar the file:
tar -xf esmf*.tar
This will create a directory called esmf.
The build_config directory contains subdirectories for different operating system, compiler combinations. This is a useful area to examine if porting ESMF to a new platform.
After downloading and unpacking the ESMF tar file, the build procedure is:
The syntax for setting environment variables depends on which shell you are running. Examples of the two most common ways to set an environment variable are:
The shell environment variables listed below are the ones most frequently used. There are others which address needs on specific platforms or are needed under more unusual circumstances; see Section 6 for the full list.
Alternatively, ESMF comes with a single-processor MPI-bypass library which is the default for Linux and Darwin systems. To force the use of this bypass library set ESMF_COMM equal to "mpiuni".
By default Fortran and C++ compiler executables are expected to be located in a location contained in the user's PATH environment variable. This means that if you cannot locate the correct compiler executable via the which command on the shell prompt the ESMF build system won't find it either!
There are advanced ESMF environment variables that can be used to select specific compiler executables by specifying the full path. This can be used to pick specific compiler executables without having to modify the PATH environment variable.
Use 'gmake info' to see which compiler executables the ESMF build system will be using according to your environment variable settings.
To see possible values for ESMF_COMPILER, cd to $ESMF_DIR/build_config and list the directories there. The first part of each directory name corresponds to the output of 'uname -s' for this platform. The second part contains possible values for ESMF_COMPILER. In some cases multiple combinations of Fortran and C++ compilers are possible, e.g. there is intel and intelgcc available for Linux. Setting ESMF_COMPILER to intel indicates that both Intel Fortran and C++ compilers are used, whereas intelgcc indicates that the Intel Fortran compiler is used in combination with GCC's C++ compiler.
If you do not find a configuration that matches your situation you will need to port ESMF.
-------------------------------------------------------------- Make version: GNU Make version 3.79, by Richard Stallman and Roland McGrath. Built for powerpc-apple-darwin7.0 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to <bug-make@gnu.org>. -------------------------------------------------------------- Fortran Compiler version: ERROR: No input files. Pro Fortran 9.0 -------------------------------------------------------------- C++ Compiler version: g++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------- Preprocessor version: gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------- ESMF_VERSION_STRING "3.1.0r beta snapshot" -------------------------------------------------------------- -------------------------------------------------------------- * User set ESMF environment variables * ESMF_OS=Darwin ESMF_DIR=/Users/svasquez/script_dirs/branch_builds/esmf ESMF_TESTWITHTHREADS=OFF ESMF_INSTALL_PREFIX=/Users/svasquez/script_dirs/branch_builds/esmf/../install_dir ESMF_COMM=mpiuni ESMF_TESTEXHAUSTIVE=ON ESMF_SITE=default ESMF_ABI=32 ESMF_COMPILER=absoft -------------------------------------------------------------- * ESMF environment variables * ESMF_DIR: /Users/svasquez/script_dirs/branch_builds/esmf ESMF_OS: Darwin ESMF_MACHINE: Power Macintosh ESMF_ABI: 32 ESMF_COMPILER: absoft ESMF_BOPT: g ESMF_COMM: mpiuni ESMF_SITE: default ESMF_PTHREADS: ON ESMF_ARRAY_LITE: FALSE ESMF_NO_INTEGER_1_BYTE: FALSE ESMF_NO_INTEGER_2_BYTE: FALSE ESMF_FORTRANSYMBOLS: default ESMF_TESTEXHAUSTIVE: ON ESMF_TESTWITHTHREADS: OFF ESMF_TESTMPMD: OFF -------------------------------------------------------------- * ESMF environment variables pointing to 3rd party software * -------------------------------------------------------------- * ESMF environment variables for final installation * ESMF_INSTALL_PREFIX: /Users/svasquez/script_dirs/branch_builds/esmf/../install_dir ESMF_INSTALL_HEADERDIR: include ESMF_INSTALL_MODDIR: mod/modg/Darwin.absoft.32.mpiuni.default ESMF_INSTALL_LIBDIR: lib/libg/Darwin.absoft.32.mpiuni.default ESMF_INSTALL_DOCDIR: doc -------------------------------------------------------------- * Compilers, Linkers, Flags, and Libraries * Location of the preprocessor: /usr/bin/gcc Location of the Fortran compiler: /Applications/Absoft/bin/f90 Location of the Fortran linker: /Applications/Absoft/bin/f90 Location of the C++ compiler: /usr/bin/g++ Location of the C++ linker: /usr/bin/g++ Fortran compiler flags: ESMF_F90COMPILEOPTS: -g -YEXT_NAMES=LCS -YEXT_SFX=_ ESMF_F90COMPILEPATHS: -p/Users/svasquez/script_dirs/branch_builds/esmf/mod/modg/Darwin.absoft.32.mpiuni.default -I/Users/svasquez/script_dirs/branch_builds/esmf/src/include ESMF_F90COMPILECPPFLAGS: -DESMF_TESTEXHAUSTIVE -DS32=1 -DESMF_OS_Darwin=1 -DESMF_MPIUNI Fortran linker flags: ESMF_F90LINKOPTS: -YEXT_NAMES=LCS -YEXT_SFX=_ ESMF_F90LINKPATHS: -L/Users/svasquez/script_dirs/branch_builds/esmf/lib/libg/Darwin.absoft.32.mpiuni.default ESMF_F90LINKRPATHS: ESMF_F90LINKLIBS: -lstdc++ ESMF_F90ESMFLINKLIBS: -lesmf -lstdc++ C++ compiler flags: ESMF_CXXCOMPILEOPTS: -g -DESMF_LOWERCASE_SINGLEUNDERSCORE ESMF_CXXCOMPILEPATHS: -I/Users/svasquez/script_dirs/branch_builds/esmf/src/include -I/Users/svasquez/script_dirs/branch_builds/esmf/src/Infrastructure/stubs/mpiuni ESMF_CXXCOMPILECPPFLAGS: -DESMF_TESTEXHAUSTIVE -DS32=1 -DESMF_OS_Darwin=1 -D__SDIR__='' -DESMF_MPIUNI C++ linker flags: ESMF_CXXLINKOPTS: ESMF_CXXLINKPATHS: -L/Users/svasquez/script_dirs/branch_builds/esmf/lib/libg/Darwin.absoft.32.mpiuni.default -L/Applications/Absoft/lib ESMF_CXXLINKRPATHS: ESMF_CXXLINKLIBS: -lf90math -lfio -lac -lf77math -lm ESMF_CXXESMFLINKLIBS: -lesmf -lf90math -lfio -lac -lf77math -lm -------------------------------------------------------------- Compiling on Mon Apr 7 03:11:21 MDT 2008 on glass.image.ucar.edu Machine characteristics: Darwin glass.image.ucar.edu 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc ==============================================================
The makefiles follow the GNU target standards where possible. The most frequently used targets for building are listed below:
To build and run the unit and system tests, type:
gmake checkA summary report of success and failures will be printed out at the end.
See section 8.1.1 on how to set up ESMF to be able to launch the bundled test and example applications.
Other test-related targets are:
For all the targets listed above, the string all_tests can be replaced with one of the strings listed below to select a specific type of test:
For the unit tests only, there is an additional environment variable which affects how the tests are built: