Permalink
Browse files

spack build deps instructions

  • Loading branch information...
gonsie authored and adammoody committed Jan 10, 2019
1 parent 81c6922 commit 4f245cbcf63d2aa0cb3f4c948931ce01dc5209d7
Showing with 28 additions and 1 deletion.
  1. +27 −1 doc/rst/build.rst
  2. +1 −0 spack.yaml
@@ -27,4 +27,30 @@ an `install` directory the build commands are thus:
$ cd build
$ cmake ../mpifileutils -DWITH_DTCMP_PREFIX=../install -DWITH_LibCircle_PREFIX=../install -DCMAKE_INSTALL_PREFIX=../install

One can also use spack to create an environment.
One can also use spack to create an environment and view with the provided `spack.yaml` file.
First, make sure that you've set up spack in your shell (see `these instructions <https://spack.readthedocs.io/en/latest/getting_started.html>`_).
Next, be sure that your `~/.spack/packages.yaml` is configured to ensure that spack can detect system-provided packages.

From the root directory of mpifileutils, run the command `spack find` to determine which packages spack will install.
Next, run `spack concretize` to build 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.
@@ -9,3 +9,4 @@ spack:
repos: []
packages: {}
config: {}
# view: true

0 comments on commit 4f245cb

Please sign in to comment.