Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Prayush Kumar / intro-num-rel

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Setup spectre

Setup spectre

Last edited by Prayush Kumar Apr 29, 2022
Page history

Setup SpECTRE on Debian based OS

Table of Contents

  1. Hardware requirements
  2. Building Dependencies
    1. Get Spack
    2. Build your compiler
    3. Install Spack Environment
    4. Some Python dependencies
  3. Building SpECTRE
    1. Load dependencies
    2. Fetch source code
    3. Configure and Compile Libraries
  4. Sample output from steps 2 and 3 above
  5. Compile the Executable you want!

Hardware requirements

  • 30G of disk space
    • 6-8G for dependencies, 22-24G for SpECTRE libs!!
    • If you have multiple disk partitions on your machine, you can also use one to install dependencies, and another to build SpECTRE
  • ??G of RAM

Building dependencies of SpECTRE with Spack

Get Spack

We will use a package manager called SPACK. The first step is to fetch SPACK from github with:

git clone -c feature.manyFiles=true https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh 

Build your compiler

Now build the compiler we want to use first:

spack install gcc@9.4.0
spack load gcc@9.4.0
spack compiler find

At this point the newly installed version of GCC should appear in your list of compilers:

spack compilers

Install Spack Environment

Next, save this package configuration file as spectre.yaml.

Using this file we will create a SPACK environment, as:

spack env create spectre_gcc spectre.yaml
spack env activate spectre_gcc -p

Make sure that the newly installed version of GCC is still visible inside this environment, by running:

spack compilers

Now we will concretize the list & configuration of packages to be installed:

spack concretize -Uf

And finally install all the dependencies with

spack install -U

After following these steps with a fresh installation of spack, I find the following packages to have been installed:

$ spack find
==> In environment spectre_gcc
==> Root specs
blaze@3.8                           cmake@3.12:  jemalloc              py-matplotlib     py-scipy
boost@1.60: +math+program_options   doxygen      libsharp ~mpi~openmp  py-nbconvert      python@3.7:
brigand@master                      gcc@9.4.0    libxsmm@1.16.1:       py-numpy          yaml-cpp@0.6.3
catch2@2.8:                         gsl          openblas              py-pybind11@2.6:
charmpp@6.10.2:  backend=multicore  hdf5 ~mpi    py-h5py ~mpi          py-pyyaml

==> 116 installed packages
-- linux-centos7-zen2 / gcc@9.4.0 -------------------------------
autoconf@2.69        libpng@1.6.37         py-flit-core@3.6.0            py-pybind11@2.7.1
automake@1.16.5      libsharp@1.0.0        py-fonttools@4.29.1           py-pycparser@2.20
berkeley-db@18.1.40  libsigsegv@2.13       py-gast@0.5.3                 py-pygments@2.10.0
bison@3.8.2          libsodium@1.0.18      py-gevent@1.5.0               py-pyparsing@3.0.6
blaze@3.8            libtool@2.4.6         py-greenlet@1.1.2             py-pyrsistent@0.18.0
boost@1.78.0         libxml2@2.9.12        py-h5py@3.6.0                 py-python-dateutil@2.8.2
brigand@master       libxsmm@1.17          py-ipython-genutils@0.2.0     py-pythran@0.10.0
bzip2@1.0.8          libyaml@0.2.5         py-jinja2@3.0.3               py-pyyaml@6.0
catch2@2.13.8        libzmq@4.3.4          py-jsonschema@4.4.0           py-pyzmq@22.3.0
charmpp@7.0.0        m4@1.4.19             py-jupyter-client@7.1.2       py-scipy@1.8.0
cmake@3.22.3         mpc@1.1.0             py-jupyter-core@4.9.2         py-setuptools@59.4.0
diffutils@3.8        mpfr@3.1.6            py-jupyterlab-pygments@0.1.2  py-setuptools-scm@6.3.2
doxygen@1.9.3        nasm@2.15.05          py-kiwisolver@1.3.2           py-setuptools-scm-git-archive@1.1
expat@2.4.6          ncurses@6.2           py-markupsafe@2.0.1           py-six@1.16.0
findutils@4.8.0      ninja@1.10.2          py-matplotlib@3.5.1           py-testpath@0.6.0
flex@2.6.3           openblas@0.3.20       py-mistune@0.8.4              py-tomli@1.2.2
freetype@2.11.1      openssl@1.1.1n        py-nbclient@0.5.5             py-tornado@6.1
gcc@9.4.0            perl@5.34.0           py-nbconvert@6.4.2            py-traitlets@5.1.1
gdbm@1.19            pkgconf@1.8.0         py-nbformat@5.1.3             py-webencodings@0.5.1
gettext@0.21         py-attrs@21.4.0       py-nest-asyncio@1.5.4         py-wheel@0.37.0
gmp@6.2.1            py-beniget@0.4.1      py-numpy@1.22.3               python@3.9.10
gsl@2.7              py-bleach@4.1.0       py-packaging@21.3             qhull@2020.2
hdf5@1.12.1          py-certifi@2021.10.8  py-pandocfilters@1.5.0        readline@8.1
jemalloc@5.2.1       py-cffi@1.15.0        py-pillow@9.0.0               sqlite@3.37.2
libbsd@0.11.5        py-cppy@1.1.0         py-pip@21.3.1                 tar@1.34
libffi@3.4.2         py-cycler@0.11.0      py-pkgconfig@1.5.5            util-linux-uuid@2.37.4
libiconv@1.16        py-cython@0.29.24     py-ply@3.11                   xz@5.2.5
libjpeg-turbo@2.1.0  py-defusedxml@0.7.1   py-poetry-core@1.0.7          yaml-cpp@0.6.3
libmd@1.0.4          py-entrypoints@0.4    py-py@1.11.0                  zlib@1.2.11

Some Python dependencies

Finally, install a few Python packages that will be needed to build documentation with doxygen:

spack load python
spack load py-h5py
spack load py-nbconvert
spack load py-numpy
spack load py-matplotlib
spack load py-pybind11
spack load py-pyyaml
spack load py-scipy

pip3 install beautifulsoup4 pybtex

Building SpECTRE from source

Load dependencies

We start with loading into the current environment all the dependencies we installed above. We will assume you have already spack in current environment.

load_spectre_deps() {
spack env activate spectre_gcc -p

spack load gcc@9.4.0
spack load blaze
spack load boost
spack load brigand
spack load catch2
spack load charmpp
spack load cmake
spack load doxygen
spack load git
spack load gsl
spack load hdf5
spack load jemalloc
spack load libsharp
spack load libxsmm
spack load openblas
spack load python
spack load py-h5py
spack load py-nbconvert
spack load py-numpy
spack load py-matplotlib
spack load py-pybind11
spack load py-pyyaml
spack load py-scipy
spack load yaml-cpp
}


load_spectre_deps

Fetch source code

git clone https://github.com/sxs-collaboration/spectre.git

cd spectre
git checkout v2022.02.08

Configure and Compile Libraries

export SPECTRE_ROOT=.... # SOME PATH WHERE YOU WANT TO BUILD SPECTRE
export CHARM_ROOT=$(spack location --install-dir charmpp)


cd $SPECTRE_ROOT
mkdir build && cd build
cmake -D CHARM_ROOT=$CHARM_ROOT $SPECTRE_ROOT
make -j 4

Build Output

The above instructions have been recently tested to work with Ubuntu 20.04 and Scientic Linux 6. Here is the output from all steps above on SL6.

Compile the Executable you want!

  Clone repository
  • Home
  • Setup spec
  • Setup spectre
  • Spectre demo
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.