-
Notifications
You must be signed in to change notification settings - Fork 57
UsingSpack
This guide summarizes our experience using Spack to install ADDA. Spack is a versatile package manager designed for scientific and high-performance computing (HPC) environments. It simplifies software installation by:
- Managing dependencies and resolving environment conflicts.
- Supporting multiple versions and configurations of the same library.
- Allowing flexible environment setups for development and deployment.
This page outlines the steps for setting up and installing ADDa using Spack, including managing variants for different versions such as adda
(default), adda+mpi
, and adda+ocl
.
-
(If needed) Install Spack Prerequisites and make:
sudo apt install bzip2 ca-certificates file g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd make
-
Download the necessary files:
wget https://raw.githubusercontent.com/wiki/adda-team/adda/files/{package.py,spack.yaml}
-
Clone the Spack Repository:
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
-
Set Up the Spack Environment:
. spack/share/spack/setup-env.sh
-
Create the ADDA Package: Create the ADDa package from the GitHub repository:
spack create --name adda https://github.com/adda-team/adda/archive/refs/heads/master.zip
-
Customize the ADDA Package: Remove the default
package.py
file from Spack's built-in packages and replace it with your custom version:rm spack/var/spack/repos/builtin/packages/adda/package.py cp package.py spack/var/spack/repos/builtin/packages/adda/
-
Create and Activate a Spack Environment:
spack env create adda-env spack.yaml spack env activate adda-env
-
Install ADDA within the environment:
spack install --add adda
Note: You can install additional variants (see Variants of ADDA).
-
Load ADDA into your environment:
spack load adda
Note: Regardless of the variant installed in the previous step, this command will remain true.
-
Run ADDA:
adda
Note: Depending on the variant, executables can also be
adda_mpi
oradda_ocl
.
ADDA comes with three variants to choose from:
-
adda
(default, SEQ version) -
adda+mpi
(with MPI support) -
adda+ocl
(with OpenCL support)
If you install more than one variant (e.g., spack install --add adda adda+mpi adda+ocl
), you will need to specify which variant to load when running the spack load adda
command, as the concretizer is set to False
in spack.yaml
. This means you must explicitly choose the variant when loading the executable.
Home (Getting started)
Frequently asked questions
Features
Tutorial
Comparison with other codes
Largest simulations
Compiling ADDA
Installing FFTW3
Installing MPI
Using OpenCL
Installing clFFT
Installing clBLAS
Using sparse mode
Installing MinGW
Using MSYS2
Papers that use ADDA
Awards
References
Links
Acknowledgements
Instruction for committers
Code design & structure
Style guide
Using VS Code
Using Eclipse
Early development history
Adding new ...