Skip to content

Terminal Based Tutorial 3 11 22

psakievich edited this page Mar 11, 2022 · 3 revisions

Introduction (10 min)

Tutorial Document

Set up Spack-Manager:

# for the first time
git clone --recursive https:github.com/psakievich/spack-manager
export SPACK_MANAGER=$(pwd)/spack-manager
source $SPACK_MANAGER/start.sh
# to update a preinstalled spack-manager
cd $SPACK_MANAGER
git pull origin main
git submodule update
source $SPACK_MANAGER/start.sh

Set up an environment: (SNL - ascicgpu or cee) (NREL - eagle)

First we'll show pre-clone due to issues on eagle

mkdir amr-dev && cd amr-dev
# clone or symlink amr-wind
git clone --recursive https://github.com/Exawind/amr-wind
# ln -s /path/to/my/amr-wind amr-wind
quick-develop -h 
quick-develop -s amr-wind@main
# discuss what is going on in each step
spack install

While we wait for it to build show setting up with cloning for you, and discuss what is in the environment

quick-develop -d $SCRATCH/amr-dev -s amr-wind@main
spack cd -e
vim spack.yaml
vim include.yaml
vim external.yaml

Show difference in DAG between using externals and not using externals, and comment on quick-create-env

Show setting up a more complicated environment but fake it so we don't have to wait for clones

mkdir temp && cd temp
mkdir exawind && amr-wind && nalu-wind && trilinos && hypre && openfast
quick-develop -s exawind@main+openfast+cuda+amr_wind_gpu~nalu_wind_gpu cuda_arch=70 amr-wind@main nalu-wind@master trilinos@develop hypre@develop [email protected]

Once build is done let's run some tests

spack cd -b amr-wind
spack build-env amr-wind ./amr_wind_unit_tests
cd ${HOME}
spack env st
build-env-dive amr-wind
./amr_wind_unit_tests
make
exit
spack env deactivate 
quick-activate ./

Questions?

Other topics:

  1. Not just Exawind
  2. Configuring a new machine
Clone this wiki locally