<div dir="ltr">The simplest way that I can think of is to check whether the lawp1.error file is empty or not after executing x lapw1. If it is empty after executing 'x lapw1', then lapw1 terminates without any errors. If it is not, then lapw1 terminates with error(s).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 8, 2020 at 2:23 PM Rubel, Oleg <<a href="mailto:rubelo@mcmaster.ca">rubelo@mcmaster.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear WIEN2k community,<br>
<br>
suppose we have a code that includes a sequence of commands. Before running the next command, I would like to check if the previous one completed successfully. It is convenient to use exit codes for that purpose. Here is a small example in bash (looking for a file that does not exist):<br>
<br>
[rubel@gra-login3 lambda1]$ ls oleg<br>
ls: cannot access 'oleg': No such file or directory<br>
[rubel@gra-login3 lambda1]$ echo $?<br>
2<br>
<br>
Here "echo $?" returns the exit code of a previous command. If it is not "0", there is a problem (like in this case, there is no "oleg" file).<br>
<br>
Now I try to apply the same strategy to WIEN2k:<br>
<br>
[rubel@gra-login3 lambda1]$ x lapw1<br>
LAPW1 - Error<br>
0.001u 0.018s 0:00.06 16.6%     0+0k 23592+16io 67pf+0w<br>
[rubel@gra-login3 lambda1]$ echo $?<br>
0<br>
<br>
This is an unexpected result. The exist status is OK in spite of the fact that LAPW1 exited with an error. Of course, there are error files created for each program + spin up/dn (even process for parallel calculations). But it can be quite elaborate to search through them, and it depends on whether you run lapw1 or lapw2, etc.<br>
<br>
I wonder if there is a _simple_ alternative way for sensing an error? Also message is not always "XXXXX - Error". It can be different (e.g., segmentation fault).<br>
<br>
Thank you in advance<br>
Oleg<br>
<br>
--<br>
Oleg Rubel (PhD, PEng)<br>
Department of Materials Science and Engineering<br>
McMaster University<br>
JHE 359, 1280 Main Street West, Hamilton, Ontario L8S 4L8, Canada<br>
Email: <a href="mailto:rubelo@mcmaster.ca" target="_blank">rubelo@mcmaster.ca</a><br>
Tel: +1-905-525-9140, ext. 24094<br>
Web: <a href="http://olegrubel.mcmaster" rel="noreferrer" target="_blank">http://olegrubel.mcmaster</a><br>
<br>
<br>
_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien" rel="noreferrer" target="_blank">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a><br>
SEARCH the MAILING-LIST at:  <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html" rel="noreferrer" target="_blank">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a><br>
</blockquote></div>