Re: Calculating a program's run time




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.

.



Relevant Pages

  • Matrix Concatenation and Storing useful information
    ... useful information in form of ID so that I can recall it and get that ... REQUIRED OUTPUT ... display C value for all the elements of column marked N, ...
    (sci.stat.math)
  • Matrix Concatenation and Storing useful information
    ... useful information in form of ID so that I can recall it and get that ... REQUIRED OUTPUT ... display C value for all the elements of column marked N, ...
    (comp.soft-sys.matlab)
  • Matrix Concatenation and Storing useful information
    ... useful information in form of ID so that I can recall it and get that ... REQUIRED OUTPUT ... display C value for all the elements of column marked N, ...
    (sci.stat.math)
  • Re: uncluttering df -l output
    ... > look at pseudo filesystems in df output unless I impose no restrictions on ... > what to display, because the only useful information that provides is that ...
    (comp.unix.solaris)
  • parameter estimation: problem with nlgr
    ... i am using nlgr for parameter estimation in a differential equation ... iterations are completed but the output corresponding to the estimated parameters are not displayed. ... i wait enough but no display. ...
    (comp.soft-sys.matlab)