QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: serhan on January 13, 2009, 10:26

Title: start and end time of ATK job
Post by: serhan on January 13, 2009, 10:26
Hello,

How can I print the start and end time of an ATK simulation? When I start ATK inside VNL it prints the start and end time but when I start ATK alone from command prompt, it does not print time?

Regards

Serhan
Title: Re: start and end time of ATK job
Post by: Anders Blom on January 13, 2009, 11:12
There are several options.

A rough way (which however doesn't work if you are in Windows, or if you use a queuing system to launch ATK) is to issue the ATK command wrapped in shell "date" statements, that is

Code
date ; atk myinputfile.py > logfile.log ; date 

However, this will not print the date to the logfile (logfile.log), so we're much better off using Python (as usually is the case ;) ).

A quite fancy method, which also can calculate how long time the calculation took, is discussed in the manual (http://quantumwise.com/documents/manuals/ATK-2008.10/chap.tipstricks.html#sect1.tipstricks.timing).

The most convenient solution is, however, probably to just add these lines in the beginning and end of the input script:

Code
import datetime
print "Calculation started:", datetime.datetime.now().replace(microsecond=0)
...
# ... original script ...
...
print "Calculation ended:", datetime.datetime.now().replace(microsecond=0)
Title: Re: start and end time of ATK job
Post by: serhan on January 13, 2009, 21:12
Thanks again...

(I wish there would be a "Helped" button on the forum so that we can give points for helping people... :) )

Serhan
Title: Re: start and end time of ATK job
Post by: Nordland on January 13, 2009, 21:15
Well I agree - but Anders Blom already has 5 blue stars - so he must be senior ranking :)
Title: Re: start and end time of ATK job
Post by: Anders Blom on January 13, 2009, 22:17
I have activated the "Karma" feature on the Forum, which is what you asked for, Serhan :) So now you can "applaud" me (or anyone else for that matter) if you wish!

I called it "Reputation" however instead of Karma, which didn't seem to be an entirely suitable label. Any better suggestions? "Pythonity"? :) Applaud/Smite ok?
Title: Re: start and end time of ATK job
Post by: serhan on January 14, 2009, 05:06
applaud is very good according to me. also we can use pythonity it is also good :) or "pomum", Latin of applaud if we want some different thing :) But applaud is also good  ;)

Thanks....

Serhan