From 2cf90cb79fd88eab95f02ff8a01cf159fdabdc31 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Wed, 10 Mar 2021 13:10:15 +0000 Subject: [PATCH 1/9] documented Spack installation in quickinstall --- docs/source/quickinstall.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index e45c552af0..616a6eeae7 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -95,6 +95,38 @@ This will take several minutes to run depending on your internet download speed. .. _options: https://docs.docker.com/engine/reference/commandline/run/ .. _mounting volumes: https://docs.docker.com/storage/volumes/ +---------------------------------- +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. + +To install the latest OpenMC with GNU 9.3.0 without MPI: + +.. code-block:: sh + + spack install openmc~mpi %gcc@9.3.0 + +To install the latest OpenMC with the GNU 9.3.0 compiler and OpenMPI: + +.. code-block:: sh + + spack install openmc+mpi ^openmpi %gcc@9.3.0 + +To install the Python API for OpenMC using GNU 9.3.0 compiler, OpenMPI and latest Python 3.7: + +.. code-block:: sh + + spack install py-openmc+mpi ^openmpi ^python@3.7.0:3.7.99 %gcc@9.3.0 + +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 + --------------------------------------- Installing from Source on Ubuntu 15.04+ --------------------------------------- From ae53953baee634f258fb754a0912970b34d27a45 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Wed, 10 Mar 2021 13:10:48 +0000 Subject: [PATCH 2/9] documented Spack installation in install docs --- docs/source/usersguide/install.rst | 300 +++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index ab2fe2f120..fa24149aec 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -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: ---------------------- From 1ee9f3e79f486d5a6a032482f30f586e5c6003a0 Mon Sep 17 00:00:00 2001 From: Bryan Herman <63422190+bryanherman@users.noreply.github.com> Date: Fri, 12 Mar 2021 07:12:29 -0500 Subject: [PATCH 3/9] Update docs/source/usersguide/install.rst fixed reference link syntax Co-authored-by: Paul Romano --- docs/source/usersguide/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index fa24149aec..0c03391d51 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -78,7 +78,7 @@ are no longer supported. Installing from Source using Spack ---------------------------------- -`Spack`_ is a package management tool designed to support multiple versions and +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. From 80685b44961683cc445b8f6a52825578a7bfbd16 Mon Sep 17 00:00:00 2001 From: Bryan Herman <63422190+bryanherman@users.noreply.github.com> Date: Fri, 12 Mar 2021 07:12:56 -0500 Subject: [PATCH 4/9] Update docs/source/usersguide/install.rst fixed grammar Co-authored-by: Paul Romano --- docs/source/usersguide/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 0c03391d51..a0d12976fb 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -236,7 +236,7 @@ To build a parallel version of py-openmc that links against a parallel version o .. note:: - If py-openmc is given the +mpi variant, it is automatically passed to openmc, no need to specify explicitly. + If py-openmc is given the +mpi variant, it is automatically passed to openmc so there is no need to specify it explicitly. .. tip:: From 4b6f69d0a995a660dcc05882373053a729be627b Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 12 Mar 2021 12:29:54 +0000 Subject: [PATCH 5/9] addressed comments in quick install --- docs/source/quickinstall.rst | 20 +++++--------------- docs/source/usersguide/install.rst | 2 ++ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index 616a6eeae7..e2010a7884 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -101,26 +101,16 @@ 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. +Please follow Spack's `setup guide`_ to configure the Spack system. -To install the latest OpenMC with GNU 9.3.0 without MPI: +To install the latest OpenMC with the Python API, use the following command: .. code-block:: sh - spack install openmc~mpi %gcc@9.3.0 - -To install the latest OpenMC with the GNU 9.3.0 compiler and OpenMPI: - -.. code-block:: sh - - spack install openmc+mpi ^openmpi %gcc@9.3.0 - -To install the Python API for OpenMC using GNU 9.3.0 compiler, OpenMPI and latest Python 3.7: - -.. code-block:: sh - - spack install py-openmc+mpi ^openmpi ^python@3.7.0:3.7.99 %gcc@9.3.0 + spack install py-openmc +For more information about customizations including MPI, see the +:ref:`detailed installation instructions using Spack `. Once installed, environment/lmod modules can be generated or Spack's `load` feature can be used to access the installed packages. diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index a0d12976fb..13bbc1ad48 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -74,6 +74,8 @@ are no longer supported. .. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging .. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto +.. _install-spack: + ---------------------------------- Installing from Source using Spack ---------------------------------- From eae122675ddadcfd546ed7c81b141edc5d2b2ad2 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 12 Mar 2021 12:38:15 +0000 Subject: [PATCH 6/9] fixed additional typo in quickinstall --- docs/source/quickinstall.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index e2010a7884..7906206db6 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -140,7 +140,7 @@ All OpenMC source code is hosted on `GitHub `_. If you have `git `_, the `gcc `_ compiler suite, `CMake `_, and `HDF5 `_ -installed, you can download and install OpenMC be entering the following +installed, you can download and install OpenMC by entering the following commands in a terminal: .. code-block:: sh From 879da99e2e02c20fa3cf7a6d909fd1e1b39d5c77 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 12 Mar 2021 12:43:44 +0000 Subject: [PATCH 7/9] removed spack command output in install docs --- docs/source/usersguide/install.rst | 213 ----------------------------- 1 file changed, 213 deletions(-) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 13bbc1ad48..abd8a4a0ab 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -92,58 +92,6 @@ information: 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 @@ -172,50 +120,6 @@ information page presented with Spack: 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:: @@ -253,123 +157,6 @@ Spack's `spec` tool: 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. From c3aeb41057cff1eca42e30f41a53ab40909e9f77 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 12 Mar 2021 13:25:34 +0000 Subject: [PATCH 8/9] addressed comments in install docs --- docs/source/usersguide/install.rst | 47 ++++++++++++------------------ 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index abd8a4a0ab..274d4c66a5 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -82,11 +82,11 @@ 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. +Please follow 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: +information use: .. code-block:: sh @@ -98,29 +98,18 @@ information: 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: +It is recommended to install OpenMC with the Python API. Information about this +Spack recipe can be found with the following command: .. code-block:: sh spack info py-openmc -The only variant for the Python API is MPI. To configure a serial version of the Python API against a serial version of OpenMC: +.. note:: + + The only variant for the Python API is ``mpi``. + +The most basic installation of OpenMC can be accomplished by entering the following command: .. code-block:: @@ -130,32 +119,34 @@ The only variant for the Python API is MPI. To configure a serial version of the 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, + configuration, py-openmc will link against a non-optimized non-MPI openmc. Even if an optimized openmc was built separately, 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. + different than defaults, ``^openmc[variants]`` will have to be present in the command. -To build a parallel version of py-openmc that links against a parallel version of openmc that was used in the previous example: +For a more performant build of OpenMC with optimization turned ON and MPI provided by OpenMPI, the following command can be +used: -.. code-block:: +.. code-block:: sh spack install py-openmc+mpi ^openmc+optimize ^openmpi .. note:: - If py-openmc is given the +mpi variant, it is automatically passed to openmc so there is no need to specify it explicitly. + ``+mpi`` is automatically forwarded to OpenMC. .. tip:: - When installing py-openmc it will use Spack's preferred Python. For example, assuming Spack's preferred Python + 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. + specification on the command line. Additionally, a compiler type and version can be specified at the end of the + command using ``%gcc@``, ``%intel@``, etc. 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 + spack spec py-openmc+mpi ^openmc+optimize Once installed, environment/lmod modules can be generated or Spack's `load` feature can be used to access the installed packages. From 7e46bb8cde1c50e935f2268b476095eea546baa8 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 12 Mar 2021 14:03:02 +0000 Subject: [PATCH 9/9] fixed Spack hyperlink syntax --- docs/source/quickinstall.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index 7906206db6..2b815734ae 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -99,7 +99,7 @@ This will take several minutes to run depending on your internet download speed. Installing from Source using Spack ---------------------------------- -`Spack`_ is a package management tool designed to support multiple versions and +Spack_ is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms and environments. Please follow Spack's `setup guide`_ to configure the Spack system.