Skip to content

Commit

Permalink
Merge pull request #965 from dholt/slurm-epi-tmp-fix
Browse files Browse the repository at this point in the history
Improved cleanup in Slurm epilog
  • Loading branch information
dholt authored Jun 16, 2021
2 parents 291b212 + 22c570a commit 3d3e0dd
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 20 deletions.
5 changes: 5 additions & 0 deletions docs/slurm-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ Now that Slurm is installed, try a ["Hello World" example using MPI](../../workl

Read through the [slurm usage guide](slurm-usage.md) and [Open OnDemand guide](ood.md) for more information.

## Prolog and Epilog

The default Slurm deployment includes a collection of prolog and epilog scripts that should be modified to suit a particular system.
For more information, see the [prolog/epilog documentation](slurm-prolog-epilog/README.md).

## Node Health Check

The default Slurm deployment includes setting up [Node Health Check](https://github.com/mej/nhc).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -ex

if [[ -n "$SLURM_JOB_USER" && "$SLURM_JOB_USER" != "root" ]]; then
logger -s -t slurm-epilog 'Removed residual user files'
for dir in /tmp /dev/shm ; do
find "${dir}" -user "${SLURM_JOB_USER}" -print0 | xargs -0 -r rm -fr ||:
done
fi
6 changes: 6 additions & 0 deletions roles/slurm/templates/etc/slurm/epilog.d/80-exclusive-cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ex

# Cleanup caches
sync
echo 3 > /proc/sys/vm/drop_caches
20 changes: 0 additions & 20 deletions roles/slurm/templates/etc/slurm/epilog.d/80-exclusive-tmpfiles

This file was deleted.

0 comments on commit 3d3e0dd

Please sign in to comment.