Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions sh/tlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
TLC never removes a metadir it was killed in, and a model's can reach tens of
GB, so each run's lives under the checkout's `.tmp/tlc/`, is removed when the
run exits, and holds a lock the kernel drops when the run dies, however it
dies. A run first removes every metadir whose lock nobody holds.
dies. A run first removes every metadir whose lock nobody holds. Java's temp
dir points into the metadir too, since the JVM ignores TMPDIR and TLC leaves a
`tlc-<n>` directory there on every run.
"""

import fcntl
Expand Down Expand Up @@ -95,7 +97,8 @@ def main(argv):
signal.signal(signal.SIGTERM, lambda *_: sys.exit(143))
start, before = time.monotonic(), resource.getrusage(resource.RUSAGE_CHILDREN)
try:
command = ["nice", "-n", "19", java, "-Xmx4g", "-XX:+UseParallelGC", "-cp", cp, "tlc2.TLC"]
command = ["nice", "-n", "19", java, "-Xmx4g", "-XX:+UseParallelGC", f"-Djava.io.tmpdir={meta}"]
command += ["-cp", cp, "tlc2.TLC"]
command += ["-workers", "4", "-checkpoint", "0", "-cleanup", "-noGenerateSpecTE", "-metadir", str(meta)]
status = subprocess.run([*command, *args, spec], cwd=ROOT, pass_fds=(fd,)).returncode
except KeyboardInterrupt:
Expand Down