-
Notifications
You must be signed in to change notification settings - Fork 17
Spack Manager Tutorial 02 18 2022
psakievich edited this page Feb 18, 2022
·
11 revisions
- Introduction to Spack-Manager (20 min)
- Snapshot Workflow Tutorial (20 min)
- Eagle Snapshot Workflow Commands:
export SCRATCH=/scratch/${USER}
cd ${SCRATCH}
git clone --recursive https://github.com/psakievich/spack-manager.git
export SPACK_MANAGER=${SCRATCH}/spack-manager && source ${SPACK_MANAGER}/start.sh && spack-start
spack manager create-env --name exawind --spec 'exawind@master+hypre %gcc'
spack env activate -d ${SPACK_MANAGER}/environments/exawind
spack manager develop nalu-wind@master; spack manager develop exawind@master;
spack manager external --list
spack manager external --latest -v gcc
spack concretize -f
spack install
cd ${SPACK_MANAGER}/environments/exawind/nalu-wind
vi unit_tests.C
spack install
spack cd -b nalu-wind
spack build-env nalu-wind ./unittestX
- Quick-Command Workflow Tutorial (10 min)
- List of commands on ascicigpu
export SCRATCH=/scratch/${USER}
quick-develop -h
quick-develop -d ${SCRATCH}/tutorial -s amr-wind@main+cuda cuda_arch=70
spack install
despacktivate
quick-activate ${SCRATCH}/tutorial
build-env-dive -h
build-env-dive amr-wind
./amr_wind_unit_test
make
exit
spack cd -e
ls -lh #discuss environment directory if there is time.
- Additional Q&A (10 min)
Other Topics:
- FAQ
- Pre commands for
quick-develop
for customization - Monthly information sessions?
- In's and outs of
spack manager external
- CMake script
- How to add your own CMake flags
- How to edit
spack.yaml
- What are the directories in Spack-Manager
Example CMake Script for Nalu-Wind on Eagle:
#!/bin/bash
COMPILER=gcc
TRILINOS_ROOT_DIR=/projects/exawind/exawind-snapshots/views/${COMPILER}
YAML_ROOT_DIR=/projects/exawind/exawind-snapshots/views/${COMPILER}
HYPRE_ROOT_DIR=/projects/exawind/exawind-snapshots/views/${COMPILER}
module use /projects/exawind/exawind-snapshots/modules
module load mpt exawind-${COMPILER}
which cmake
which mpirun
cmake \
-DCMAKE_CXX_COMPILER:STRING=mpicxx \
-DCMAKE_Fortran_COMPILER:STRING=mpif90 \
-DTrilinos_DIR:PATH=${TRILINOS_ROOT_DIR} \
-DYAML_DIR:PATH=${YAML_CPP_ROOT_DIR} \
-DENABLE_HYPRE:BOOL=ON \
-DHYPRE_DIR:PATH=${HYPRE_ROOT_DIR} \
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
-DENABLE_DOCUMENTATION:BOOL=OFF \
-DENABLE_TESTS:BOOL=ON \
.. && nice make -j 16