documented Spack installation in install docs

This commit is contained in:
Bryan Herman 2021-03-10 13:10:48 +00:00
parent 2cf90cb79f
commit ae53953bae

View file

@ -74,6 +74,306 @@ are no longer supported.
.. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging
.. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto
----------------------------------
Installing from Source using Spack
----------------------------------
`Spack`_ is a package management tool designed to support multiple versions and
configurations of software on a wide variety of platforms and environments.
Please following Spack's `setup guide`_ to configure the Spack system.
The OpenMC Spack recipe has been configured with variants that match most options
provided in the CMakeLists.txt file. To see a list of these variants and other
information:
.. code-block:: sh
spack info openmc
CMakePackage: openmc
Description:
The OpenMC project aims to provide a fully-featured Monte Carlo particle
transport code based on modern methods. It is a constructive solid
geometry, continuous-energy transport code that uses ACE format cross
sections. The project started under the Computational Reactor Physics
Group at MIT.
Homepage: http://openmc.readthedocs.io/
Tags:
None
Preferred version:
0.12.0 [git] https://github.com/openmc-dev/openmc.git at tag v0.12.0
Safe versions:
develop [git] https://github.com/openmc-dev/openmc.git on branch develop
master [git] https://github.com/openmc-dev/openmc.git on branch master
0.12.0 [git] https://github.com/openmc-dev/openmc.git at tag v0.12.0
0.11.0 https://github.com/openmc-dev/openmc/tarball/v0.11.0
0.10.0 https://github.com/openmc-dev/openmc/tarball/v0.10.0
Variants:
Name [Default] Allowed values Description
=========================== ==================== ==================================
build_type [RelWithDebInfo] Debug, Release, CMake build type
RelWithDebInfo,
MinSizeRel
debug [off] on, off Enable debug flags
ipo [off] on, off CMake interprocedural optimization
mpi [off] on, off Enable MPI support
openmp [on] on, off Enable OpenMP support
optimize [off] on, off Enable optimization flags
Installation Phases:
cmake build install
Build Dependencies:
cmake git hdf5 mpi
Link Dependencies:
hdf5 mpi
Run Dependencies:
None
Virtual Packages:
None
.. note::
It should be noted that by default OpenMC builds with ``-O2 -g`` flags which
are equivalent to a CMake build type of `RelwithDebInfo`. In addition, MPI
is OFF while OpenMP is ON.
Assuming one had configured Spack with a GNU 9.3.0 compiler, to build OpenMC
with optimization, OpenMP support and OpenMPI, use:
.. code-block:: sh
spack install openmc+mpi+optimize+openmp ^openmpi %gcc@9.3.0
Although the OpenMP variant is by default ON, one can explicitly write it in
the Spack specification. If a user wanted OpenMC without any MPI or OpenMP support,
the variants can be deactivated:
.. code-block:: sh
spack install openmc~mpi+optimize~openmp
The Python API for OpenMC can be installed in a similar fashion. Looking at the
information page presented with Spack:
.. code-block:: sh
spack info py-openmc
PythonPackage: py-openmc
Description:
The OpenMC project aims to provide a fully-featured Monte Carlo particle
transport code based on modern methods. It is a constructive solid
geometry, continuous-energy transport code that uses ACE format cross
sections. The project started under the Computational Reactor Physics
Group at MIT.
Homepage: http://openmc.readthedocs.io/
Tags:
None
Preferred version:
0.12.0 [git] https://github.com/openmc-dev/openmc.git at tag v0.12.0
Safe versions:
develop [git] https://github.com/openmc-dev/openmc.git on branch develop
master [git] https://github.com/openmc-dev/openmc.git on branch master
0.12.0 [git] https://github.com/openmc-dev/openmc.git at tag v0.12.0
0.11.0 https://github.com/openmc-dev/openmc/tarball/v0.11.0
Variants:
Name [Default] Allowed values Description
============== ============== ==================
mpi [off] on, off Enable MPI support
Installation Phases:
build install
Build Dependencies:
git openmc py-cython py-h5py py-ipython py-lxml py-matplotlib py-mpi4py py-numpy py-pandas py-scipy py-setuptools py-uncertainties python
Link Dependencies:
python
Run Dependencies:
openmc py-h5py py-ipython py-lxml py-matplotlib py-mpi4py py-numpy py-pandas py-scipy py-uncertainties python
Virtual Packages:
None
The only variant for the Python API is MPI. To configure a serial version of the Python API against a serial version of OpenMC:
.. code-block::
spack install py-openmc
.. caution::
When installing any Spack package, dependencies are assumed to be at configured defaults unless otherwise specfied in the
specification on the command line. In the above example, assuming the default options weren't changed in Spack's package
configuration, py-openmc will want to link against a non-optimized openmc. Even if you have a built an optimized openmc,
it will rebuild openmc with optimization OFF. Thus, if you are trying to link against dependencies that were configured
different than defaults, ^openmc[variants] will have to be present on command line.
To build a parallel version of py-openmc that links against a parallel version of openmc that was used in the previous example:
.. code-block::
spack install py-openmc+mpi ^openmc+optimize ^openmpi
.. note::
If py-openmc is given the +mpi variant, it is automatically passed to openmc, no need to specify explicitly.
.. tip::
When installing py-openmc it will use Spack's preferred Python. For example, assuming Spack's preferred Python
is 3.8.7, to build py-openmc against the latest Python 3.7 instead, ``^python@3.7.0:3.7.99`` should be added to the
specification on the command line.
A useful tool in Spack is to look at the dependency tree before installation. This can be observed using
Spack's `spec` tool:
.. code-block::
spack spec py-openmc+mpi ^openmc+optimize %gcc@9.3.0
Input spec
--------------------------------
py-openmc+mpi
^openmc%gcc@9.3.0+optimize
Concretized
--------------------------------
py-openmc@0.12.0%gcc@9.3.0+mpi arch=linux-centos7-x86_64
^git@2.29.0%gcc@9.3.0+svn~tcltk arch=linux-centos7-x86_64
^autoconf@2.69%gcc@9.3.0 arch=linux-centos7-x86_64
^m4@1.4.18%gcc@9.3.0+sigsegv patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 arch=linux-centos7-x86_64
^libsigsegv@2.12%gcc@9.3.0 arch=linux-centos7-x86_64
^perl@5.32.0%gcc@9.3.0+cpanm+shared+threads arch=linux-centos7-x86_64
^berkeley-db@18.1.40%gcc@9.3.0 arch=linux-centos7-x86_64
^gdbm@1.18.1%gcc@9.3.0 arch=linux-centos7-x86_64
^readline@8.0%gcc@9.3.0 arch=linux-centos7-x86_64
^ncurses@6.2%gcc@9.3.0~symlinks+termlib arch=linux-centos7-x86_64
^pkgconf@1.7.3%gcc@9.3.0 arch=linux-centos7-x86_64
^automake@1.16.2%gcc@9.3.0 arch=linux-centos7-x86_64
^curl@7.72.0%gcc@9.3.0~darwinssl~gssapi~libssh~libssh2~nghttp2 arch=linux-centos7-x86_64
^libidn2@2.3.0%gcc@9.3.0 arch=linux-centos7-x86_64
^libunistring@0.9.10%gcc@9.3.0 arch=linux-centos7-x86_64
^libiconv@1.16%gcc@9.3.0 arch=linux-centos7-x86_64
^openssl@1.1.1h%gcc@9.3.0+systemcerts arch=linux-centos7-x86_64
^zlib@1.2.11%gcc@9.3.0+optimize+pic+shared arch=linux-centos7-x86_64
^expat@2.2.10%gcc@9.3.0+libbsd arch=linux-centos7-x86_64
^libbsd@0.10.0%gcc@9.3.0 arch=linux-centos7-x86_64
^gettext@0.21%gcc@9.3.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-centos7-x86_64
^bzip2@1.0.8%gcc@9.3.0+shared arch=linux-centos7-x86_64
^diffutils@3.7%gcc@9.3.0 arch=linux-centos7-x86_64
^libxml2@2.9.10%gcc@9.3.0~python arch=linux-centos7-x86_64
^xz@5.2.5%gcc@9.3.0~pic arch=linux-centos7-x86_64
^tar@1.32%gcc@9.3.0 arch=linux-centos7-x86_64
^libtool@2.4.6%gcc@9.3.0 arch=linux-centos7-x86_64
^openssh@8.4p1%gcc@9.3.0 arch=linux-centos7-x86_64
^libedit@3.1-20191231%gcc@9.3.0 arch=linux-centos7-x86_64
^pcre2@10.35%gcc@9.3.0~jit+multibyte arch=linux-centos7-x86_64
^perl-alien-svn@1.8.11.0%gcc@9.3.0 arch=linux-centos7-x86_64
^apr@1.6.2%gcc@9.3.0 arch=linux-centos7-x86_64
^apr-util@1.6.1%gcc@9.3.0+crypto~gdbm~odbc~pgsql~sqlite arch=linux-centos7-x86_64
^perl-module-build@0.4224%gcc@9.3.0 arch=linux-centos7-x86_64
^sqlite@3.33.0%gcc@9.3.0+column_metadata+fts~functions~rtree arch=linux-centos7-x86_64
^openmc@0.12.0%gcc@9.3.0~debug~ipo+mpi+openmp+optimize build_type=Release arch=linux-centos7-x86_64
^cmake@3.18.4%gcc@9.3.0~doc+ncurses+openssl+ownlibs~qt patches=bf695e3febb222da2ed94b3beea600650e4318975da90e4a71d6f31a6d5d8c3d arch=linux-centos7-x86_64
^hdf5@1.10.7%gcc@9.3.0+cxx~debug+fortran+hl+java+mpi+pic+shared+szip+threadsafe api=none arch=linux-centos7-x86_64
^libszip@2.1.1%gcc@9.3.0 arch=linux-centos7-x86_64
^numactl@2.0.14%gcc@9.3.0 patches=4e1d78cbbb85de625bad28705e748856033eaafab92a66dffd383a3d7e00cc94 arch=linux-centos7-x86_64
^openjdk@11.0.2%gcc@9.3.0 arch=linux-centos7-x86_64
^openmpi@3.1.6%gcc@9.3.0~atomics~cuda~cxx~cxx_exceptions+gpfs~java~legacylaunchers~lustre~memchecker~pmi~singularity~sqlite3+static+thread_multiple+vt+wrapper-rpath fabrics=ofi,verbs schedulers=none arch=linux-centos7-x86_64
^hwloc@1.11.11%gcc@9.3.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-centos7-x86_64
^libpciaccess@0.16%gcc@9.3.0 arch=linux-centos7-x86_64
^util-macros@1.19.1%gcc@9.3.0 arch=linux-centos7-x86_64
^libfabric@1.11.0%gcc@9.3.0~kdreg fabrics=shm,tcp,udp,verbs arch=linux-centos7-x86_64
^rdma-core@20%gcc@9.3.0~ipo build_type=Release arch=linux-centos7-x86_64
^libnl@3.3.0%gcc@9.3.0 arch=linux-centos7-x86_64
^bison@3.6.4%gcc@9.3.0 arch=linux-centos7-x86_64
^help2man@1.47.11%gcc@9.3.0 arch=linux-centos7-x86_64
^flex@2.6.4%gcc@9.3.0+lex patches=09c22e5c6fef327d3e48eb23f0d610dcd3a35ab9207f12e0f875701c677978d3 arch=linux-centos7-x86_64
^findutils@4.6.0%gcc@9.3.0 patches=84b916c0bf8c51b7e7b28417692f0ad3e7030d1f3c248ba77c42ede5c1c5d11e,bd9e4e5cc280f9753ae14956c4e4aa17fe7a210f55dd6c84aa60b12d106d47a2 arch=linux-centos7-x86_64
^texinfo@6.5%gcc@9.3.0 patches=12f6edb0c6b270b8c8dba2ce17998c580db01182d871ee32b7b6e4129bd1d23a,1732115f651cff98989cb0215d8f64da5e0f7911ebf0c13b064920f088f2ffe1 arch=linux-centos7-x86_64
^py-docutils@0.15.2%gcc@9.3.0 arch=linux-centos7-x86_64
^py-setuptools@50.3.2%gcc@9.3.0 arch=linux-centos7-x86_64
^python@3.8.7%gcc@9.3.0+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87 arch=linux-centos7-x86_64
^libffi@3.3%gcc@9.3.0 patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0 arch=linux-centos7-x86_64
^uuid@1.6.2%gcc@9.3.0 arch=linux-centos7-x86_64
^py-cython@0.29.21%gcc@9.3.0 arch=linux-centos7-x86_64
^py-h5py@2.10.0%gcc@9.3.0+mpi arch=linux-centos7-x86_64
^py-mpi4py@3.0.3%gcc@9.3.0 arch=linux-centos7-x86_64
^py-numpy@1.19.4%gcc@9.3.0+blas+lapack arch=linux-centos7-x86_64
^openblas@0.3.12%gcc@9.3.0~consistent_fpcsr~ilp64+pic+shared threads=none arch=linux-centos7-x86_64
^py-pkgconfig@1.5.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-nose@1.3.7%gcc@9.3.0 arch=linux-centos7-x86_64
^py-six@1.14.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-ipython@7.18.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-backcall@0.1.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-decorator@4.4.2%gcc@9.3.0 arch=linux-centos7-x86_64
^py-jedi@0.13.3%gcc@9.3.0 arch=linux-centos7-x86_64
^py-parso@0.6.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pexpect@4.7.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-ptyprocess@0.6.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pickleshare@0.7.5%gcc@9.3.0 arch=linux-centos7-x86_64
^py-prompt-toolkit@2.0.9%gcc@9.3.0 arch=linux-centos7-x86_64
^py-wcwidth@0.1.7%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pygments@2.6.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-traitlets@5.0.4%gcc@9.3.0 arch=linux-centos7-x86_64
^py-ipython-genutils@0.2.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-lxml@4.5.2%gcc@9.3.0~cssselect~html5~htmlsoup arch=linux-centos7-x86_64
^libxslt@1.1.33%gcc@9.3.0+crypto~python arch=linux-centos7-x86_64
^libgcrypt@1.8.5%gcc@9.3.0 arch=linux-centos7-x86_64
^libgpg-error@1.37%gcc@9.3.0 arch=linux-centos7-x86_64
^gawk@5.0.1%gcc@9.3.0 arch=linux-centos7-x86_64
^gmp@6.1.2%gcc@9.3.0 arch=linux-centos7-x86_64
^mpfr@4.0.2%gcc@9.3.0 patches=3f80b836948aa96f8d1cb9cc7f3f55973f19285482a96f9a4e1623d460bcccf0 arch=linux-centos7-x86_64
^autoconf-archive@2019.01.06%gcc@9.3.0 arch=linux-centos7-x86_64
^py-matplotlib@3.3.3%gcc@9.3.0~animation~fonts+image~latex~movies backend=agg arch=linux-centos7-x86_64
^freetype@2.10.1%gcc@9.3.0 arch=linux-centos7-x86_64
^libpng@1.6.37%gcc@9.3.0 arch=linux-centos7-x86_64
^py-certifi@2020.6.20%gcc@9.3.0 arch=linux-centos7-x86_64
^py-cycler@0.10.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-kiwisolver@1.1.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pillow@7.2.0%gcc@9.3.0~freetype~imagequant+jpeg~jpeg2000~lcms~tiff~webp~webpmux~xcb+zlib arch=linux-centos7-x86_64
^libjpeg-turbo@2.0.4%gcc@9.3.0 arch=linux-centos7-x86_64
^nasm@2.15.05%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pyparsing@2.4.7%gcc@9.3.0 arch=linux-centos7-x86_64
^py-python-dateutil@2.8.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-setuptools-scm@4.1.2%gcc@9.3.0+toml arch=linux-centos7-x86_64
^py-toml@0.10.2%gcc@9.3.0 arch=linux-centos7-x86_64
^qhull@2020.1%gcc@9.3.0~ipo build_type=Release arch=linux-centos7-x86_64
^py-pandas@1.1.4%gcc@9.3.0 arch=linux-centos7-x86_64
^py-bottleneck@1.2.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-numexpr@2.7.0%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pytz@2020.1%gcc@9.3.0 arch=linux-centos7-x86_64
^py-scipy@1.5.4%gcc@9.3.0 arch=linux-centos7-x86_64
^py-pybind11@2.5.0%gcc@9.3.0~ipo build_type=Release arch=linux-centos7-x86_64
^py-uncertainties@3.1.4%gcc@9.3.0~docs~optional arch=linux-centos7-x86_64
^py-future@0.18.2%gcc@9.3.0 arch=linux-centos7-x86_64
Once installed, environment/lmod modules can be generated or Spack's `load` feature
can be used to access the installed packages.
.. _Spack: https://spack.readthedocs.io/en/latest/
.. _setup guide: https://spack.readthedocs.io/en/latest/getting_started.html
.. _install_source:
----------------------