Persist the owed conformer single points in restart.yml: a restart can rank conf_opt energies against conf_sp energies

Aperta
#1,142 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
53/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, yaml
Ambito
backend, databases

Direzione di ricerca

Start with arc/scheduler.py, especially schedule_jobs, _flush_pending_pipe_conf_sp, and resume_conformer_isomorphism_trsh; trace how conformer energies and running jobs are written to and restored from restart.yml. Add coverage for both restart ranking paths and the kill between submissions described in the issue. Done means owed conformers alone are rerun, completed single points are preserved, and restart files without conf_sp_owed retain current behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

With conf_sp on, a conformer's conf_opt energy is written to conformer_energies[i] when its
conf_opt ends. Its conf_sp is queued in Scheduler._pending_pipe_conf_sp and submitted when
_flush_pending_pipe_conf_sp runs at the end of the loop pass. The restart file stores
conformer_energies and running_jobs, but not the queue. So on restart, a conformer with an
energy and no running job is either done (a conf_sp energy) or owed (a conf_opt energy whose
conf_sp was never submitted), and ARC cannot tell which.

Today the restart treats every such conformer as owed, in the first conformer round and, since
#1120, in a conformer isomorphism troubleshooting round too. It clears the energy and reruns the
conf_sp, or only clears the energy if troubleshooting is off or exhausted. That is correct, but a
finished conformer single point may run once more after a restart.

Proposal: record the owed conf_sp indices per species in restart.yml, e.g.
output[label]['conf_sp_owed']:

  • add an index when a conf_opt ends with conf_sp on;
  • remove it only when that conformer's conf_sp job is submitted, or routed to a pipe;
  • on restart, rerun only the owed indices, and treat the other energies as conf_sp energies.

_flush_pending_pipe_conf_sp clears the pending dict before its first submission saves the
restart file. The owed record must therefore shrink per submission, not per flush, or a kill
between two submissions loses the second one.

A restart file without the field keeps today's behaviour: everything is treated as owed.

Tests:

  • a kill between two submissions of one flush reruns only the unsubmitted conformer;
  • a finished conf_sp is not rerun;
  • an old restart file without the field behaves as now.

#1125 merge of #1120

The work is in /home/alon/Code/ARC-fix-held-jobs-readers. Before the merge, HEAD was
72174bb65c698e04f28080b52778d2664a7f1d80, as the brief expects.

Second case: two restart paths still rank a conf_opt energy next to conf_sp energies
(line numbers at #1120 de31b788e). Both are fixed by the same persisted owed set: an owed index
must be rerun, or its energy cleared, before any ranking.

  1. No conformer job running at restart. schedule_jobs ranks at once at
    arc/scheduler.py:902-906, for a species with any energy and no running conformer job, with
    sp_flag=False, before run_conformer_jobs runs. A kill after the last conf_opt ended and
    before its conf_sp was submitted therefore ranks that conf_opt energy against conf_sp
    energies. This predates the stack and also hits the first round.
  2. Not the first round, and resume_conformer_isomorphism_trsh returns False. This happens
    when the note is exhausted, or when the noted level is on no running conf_opt and no conf_sp
    is running (arc/scheduler.py:1737-1738). The loop at arc/scheduler.py:1840 then skips every
    conformer with an energy, and the ranking at arc/scheduler.py:969 mixes the levels.

Tests to add: one per path, with a stored conf_sp energy next to an owed conf_opt energy. Assert
that the ranking sees conf_sp-level energies only.

Raised by calvinp0 on #1120 (review 6099700668) and by Greptile on #1055 (review comment 4728717512, "Restart skips single-point jobs").

Lingua principale
Python
Stelle
55
Fork
26
Merge medio
3g 3h
PR unite (30g)
8

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ReactionMechanismGenerator/ARC

Tutte le issue di ReactionMechanismGenerator/ARC

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.