- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to time a program that I have written, but I need to break it up into different intervals to account for the time I spend inputting data and the time the prorgam actually calculates the information. On my computer, the program runs very quickly, so getting the time in double precision would be prefered. I found the dsecnd command in compiler documentation, but it doesn't give much info on how to use. When I try to compile my program, I have gotten some different errors. First, it said dsecnd did not have a type and that it must have an explicit type, so I declared dsecnd to be double precision. Then it said it is an unresolved external symbol.
Searching around the internet, I cannot seem to find any examples of dsecnd being used. Does anyone have an example, or any suggestions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran does not provide a DSECND library routine. It does provide quite a few ways of obtaining time. The one I would recommend most is the Fortran standard intrinsic SYSTEM_CLOCK. If you wish, you can use the extension SECNDS, which is close to what you seem to want for DSECND. It takes a single argument that can be single or double precision and it returns the time in seconds since midnight, subtracted by the argument.
If you want to track CPU time rather than "wall clock" time, look at the standard intrinsic CPU_TIME.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Using the SYSTEM_CLOCK function with 8 bit integers seems to be helping.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page