diff --git a/_episodes/41.advanced.md b/_episodes/41.advanced.md index 6018dc0..0890072 100644 --- a/_episodes/41.advanced.md +++ b/_episodes/41.advanced.md @@ -52,7 +52,7 @@ and we're going to pull an OpenFoam container, which was built on top of MPICH a Since this is a large image, we will pull a copy to /tmp for everyone to share. ```bash -(cd /tmp && [ -e sc22-openfoam_v2012.sif ] || singularity pull docker://quay.io/pawsey/sc22-openfoam:v2012) +(cd /tmp && [ -e sc22-openfoam_v2012.sif ] || singularity pull docker://quay.io/pawsey/sc22-openfoam:v2012 && chmod a+r /tmp/sc22-openfoam_v2012.sif) ``` OpenFoam comes with a collection of executables, one of which is `simpleFoam`. We can use the Linux command `ldd` to investigate the libraries that this executable links to. As `simpleFoam` links to a few tens of libraries, let's specifically look for MPI (`libmpi*`) libraries in the command output: diff --git a/exercises/openfoam/mpirun_para.sh b/exercises/openfoam/mpirun_para.sh index f83bf14..05ba60c 100755 --- a/exercises/openfoam/mpirun_para.sh +++ b/exercises/openfoam/mpirun_para.sh @@ -13,7 +13,6 @@ export SINGULARITY_BINDPATH="$MPICH_ROOT" export SINGULARITYENV_LD_LIBRARY_PATH="$MPICH_LIBS:\$LD_LIBRARY_PATH" - # pre-processing singularity exec $image \ blockMesh | tee log.blockMesh diff --git a/exercises/podman-hpc/podman_hpc_setup.sh b/exercises/podman-hpc/podman_hpc_setup.sh index 6d0d8bb..19b7e0d 100644 --- a/exercises/podman-hpc/podman_hpc_setup.sh +++ b/exercises/podman-hpc/podman_hpc_setup.sh @@ -15,14 +15,15 @@ export PODMANHPC_HOOKS_DIR=/home/training2/.hooks.d export PODMANHPC_MODULES_DIR=/home/training2/etc/modules.d [ -e $PODMANHPC_HOOKS_DIR ] || mkdir $PODMANHPC_HOOKS_DIR +HT=$(which hook_tool) cat << EOF > $PODMANHPC_HOOKS_DIR/02-hook_tool.json { "version": "1.0.0", "hook": { "env": [ - "HOME=/home/$(id -u -n)" + "HOME=${HOME}" ], - "path": "/home/$(id -u -n)/.local/bin/hook_tool", + "path": "${HT}", "args": ["hook_tool"] }, "when": { @@ -34,9 +35,9 @@ cat << EOF > $PODMANHPC_HOOKS_DIR/02-hook_tool.json } EOF -[ -e .local/bin/mksquashfs.static ] || (cd .local/bin && wget https://portal.nersc.gov/project/bigdata/mksquashfs.static) +[ -e ~/.local/bin/mksquashfs.static ] || (cd ~/.local/bin && wget https://portal.nersc.gov/project/bigdata/mksquashfs.static) -chmod a+rx .local/bin/mksquashfs.static +chmod a+rx ~/.local/bin/mksquashfs.static export SCRATCH=$HOME