Build

mpiFileUtils and its dependencies can be installed with and without Spack. There are several common variations described here:

  • install both mpiFileUtils and its dependencies with Spack
  • install both mpiFileUtils and its dependencies directly
  • install mpiFileUtis directly after installing its dependencies with Spack

Build everything with Spack

To use Spack, it is recommended that one first create a packages.yaml file to list system-provided packages, like MPI. Without doing this, Spack will fetch and install an MPI library that may not work on your system. Make sure that you've set up spack in your shell (see these instructions).

Once Spack has been configured, mpiFileUtils can be installed as:

spack install mpifileutils

or to enable all features:

spack install mpifileutils +lustre +gpfs +experimental

Build everything directly

To build directly, mpiFileUtils requires CMake 3.1 or higher. First ensure MPI wrapper scripts like mpicc are loaded in your environment. Then to install the dependencies, run the following commands:

#!/bin/bash
mkdir install
installdir=`pwd`/install

mkdir deps
cd deps
  wget https://github.com/hpc/libcircle/releases/download/v0.3/libcircle-0.3.0.tar.gz
  wget https://github.com/llnl/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz
  wget https://github.com/llnl/dtcmp/releases/download/v1.1.0/dtcmp-1.1.0.tar.gz

  tar -zxf libcircle-0.3.0.tar.gz
  cd libcircle-0.3.0
    ./configure --prefix=$installdir
    make install
  cd ..

  tar -zxf lwgrp-1.0.2.tar.gz
  cd lwgrp-1.0.2
    ./configure --prefix=$installdir
    make install
  cd ..

  tar -zxf dtcmp-1.1.0.tar.gz
  cd dtcmp-1.1.0
    ./configure --prefix=$installdir --with-lwgrp=$installdir
    make install
  cd ..
cd ..

To build on PowerPC, one may need to add --build=powerpc64le-redhat-linux-gnu to the configure commands.

Assuming the dependencies have been placed in an install directory as shown above, build mpiFileUtils from a release like v0.10:

wget https://github.com/hpc/mpifileutils/archive/v0.10.tar.gz
tar -zxf v0.10.tar.gz
mkdir build install
cd build
cmake ../mpifileutils-0.10 \
  -DWITH_DTCMP_PREFIX=../install \
  -DWITH_LibCircle_PREFIX=../install \
  -DCMAKE_INSTALL_PREFIX=../install
make install

or to build the latest mpiFileUtils from the master branch:

git clone https://github.com/hpc/mpifileutils
mkdir build install
cd build
cmake ../mpifileutils \
  -DWITH_DTCMP_PREFIX=../install \
  -DWITH_LibCircle_PREFIX=../install \
  -DCMAKE_INSTALL_PREFIX=../install
make install

To enable Lustre, GPFS, and experimental tools, add the following flags during CMake:

-DENABLE_LUSTRE=ON
-DENABLE_GPFS=ON
-DENABLE_EXPERIMENTAL=ON

Build mpiFileUtils directly, build its dependencies with Spack

One can use Spack to install mpiFileUtils dependencies using the spack.yaml file distributed with mpiFileUtils. From the root directory of mpiFileUtils, run the command spack find to determine which packages spack will install. Next, run spack concretize to have spack perform dependency analysis. Finally, run spack install to build the dependencies.

There are two ways to tell CMake about the dependencies. First, you can use spack load [depname] to put the installed dependency into your environment paths. Then, at configure time, CMake will automatically detect the location of these dependencies. Thus, the commands to build become:

git clone https://github.com/hpc/mpifileutils
mkdir build install
cd mpifileutils
spack install
spack load dtcmp
spack load libcircle
spack load libarchive
cd ../build
cmake ../mpifileutils

The other way to use spack is to create a "view" to the installed dependencies. Details on this are coming soon.