Skip to content

fix(campaign): treat Slurm's default TMPDIR=/tmp as unset - #1771

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/hpc-tmpdir-slurm-default
Nov 12, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/hpc-tmpdir-slurm-default

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1768. A live probe on a RAL compute node (job 415134) showed Slurm sets TMPDIR=/tmp itself when the submit environment has none, so the ${TMPDIR:-...} emitted for a campaign's cache_root: never fired. The generated script now replaces a TMPDIR that is unset, empty or exactly /tmp; any other value still wins.

Closes #1769 (library leg).

API Changes

  • Generated Slurm scripts with cache_root: set: the TMPDIR line becomes if [ -z "${TMPDIR:-}" ] || [ "$TMPDIR" = /tmp ]; then export TMPDIR="<cache_root>/tmp"; fi. Other cache variables unchanged. No change without cache_root:.
    See full details below.

Test Plan

  • pytest test_autofit/campaign: 158 pass; the bash-run test now also covers TMPDIR=/tmp → replaced (unset → replaced, /scratch → kept)
  • Full pytest test_autofit/: 4288 passed, 2 skipped, 1 xfailed
Full API Changes (for automation & release notes)

Changed

  • autofit.campaign.scheduler.slurm._cache_exports: TMPDIR treated as unset when it equals /tmp

Migration

  • None.

Heart RED development override

Authorized live by the human on 2026-11-12 for this task (PyAutoFit#1769): "Override, ship + merge". That covers opening these PRs and merging them in the same turn once every required check is green. Heart remains RED for release purposes; this branch does not claim to fix Heart.

Exact RED reasons at ship time:

  • PyAutoNerves: 2 commit(s) behind origin
  • PyAutoFit: 2 commit(s) behind origin
  • PyAutoLens: on branch feature/mge-feature-review (not main)
  • PyAutoLens: 2 uncommitted source change(s)
  • workspace validation not passing (2 failed, cloud#43034177136: autogalaxy_test scripts/misc/zero_contour_compat_jax.py, autolens_test scripts/misc/critical_curves_zero_contour_jit_grad.py)
  • manifest drift: workspace checkouts (manifest ↔ disk) — 1 mismatch(es) vs PyAutoMind/repos.yaml
  • PyAutoArray: open PR 8d old
  • release validation incomplete: no rehearsal for current source

Branch gates passed: full PyAutoFit suite above; bash -n + three-case env -i source test of each activate.sh.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…ot scripts

Slurm sets TMPDIR to its TmpFS (/tmp) when the submit environment has none,
so the fill-if-unset TMPDIR never fired (RAL probe job 415134).

Refs #1769

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: treat Slurm default TMPDIR=/tmp as unset in HPC environments

1 participant