casino-mcp 0.2.0
Two things, one release. Stopping a calculation and continuing it now go through CASINO’s
own scripts — haltqmc and runqmc — instead of through signals and file moves of this
layer’s own devising. And the test data became a check on CASINO rather than a record of it:
every calculation the suite reads now lives in this repository, runs in minutes, and can be
re-run against a newly built CASINO to see whether the output format moved under the parser.
pip install casino-mcpOn PyPI: https://pypi.org/project/casino-mcp/0.2.0/
Added
casino_run(resume=true)(casino-mcp run --continue): carry an interrupted run on instead
of starting it again. Which of CASINO's two continuation routes that takes is read out of
outrather than chosen here: a run CASINO stopped onmax_cpu_time/max_real_timeleft
aCONTINUATION INFO:block and is continued byrunqmc --continue, and a run that was
interrupted is continued by a plainrunqmcover theinputthathaltqmc -urewrote —
--continueerrstops there, on continuation info that was never written. A run that reached
its own end is refused: there is nothing to continue. The reply says which route was taken.CASINO_HALTQMC, alongsideCASINO_RUNQMC: an explicit path tohaltqmc, otherwisePATH,
then$CASINO_HOME/bin_qmc/haltqmc.casino-mcp configreports it and says when it is
missing — a job can still be stopped without it, but its directory will not be tidied.examples/: eighteen real CASINO calculations committed with theoutfiles they produced,
and enough of their inputs to be re-run. They are a settings cover, not a sample — chosen out
of PyCasino's 526 so that every runtype, basis type, sampling method, optimiser and
wavefunction option appears at least once, at the smallest total size that achieves it,
together with a run that never printed an energy and one interrupted mid-optimisation.tests/test_examples.py: the tree parses, and it still covers every setting it was
assembled to cover. Runs without CASINO, so a calculation cannot be dropped fromexamples/
without the suite naming the setting that went with it.tools/refresh_examples.pyandtests/integration/test_examples_rerun.py: the tree is
re-run against the installed CASINO and compared with what was committed. The test asserts
only that no phase, keyword or numberparse_outreads has disappeared, which is what a
changed output format looks like from a parser's side. Moved values are reported, never
asserted: a new release may legitimately produce different numbers, andrandom_seeddoes
not pin an optimisation run anyway — it redistributes configurations across MPI processes and
lands somewhere slightly different each time. Efficiency is excluded from the comparison
entirely, being computed from a measured time that rounds to zero on a short block.
Changed
casino_stopno longer signals the whole process tree and clears the lock file itself. It
sends SIGTERM to that job'scasinoprocesses and to nothing else — the same signal
haltqmc -ksends, except that haltqmc's own kill is apkill -x casinoover every CASINO
process the account owns, which on a machine running several jobs would take the others down
too. The ranks are found by session id, becausempirunputs each of them in a process group
of its own andkillpgtherefore never reaches them.runqmcis left alive to finish its
epilogue — the per-node output concatenated intoout, its own lock file removed — and only
a job still running aftertimeouthas its process group signalled and then killed.- Everything a stop then does to the directory is
haltqmc -f -u:config.outtoconfig.in,
the lock and marker files, andinputrewritten for the work that is left. The reply carries
what it did underhalt. Since that rewrite is the one thingrestartcannot undo — CASINO
refusesnewrun : Fwithout theconfig.inrestarting deletes — theinputas it was is
copied into the job directory first, andrestart=trueon a directory whoseinputis set
up to continue is refused with that copy's location. - Breaking:
overwriteis replaced byrestart, which does whatoverwriteonly claimed
to.overwrite=truelifted the refusal to start in a directory that already held anout
and then deleted nothing, sorunqmc— which appends — produced anoutcontaining two
runs, and left the previous.histfiles and configs to be appended to as well.
restart=truedeletes them:out,out_part.N,.out_proc*,vmc.hist,dmc.histand
their numbered backups,config.in/config.outand their_fixed/_nofixedforms,
correlation.out.N,parameters.N.casl,saved_part_N/. Inputs are never touched — the
list is named rather than derived, because the same directory holds the wave function, the
pseudopotentials and acorrelation.datathat is usually hand-edited. The reply carries
removed, the names that went. Nothing is deleted until every check that could refuse the
run has passed. - The parser fixtures under
tests/data/were regenerated on CASINO v3.1.24 and now each keep
theinputthat produced them, so their asserted values can be reproduced rather than
trusted. The DMC fixture moved from krypton to beryllium — 4 electrons instead of 36 — and
from a single statistics block to 2 equilibration and 20 statistics blocks, which is the
shape a wandering DMC population actually shows up in and which nothing was asserting
before. The interrupted fixture was left alone; it was already v3.1.24, and a run that was
killed cannot be reproduced by running. - The integration suite reads
examples/and nothing else:--examples-dir,$CASINO_EXAMPLES
and the dependency on a PyCasino checkout are gone. Installing casino-mcp does not install
PyCasino, sopytest -m integrationnow needs only CASINO itself. - The example calculations were shortened and re-run in one pass, so the tree takes minutes
rather than days to reproduce. This costs statistics and no output format: the longest run
went from 2.5 hours to a couple of minutes with every phase, keyword and printed number
intact. Two examples are cut below the point where CASINO can reblock, which is the one
output shape the tree previously had no instance of.