I have a SCF job that’s been running for days and was abruptly terminated by a power loss event. I used a command line like this:
qchem -gpu -nt 60 job.inp job.out job
How do I use the information in the job directory, or can it be used, for a restart at the point it was terminated?
You need to copy the scratch files from the old job into a new scratch directory. (Technically you could reuse the old ones but if it’s been running for days I would want a backup in case I screwed this up.) Something like
cp $QCSCRATCH/job $QCSCRATCH/scratch-new
qchem -gpu -nt 60 -save job-new.inp job-new.out scratch-new
where, in job-new.inp, set SCF_GUESS = READ in the $rem. However, this is predicated on the old scratch files still existing and I notice you didn’t use -save in the original job. Does $QCSCRATCH/job exist?
Thanks.
If $QCSCRATCH/job is the “job” found at the end of the command line, yes.
I’ll try that.
Would the same method work if the job was terminated with a ^C ?
Yes, it should work. Generally you should use -save if you want the scratch files to stick around,
qchem [-nt or -gpu flags] -save inputfile outputfile scrdir
to put them in $QCSCRATCH/scrdir. (If you omit the scratch directory name, it gets named after the process number in a way that’s hard to decipher later… will look like qchem191289 or something like that.)
It occurred to me later that the reason your scratch files are around is because the job terminated abnormally (due to equipment failure, ^C, etc.), so they didn’t get erased. If Q-Chem exits normally, it deletes the scratch files behind it unless you use -save.