Re: Calculating a program's run time
- From: "Robert" <rjones0@xxxxxxxxxxx>
- Date: 22 Oct 2005 15:20:27 -0700
Random Programmer wrote:
> Hi guys. I'm trying to get my program provide useful information about
> how long it has been running.
>
> Does Fortran have any in-house commands that does this, or do I need to
> find out the time the program starts/ends and subtract the two?
>
> What are the relevant commands for me to look up?
>
> Thanks.
Depending on your operating system, you could look at the execution
queue via the appropriate monitor facility.
Sometimes though, the actual time taken is not so relevant as
determining how much progress is made and how much more work is to be
done and therefore roughly how long it is going to take to finish.
To that end, I sometimes put a display routine into a program to report
for example, how many records have been read from the main input file,
or how many iterations of the main significant procedure have been done
at intervals based upon a power of 2. For example, display no of
iterations and current time for the the first, second, fourth, eighth,
sixteenth, etc iterations. If there is more than one phase to the
program then a display can also be made to indicate when each phase is
complete. Such displays can be useful in determining whether a program
is getting stuck/clogged at a particular stage, so that you investigate
the reasons more closely.
.
- Prev by Date: Re: Calculating a program's run time
- Next by Date: Fitting routine
- Previous by thread: Re: Calculating a program's run time
- Next by thread: Re: Calculating a program's run time
- Index(es):
Relevant Pages
|