Repository navigation
HPC Admin Notes
Who this is for: lab members who maintain the shared setup on the RSPH cluster. New members can skip this page. Facts are as of 10/12/26.
R and other tools come from the lab's Spack instance at /projects/epimodel/spack (Spack 1.3.0.dev0), owned by sjennes. Users load it as described in Using R via Spack on the HPC. We do not use Spack environments.
- Spack builds R with
--without-recommended-packages, so packages such as Matrix, MASS, lattice, and survival come from each project'srenvlibrary, not from R itself. - Configuration scopes, highest priority first:
etc/spack/in the instance, the user's~/.spack, the site scopeetc/spack/site/, system, and defaults. -
/projects/epimodel/spack/var/spack/repos/builtinis an old Spack 0.x recipe tree (742 MB, 12/4/24) that Spack 1.x does not use.
etc/spack/defaults/base/repos.yaml points the builtin package repository at GitHub with no shared destination, so every user's first Spack command clones spack/spack-packages into ~/.spack/package_repos/ (about 1.2 GB of home quota and two minutes; it also happens inside a job with a fresh home directory). A shared, read-only clone avoids this. It was tested on 10/12/26 with a user-scope repos.yaml pointing at a read-only clone: spack load r@4.6.1 took under a second with no clone, and loaded the same R prefix as before. To set it up at site scope, run as sjennes on the login node:
. /projects/epimodel/spack/share/spack/setup-env.sh
DEST=/projects/epimodel/spack/var/spack/package_repos/spack-packages
COMMIT=63d7f6f57dfce15fd1181436cd7400b1b25663b2 # the commit in use on 10/12/26
SITE=/projects/epimodel/spack/etc/spack/site/repos.yaml
if [ -e "$SITE" ]; then cp -p "$SITE" "$SITE.bak-2026-10-12"; fi
mkdir -p "$(dirname "$DEST")"
git init --quiet "$DEST"
git -C "$DEST" remote add origin https://github.com/spack/spack-packages.git
git -C "$DEST" config feature.manyFiles true
git -C "$DEST" fetch --quiet --depth=2 origin "$COMMIT"
git -C "$DEST" checkout --quiet -b develop "$COMMIT"
git -C "$DEST" config branch.develop.remote origin
git -C "$DEST" config branch.develop.merge refs/heads/develop
chmod -R g+rX,go-w "$DEST"
cat > "$SITE" <<'EOF'
# Shared clone of the builtin package recipes, so users do not each clone
# spack-packages into ~/.spack/package_repos. Owned by sjennes, read-only for
# the group. Update it as sjennes with: spack repo update builtin
repos:
builtin:
git: https://github.com/spack/spack-packages.git
destination: /projects/epimodel/spack/var/spack/package_repos/spack-packages
EOF
chmod 644 "$SITE"
spack config blame repos | grep destination # should cite etc/spack/site/repos.yaml
spack load r@4.6.1 && type -P RTo undo it, rename etc/spack/site/repos.yaml. Once it is in place, remove the "first Spack command" warning from Using R via Spack on the HPC.
Every Spack build of R has its own site library, owned by sjennes and readable by the whole lab. Anything installed there is visible to everyone who loads that R, and R uses it silently when a package is not in the user's or the project's library.
| Build | Non-base packages | Notes |
|---|---|---|
r@4.1.2 |
98, plus 14 stale 00LOCK-* folders |
EpiModel 2.2.1 |
r@4.2.0 |
142 | EpiModel 2.2.1, renv 0.15.5 |
r@4.2.2 |
146 | EpiModel 2.3.1, renv 0.17.0 |
r@4.3.0 |
35 | rmarkdown and its dependencies |
r@4.2.1, r@4.3.1, r@4.4.0, r@4.4.1, r@4.5.1
|
1 to 3 each | renv only (none in 4.4.1) |
r@4.0.5, r@4.1.3, r@4.3.2, r@4.6.1
|
0 |
Do not install project packages into these libraries; projects get theirs from renv.
capabilities() reports png, jpeg, tiff, cairo, and X11 all FALSE in r@4.6.1 and r@4.5.1, so png() fails and svg() fails, while pdf() works. Users can install ragg 1.4.0 and use ragg::agg_png() (tested); ragg 1.5 and later do not build because the nodes lack libwebp-devel. A permanent fix is to build R with the +X variant (spack install r@4.6.1+X with the same compiler), the recipe's only variant that turns on cairo, libpng, jpeg, and tiff. That build gets a new hash, so R/hpc_configs.R and these pages would need to name it.
Each user has their own renv cache in ~/.cache/R/renv (the renv default). There is no shared lab cache.
- On 10/12/26 we moved two unused items into
/projects/epimodel/_retired/2026-10-12/:renv_shared_cache(owneraleguil, 339 MB), an old shared renv cache for R 4.3 only, last written 1/15/24; and theshared/folder holdingcompilers.yaml(5/31/22), a Spack 0.x compilers file that Spack 1.x ignores. To restore them, move them back to/projects/epimodel/. Delete the folder after 1/12/27 if nobody has asked for them.
The example epistats-example.rds and netstats-example.rds objects shipped in ARTnet's inst/ folder let people run EpiModelHIV without access to ARTnetData. To rebuild them, run the calls documented in the ARTnet README with network.size = 1e4 (the size of the shipped objects; the README says 1e3), trim epistats, and save both into the package:
library(ARTnet)
epistats <- build_epistats(
geog.lvl = "city", geog.cat = "Atlanta",
init.hiv.prev = c(0.33, 0.137, 0.084), race = TRUE, time.unit = 7
)
netparams <- build_netparams(epistats = epistats, smooth.main.dur = TRUE)
netstats <- build_netstats(
epistats, netparams, expect.mort = 0.000478213, network.size = 1e4
)
epistats <- trim_epistats(epistats)
saveRDS(epistats, "inst/epistats-example.rds") # from the ARTnet repo root
saveRDS(netstats, "inst/netstats-example.rds")Do not trim netstats: trim_netstats() drops the main, casual, and one-time target statistics that the models need.
EpiModel Research Lab wiki. Something out of date or unclear? Post in #coding-help on the lab Slack, or fix it yourself: see Contributing to This Wiki.
0. Start here
1. Your computer
2. Learn EpiModel
3. First project
4. Model code
5. HPC
- Access and login
- Environment setup
- Rules, storage, and help
- Files
- Git
- R via Spack
- srun
- sbatch
- Monitoring jobs
- Project workflows
- Checkpoints
6. Calibrate and analyze
7. Publish
8. Admin