Skip to content

Commit 8a70942

Browse files
committed
[fix.deploy.mu.D8+] the scratch path, said twice on purpose — in code and where an operator can see it
Same defect as backend/scratch.py, at the other entry point. Measured 2026-08-11: pyscf's cubegen writes the whole 6.7 MB cube into TMPDIR before returning it, and /tmp on this box is a 30 GB tmpfs with a PER-USER quota. When the quota is tight the calculation dies with `OSError: [Errno 122] Disk quota exceeded` from inside cubegen.write — an error a chemist can do nothing with, arriving from a path that has nothing to do with them. scratch.py already sets TMPDIR in code, so this is redundant by design: the unit file states it so an operator reading the unit can SEE where the scratch lives instead of having to find it in a module that a server imports for its side effect. Worth recording because the same quota exhausted itself again today and took the shell down for twenty minutes — the failure does not surface as "disk full" anywhere useful.
1 parent 43d2b6b commit 8a70942

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎deploy/systemd/dirac-fields.service‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ StartLimitBurst=5
2626
[Service]
2727
Type=simple
2828
WorkingDirectory=/home/ivan/dirac
29+
# Scratch goes to DISK, not to /tmp. Measured 2026-08-11: pyscf's cubegen writes the
30+
# whole 6.7 MB cube into TMPDIR before returning it, and /tmp here is a 30 GB tmpfs with
31+
# a PER-USER quota. With the quota tight, the same calculation dies with
32+
# `OSError: [Errno 122] Disk quota exceeded` from inside cubegen.write — an error a
33+
# chemist can do nothing with, arriving from a path that has nothing to do with them.
34+
# backend/scratch.py sets this in code as well, so every entry point is covered; this
35+
# line exists so an operator reading the unit can SEE where the scratch lives.
36+
Environment=TMPDIR=/home/ivan/.cache/dirac/scratch
37+
Environment=PYSCF_TMPDIR=/home/ivan/.cache/dirac/scratch
2938
ExecStart=/home/ivan/dirac/backend/env/bin/python backend/field_server.py
3039
Restart=on-failure
3140
RestartSec=5

‎deploy/systemd/dirac-physics.service‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ StartLimitBurst=5
2626
[Service]
2727
Type=simple
2828
WorkingDirectory=/home/ivan/dirac
29+
# Scratch goes to DISK, not to /tmp. Measured 2026-08-11: pyscf's cubegen writes the
30+
# whole 6.7 MB cube into TMPDIR before returning it, and /tmp here is a 30 GB tmpfs with
31+
# a PER-USER quota. With the quota tight, the same calculation dies with
32+
# `OSError: [Errno 122] Disk quota exceeded` from inside cubegen.write — an error a
33+
# chemist can do nothing with, arriving from a path that has nothing to do with them.
34+
# backend/scratch.py sets this in code as well, so every entry point is covered; this
35+
# line exists so an operator reading the unit can SEE where the scratch lives.
36+
Environment=TMPDIR=/home/ivan/.cache/dirac/scratch
37+
Environment=PYSCF_TMPDIR=/home/ivan/.cache/dirac/scratch
2938
ExecStart=/home/ivan/dirac/backend/env/bin/python backend/physics/server.py
3039
Restart=on-failure
3140
RestartSec=5

0 commit comments

Comments
 (0)