-
Notifications
You must be signed in to change notification settings - Fork 161
Generic Instructions for HPC
Jack Betteridge edited this page Jul 20, 2022
·
1 revision
- Follow getting started guide
- Ensure develop branch is installed
- Ensure desired compilers are known to spack, should be picked up by
spack compiler find
- Ensure system packages (that you don't want spack to install) are known to spack, some may be picked up by
spack external find
, others may require manual intervention.
- You may want to specify the system MPI as the correct MPI for spack to use. This appears to be quite difficult, a starting template for the
~/.spack/packages.yaml
might be:If Spack's PETSc package doesn't think this spec line is suitable it will try to build its own MPICH.packages: mpich: externals: - spec: [email protected] prefix: /opt/mpich buildable: False
Make sure the spack setup-env.sh
file has been sourced and you can run spack commands before moving to the next section.
- Clone the above repo, using
git clone https://github.com/firedrakeproject/firedrake-spack.git
# or
git clone [email protected]:firedrakeproject/firedrake-spack.git
- Add the repository to spack
spack repo add <repo directory>
- Create an spack environment
spack env create -d ./firedrake
- Activate that environment
spack env activate -p ./firedrake
- To avoid a bunch of errors add a whole bunch of packages to the development package list:
spack develop py-firedrake@develop spack develop libsupermesh@develop spack develop petsc@develop spack develop chaco@petsc spack develop py-fiat@develop spack develop py-finat@develop spack develop py-islpy@develop spack develop py-petsc4py@develop spack develop py-pyadjoint@develop spack develop py-pyop2@develop spack develop py-coffee@develop spack develop py-loopy@develop spack develop py-cgen@develop spack develop py-codepy@develop spack develop py-genpy@develop spack develop py-tsfc@develop spack develop py-ufl@develop
- Install firedrake using
spack add py-firedrake@develop %gcc ^mpich ^openblas
-
%gcc
specifies the compiler, you may wish to specify a version (eg:%[email protected]
), ommiting this will use the default compiler -
^mpich
specifies which MPI to use. If you set an MPI system package be sure to use this (eg:^[email protected]
) -
^openblas
specifies which BLAS/LAPACK library to use. If you set an BLAS/LAPACK system package be sure to use this (eg:^[email protected]
) - You can further specify the Python version by adding
^[email protected]
for Python 3.10 or setting the system python if it's set up in system packages
-
-
spack install
Will install everything- Add
--fail-fast
to stop at the first package with an install error - Adding
2>&1 | tee spack-firedrake-install.log
to the end of the command will save all output to a log file that you can send if you need someone else to look over the output. spack install --fail-fast 2>&1 | tee spack-firedrake-install.log
- Add
- Test you can import Firedrake by running
python -c "from firedrake import *"
- If this fails, before trying anything else, deactivate the environment with
spack env deactivate
and reactivate withspack env activate -p ./firedrake
(as above) and try runningpython -c "from firedrake import *"
again. This appears to be a shortcoming of spack (related to#10801?).
- If this fails, before trying anything else, deactivate the environment with
- Run the basic functionality tests:
cd $SPACK_ENV/py-firedrake pytest tests/regression/ -k "poisson_strong or stokes_mini or dg_advection"
- Run the full test suite:
cd $SPACK_ENV/src/firedrake pytest tests
Building locally
Tips
- Running Firedrake tests with different subpackage branches
- Modifying and Rebuilding PETSc and petsc4py
- Vectorisation
- Debugging C kernels with
lldb
on MacOS - Parallel MPI Debugging with
tmux-mpi
,pdb
andgdb
- Parallel MPI Debugging with VSCode and
debugpy
- Modifying generated code
- Kernel profiling with LIKWID
- breakpoint() builtin not working
- Debugging pytest with multiple processing
Developers Notes
- Upcoming meeting 2024-08-21
- 2024-08-07
- 2024-07-24
- 2024-07-17
- 2024-07-10
- 2024-06-26
- 2024-06-19
- 2024-06-05
- 2024-05-29
- 2024-05-15
- 2024-05-08
- 2024-05-01
- 2024-04-28
- 2024-04-17
- 2024-04-10
- 2024-04-03
- 2024-03-27
- 2024-03-20
- 2024-03-06
- 2024-02-28
- 2024-02-28
- 2024-02-21
- 2024-02-14
- 2024-02-07
- 2024-01-31
- 2024-01-24
- 2024-01-17
- 2024-01-10
- 2023-12-13
- 2023-12-06
- 2023-11-29
- 2023-11-22
- 2023-11-15
- 2023-11-08
- 2023-11-01
- 2023-10-25
- 2023-10-18
- 2023-10-11
- 2023-10-04
- 2023-09-27
- 2023-09-20
- 2023-09-06
- 2023-08-30
- 2023-08-23
- 2023-07-12
- 2023-07-05
- 2023-06-21
- 2023-06-14
- 2023-06-07
- 2023-05-17
- 2023-05-10
- 2023-03-08
- 2023-02-22
- 2023-02-15
- 2023-02-08
- 2023-01-18
- 2023-01-11
- 2023-12-14
- 2022-12-07
- 2022-11-23
- 2022-11-16
- 2022-11-09
- 2022-11-02
- 2022-10-26
- 2022-10-12
- 2022-10-05
- 2022-09-28
- 2022-09-21
- 2022-09-14
- 2022-09-07
- 2022-08-25
- 2022-08-11
- 2022-08-04
- 2022-07-28
- 2022-07-21
- 2022-07-07
- 2022-06-30
- 2022-06-23
- 2022-06-16
- 2022-05-26
- 2022-05-19
- 2022-05-12
- 2022-05-05
- 2022-04-21
- 2022-04-07
- 2022-03-17
- 2022-03-03
- 2022-02-24
- 2022-02-10
- 2022-02-03
- 2022-01-27
- 2022-01-20
- 2022-01-13
- 2021-12-15
- 2021-12-09
- 2021-11-25
- 2021-11-18
- 2021-11-11
- 2021-11-04
- 2021-10-28
- 2021-10-21
- 2021-10-14
- 2021-10-07
- 2021-09-30
- 2021-09-23
- 2021-09-09
- 2021-09-02
- 2021-08-26
- 2021-08-18
- 2021-08-11
- 2021-08-04
- 2021-07-28
- 2021-07-21
- 2021-07-14
- 2021-07-07
- 2021-06-30
- 2021-06-23
- 2021-06-16
- 2021-06-09
- 2021-06-02
- 2021-05-19
- 2021-05-12
- 2021-05-05
- 2021-04-28
- 2021-04-21
- 2021-04-14
- 2021-04-07
- 2021-03-17
- 2021-03-10
- 2021-02-24
- 2021-02-17
- 2021-02-10
- 2021-02-03
- 2021-01-27
- 2021-01-20
- 2021-01-13
- 2021-01-06