Skip to content

HPC Admin Notes

Samuel Jenness edited this page Oct 12, 2026 · 3 revisions

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.

Shared Spack instance

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's renv library, not from R itself.
  • Configuration scopes, highest priority first: etc/spack/ in the instance, the user's ~/.spack, the site scope etc/spack/site/, system, and defaults.
  • /projects/epimodel/spack/var/spack/repos/builtin is an old Spack 0.x recipe tree (742 MB, 12/4/24) that Spack 1.x does not use.

Package recipes: one shared clone

Spack 1.x keeps its package recipes in a separate git repository, spack/spack-packages. By default each user's first Spack command clones it into ~/.spack/package_repos/ (about 1.2 GB of home quota and two minutes, also inside a job with a fresh home directory). Since 10/12/26 the site configuration /projects/epimodel/spack/etc/spack/site/repos.yaml points everyone at one shared, group-readable clone instead:

repos:
  builtin:
    git: https://github.com/spack/spack-packages.git
    destination: /projects/epimodel/spack/var/spack/package_repos/spack-packages

The clone is owned by sjennes and read-only for the group. It was set up at commit 63d7f6f5 (10/6/26), the commit the R builds were made with, and was checked on 10/12/26: a new user's spack load r@4.6.1 takes about a second without cloning anything, and loads the same R builds as before, on the login node and on compute nodes.

  • To update the recipes, run spack repo update builtin as sjennes. Updating changes recipes, not installed packages; check that spack load r@4.6.1 and spack load r@4.5.1 still find the same builds afterward.
  • To undo the setup, rename etc/spack/site/repos.yaml; users then clone their own copy again on their next Spack command.
  • Users' old private clones in ~/.spack/package_repos/ are no longer used and can be deleted.

What is installed in the Spack R libraries

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.

PNG and JPEG output

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.

renv cache

Each user has their own renv cache in ~/.cache/R/renv (the renv default). There is no shared lab cache.

Housekeeping

  • On 10/12/26 we moved two unused items into /projects/epimodel/_retired/2026-10-12/: renv_shared_cache (owner aleguil, 339 MB), an old shared renv cache for R 4.3 only, last written 1/15/24; and the shared/ folder holding compilers.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.

ARTnet example objects

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.

Clone this wiki locally