pyiron_base
pyiron_base copied to clipboard
job.restart copies OUTPUT of parent job??
I ran into a nasty problem with "job.restart" for SPHInX, but I suspect the root issue in pyiron_base .
I used job.restart to create a follow-up job of a successful calculation (changing the charge of the system). Then I used new_job.get_electronic_structure () to get the eigenvalues - and they were identical to the PREVIOUS calculation, even though the raw output of SPHInX shows different numbers.
After quite a bit of debugging, I figured out what happened: apparently, the entire OUTPUT of the parent job is copied to the restart. Then (as a bug or feature?), the sphinx eps.dat parser only puts the newly parsed values into output.generic.dft if there aren't any already (this was introduced by @samwaseda last November). Thus, the eigenvalues get never updated to the new ones.
You may argue in many ways why I am stupid, or why I shouldn't use restart for this, or that the collect_eps_dat should update. But for me the core question is this: Is there any good reason to copy the output of the parent in the first place? If the restarted job does not populate the same fields in the output as its parent (for whatever reason, and I could give you reasonable ones), the restarted output will contain junk from its parent.
You can quickly reproduce this behavior: just call a restart from any job and inspect its output before running the job. Common sense says that a job that has not run cannot have any output. pyiron behaves differently.