-
Notifications
You must be signed in to change notification settings - Fork 19
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.gitexport SPACK_MANAGER=${SCRATCH}/spack-manager && source ${SPACK_MANAGER}/start.sh && spack-startspack manager create-env --name exawind --spec 'exawind@master+hypre %gcc'spack env activate -d ${SPACK_MANAGER}/environments/exawindspack manager develop nalu-wind@master; spack manager develop exawind@master;spack manager external --listspack manager external --latest -v gccspack concretize -fspack installcd ${SPACK_MANAGER}/environments/exawind/nalu-windvi unit_tests.Cspack installspack cd -b nalu-windspack build-env nalu-wind ./unittestX
- Quick-Command Workflow Tutorial (10 min)
- List of commands on ascicigpu
export SCRATCH=/scratch/${USER}quick-develop -hquick-develop -d ${SCRATCH}/tutorial -s amr-wind@main+cuda cuda_arch=70spack installdespacktivatequick-activate ${SCRATCH}/tutorialbuild-env-dive -hbuild-env-dive amr-wind./amr_wind_unit_testmakeexitspack cd -els -lh #discuss environment directory if there is time.
- Additional Q&A (10 min)
Other Topics:
- FAQ
- Pre commands for
quick-developfor 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