Maybe this is a silly question…
I know I can use bash redirection to redirect stderr to a file but is there a clean way to redirect stderr output from psi4?
I (and I suspect many others!) run calculations on specific compute nodes, logging in, running the calculations backgrounded, and then monitoring the output file from a different computer. If a calculation dies for some reason, the output file may just end abruptly, because the errors have gone to stderr. If stderr “doesn’t exist”, then this output is lost.
I also seem to remember that at the end of an optimisation, “Optimisation complete” (or similar) is printed to stderr, and I’ve had calculations bail out in the past because it tried to print to stderr but couldn’t because it had been closed.
Is there a simple trick to redirect stderr from within a psi4 input script (rather than having to remember to redirect at the time of running it!)?