wiki:BuildingParCAL
Last modified 4 years ago Last modified on 05/13/14 00:02:23

Building ParGAL 1.0.0

For building ParGAL 1.0.0, download ParGAL 1.0.0 source (Will be available soon) and build it with MOAB revision 3da2f0b. See the instructions below for details.

ParGAL Dependencies

  • GNU Autotools
  • MPI
  • PnetCDF
  • Intrepid
    • CMake
    • BLAS
    • Lapack
  • MOAB
  • Boost (optional)

If you are using gcc, you need version 4.4 or later.

GNU Autotools

Building MOAB and ParGAL from source requires Autoconf version 2.68, Automake version 1.11.1 and Libtool version 2.4. It is recommended that you install all the autotools (autoconf, automake, libtool) in the same install directory.

If you do not have the minimum version of the autotools specified above, download and install autotools from Autoconf website, Automake website and the Libtool website

MPI

MPI is required for building all the subsequent libraries.

Get and Install MPI:

We use the MPICH2 -- the free implementation of MPI-2 available from Argonne National Laboratory: http://www.mcs.anl.gov/research/projects/mpich2/index.php)

Parallel-NetCDF

Parallel-NetCDF (PNetCDF) is a library providing high-performance I/O while still maintaining file-format compatibility with Unidata's NetCDF. It is an essential dependency for MOAB to read climate data into the mesh in parallel.

Get PNetCDF:

http://trac.mcs.anl.gov/projects/parallel-netcdf/wiki/Download

Build and Install PNetCDF:

#!/bin/bash

export CC=${MPI_PREFIX}/bin/mpicc
export CXX=${MPI_PREFIX}/bin/mpicxx

./configure --prefix=${PNETCDF_PREFIX} --with-mpi=${MPI_PREFIX} 2>&1 | tee configure.log
make 2>&1 | tee make.log
make install 2>&1 | tee make.install.log
make testing 2>&1 | tee make.testing.log

CMake

Building Intrepid requires installing the CMake (version 2.8 and above is recommended) build tool. CMake can be downloaded and installed from the CMake website.

BLAS & Lapack

Intrepid depends on BLAS and Lapack libraries. Please refer to Netlib website for information on how to build BLAS and Lapack libraries.

Intrepid

Intrepid is a library of interoperable tools for compatible discretizations of Partial Differential Equations (PDEs). Intrepid is available as a part of the Trilinos package.

Get Intrepid:

http://trilinos.sandia.gov/packages/intrepid/

Build and Install Intrepid:

Trilinos builds with cmake and cmake at version 2.8 or greater is needed. BLAS and Lapack libraries are required to build Trilinos (Please refer to doc here on how to locate dependency packages). If you have BLAS or Lapack installed in a directory other than "/usr/lib" or "/usr/local/lib" you need to specify the library paths using the configure options specified below,
BLAS_LIBRARY_NAMES : Name of the BLAS library (Typically "blas")
BLAS_LIBRARY_DIRS : Path to the BLAS library
LAPACK_LIBRARY_NAMES : Name of the Lapack library (Typically "lapack")
LAPACK_LIBRARY_DIRS : Path to the Lapack library

Here is a sample build script where the following paths need to be specified
MPI_PREFIX : path to your mpi installation
TRILINOS_PREFIX : path where you would like to install intrepid
PATH_TO_TRILINOS_SOURCE : source directory of trilinos library
The script below assumes that BLAS and Lapack are installed in "usr/lib" or "/usr/local/lib".

mkdir parallel-build; cd parallel-build

EXTRA_ARGS=$@
        
cmake \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH=MPI_PREFIX \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_INSTALL_PREFIX:PATH=TRILINOS_PREFIX \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-D Trilinos_ENABLE_Intrepid:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Pamgen:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_Amesos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_Zoltan:BOOL=ON \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_TESTS:BOOL=OFF \
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
$EXTRA_ARGS \
PATH_TO_TRILINOS_SOURCE

make Intrepid_all -j4 2>&1 | tee make.log
make install -j4 2>&1 | tee make.install.log
ctest -j4 R Intrepid 2>&1 | tee make.check.log

If you have installed BLAS and Lapack in a directory other than "/usr/lib" or "/usr/local/lib". Use the script below,

MPI_PREFIX : path to your mpi installation
TRILINOS_PREFIX : path where you would like to install intrepid
PATH_TO_TRILINOS_SOURCE : source directory of trilinos library
BLAS_LIB_NAME : Name of the BLAS library (Typically "blas". Include the double quotes around the name in the configure options)
BLAS_LIB_PATH : Path to the BLAS library (<BLAS_INSTALL_DIR>/lib)
LAPACK_LIB_NAME : Name of the Lapack library (Typically "lapack". Include the double quotes around the name in the configure options)
LAPACK_LIB_PATH : Path to the Lapack library (<LAPACK_INSTALL_DIR>/lib)

mkdir parallel-build; cd parallel-build

EXTRA_ARGS=$@
        
cmake \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH=MPI_PREFIX \
-D BLAS_LIBRARY_NAMES:STRING=BLAS_LIB_NAME \
-D BLAS_LIBRARY_DIRS:PATH=BLAS_LIB_PATH \
-D LAPACK_LIBRARY_NAMES:STRING=LAPACK_LIB_NAME \
-D LAPACK_LIBRARY_DIRS:PATH=LAPACK_LIB_PATH \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_INSTALL_PREFIX:PATH=TRILINOS_PREFIX \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-D Trilinos_ENABLE_Intrepid:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Pamgen:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_Amesos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_Zoltan:BOOL=ON \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_TESTS:BOOL=OFF \
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
$EXTRA_ARGS \
PATH_TO_TRILINOS_SOURCE

make Intrepid_all -j4 2>&1 | tee make.log
make install -j4 2>&1 | tee make.install.log
ctest -j4 R Intrepid 2>&1 | tee make.check.log

MOAB

MOAB is a component for representing and evaluating mesh data. MOAB can store structured and unstructured mesh, consisting of elements in the finite element zoo plus polygons and polyhedra. Most of the algorithms provided within ParGAL are implemented over MOAB. The users of ParGAL are required to have certain knowledge of MOAB.

Get MOAB:

Download MOAB source (trunk) from git.

git clone https://bitbucket.org/fathomteam/moab MOAB_trunk

To check out a particular revision of MOAB (e.g. MOAB revision 3da2f0b is required for building ParNCL 1.0.0) first clone the trunk as shown above and checkout the required revision. To checkout MOAB revision 3da2f0b execute the command below from the top level of the MOAB source directory.

git checkout 3da2f0b

Build and Install MOAB:

http://trac.mcs.anl.gov/projects/ITAPS/wiki/BuildingAndUsingMOAB

MOAB depends on the following libraries

  • pnetcdf
  • netcdf
  • hdf5
  • zlib
  • szip
./configure 
 --prefix=${MOAB_PREFIX} 
 --with-mpi=${MPI_PREFIX}
 --with-pnetcdf=${PNETCDF_PREFIX}
 --with-netcdf=${NETCDF_PREFIX} 
 --with-hdf5=${HDF5_PREFIX}
 --with-zlib=${ZLIB_PREFIX}
 --with-szip=${SZIP_PREFIX}

Boost (optional)

The Boost Test Library provides convenient functionalities for writing test programs, organizing tests into simple test cases and test suites, and controlling their runtime execution. It is used for performing unit testing within ParGAL. Thus it is not a requirement for building ParGAL but required to run the test suites.

Get Boost:

http://www.boost.org/users/download/

Build and Install Boost:

Boost Test Library is one of the many header-only boost libraries, which consists of only header files. No separate compiled library binaries are needed. For running ParGAL test suites, you do not have to build boost.

ParGAL

The Parallel Gridded Analysis Library is developed to vastly improve the speed of data analysis on various types of grids compared to the current serial tools.

Get ParGAL from trunk:

svn co https://svn.mcs.anl.gov/repos/parvis/pargal/trunk pargal-trunk

Need to run "autoreconf -fi" to generate configuration file. Required autotools version: autoconf-2.68; automake-1.11.1; libtool-2.4

Or Get ParGAL Nightly Build of trunk: pargal-nightly.tar.gz (configuration script included)

Build and Install ParGAL (Boost is needed only if you run make check):

#!/bin/bash
export CXX=${MPI_PREFIX}/bin/mpicxx

autoreconf -fi
./configure 
 --prefix=${PARGAL_PREFIX} 
 --with-mpi=${MPI_PREFIX} 
 --with-moab=${MOAB_PREFIX}
 --with-intrepid=${INTREPID_PREFIX}
 --with-boost=${BOOST_PREFIX}    

make 2>&1 | tee make.log
make install 2>&1 | tee make.install.log
make check 2>&1 | tee make.check.log