============================== 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: .. code-block:: Bash spack install mpifileutils or to enable all features: .. code-block:: Bash spack install mpifileutils +lustre +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: .. code-block:: Bash #!/bin/bash mkdir install installdir=`pwd`/install mkdir deps cd deps wget https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.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.2.1-rc.1.tar.gz cd libcircle-0.2.1-rc.1 ./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 .. Assuming the dependencies have been placed in an `install` directory as shown above, build mpiFileUtils from a release like v0.9: .. code-block:: Bash wget https://github.com/hpc/mpifileutils/archive/v0.9.tar.gz tar -zxf v0.9.tar.gz mkdir build install cd build cmake ../mpifileutils-0.9 \ -DWITH_DTCMP_PREFIX=../install \ -DWITH_LibCircle_PREFIX=../install \ -DCMAKE_INSTALL_PREFIX=../install make install or to build the latest mpiFileUtils from the master branch: .. code-block:: Bash 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 and experimental tools, add the following flags during CMake: .. code-block:: Bash -DENABLE_LUSTRE=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: .. code-block:: Bash 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.