[Q-e-developers] Parsing wall time, bug with fixed width?
Filippo Spiga
spiga.filippo at gmail.com
Fri May 29 09:54:22 CEST 2015
There is simple fix that can last forever, it is possible to print timing information all in seconds with two decimal digits (not hours:minutes:seconds). A flag is already in the code, it is not the default.
F
On May 27, 2015, at 11:03 AM, Blair Lebert <Blair.Lebert at impmc.upmc.fr> wrote:
> Hello,
>
> I found a very small 'bug' with the output of the computation time. I wanted to parse multiple files to get the their wall time. I thought it was fixed width but as seen below the times without minutes at the top are all shifted by one space. Also using fields to grab the data is also troublesome since a space is put between minutes and seconds when the seconds are less than 10 (highlight in red)
>
> <PWSCF_fixed.png>
>
> One (probably poor) way of grabbing the wall time isn't very straight-forward:
> line=`grep PWSCF Fe.scf.out_s${s}_k${k} | tail -n 1`
> minutes=`echo $line | sed 's/.*CPU //g' | egrep -o "[0-9]*m" | tr -d m`
> seconds=`echo $line | sed 's/.*CPU //g' | egrep -o "[0-9]*\.[0-9]*s" | tr -d s`
> t=`echo "${minutes:-0}*60 + $seconds" | bc`
>
>
> Cheers,
> Blair
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers
--
Mr. Filippo SPIGA, M.Sc.
http://fspiga.github.io ~ skype: filippo.spiga
«Nobody will drive us out of Cantor's paradise.» ~ David Hilbert
*****
Disclaimer: "Please note this message and any attachments are CONFIDENTIAL and may be privileged or otherwise protected from disclosure. The contents are not to be disclosed to anyone other than the addressee. Unauthorized recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission."
More information about the developers
mailing list