Share September 2005: Project of the Month

MinGW - Minimalist GNU for Windows

Tracker: Bugs

5 gfortran - unreliable DTIME - ID: 2807770
Last Update: Comment added ( coudert )

Fortran77 intrinsic subroutine DTIME doesn't always work, i.e when I
compile Fortran77 code which calls:
...
CALL DTIME(TM, TMRES)
...
for several times, the value of TMRES sometimes doesn't update. Its
behaviour is unpredictable. I had to replace it with subroutine ETIME
(which is OK).

The problem occurs only in gfortran (gcc-4.3.0 2008-05-02-alpha).
Other Fortran comilers are OK, i.e.:
g77 (gcc-3.4.5 2006-01-17-3)
g95 (g95-0.91 gcc-4.1.2)

My system: Windows XP SP2, Pentium4 (Northwood)


Peter Gasparovic ( buteo ) - 2009-06-17 15:17

5

Open

None

Aaron W. LaFramboise

gcc

None

Public


Comments ( 2 )

Date: 2009-07-14 19:43
Sender: coudert

In the GNU Fortran runtime library (libgfortran), DTIME and ETIME rely on
the same system calls to obtain timing information, so I wonder why one
would work and not the other.

The difference between ETIME
(http://gcc.gnu.org/onlinedocs/gfortran/ETIME.html) and DTIME
(http://gcc.gnu.org/onlinedocs/gfortran/DTIME.html) is that ETIME reports
time since start of process, and DTIME reports time since last invocation
of DTIME (and, on the first invocation only, time since start of process).
Are you sure what you are seeing is inconsistent with that? In particular,
TMRES might not increase.

If you are aware of these differences, and still see a bug, please post a
complete, reproducible code that exhibits the issue. (Also, you might want
to send it to fortran@gcc.gnu.org, the GNU Fortran maintainers' list.)


Date: 2009-06-23 06:49
Sender: aaronwlSourceForge.net SubscriberAccepting Donations

Thank you for your report.

Can you confirm that the issue is that on g77 and g95, DTIME will always
increment, but with recent GCC, it sometimes does not?

I'll look into this. It's strange that it would affect DTIME but not
ETIME. Perhaps its a floating point issue.



Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
assigned_to nobody 2009-06-23 06:49 aaronwl