[Bug fortran/37832] System_Clock

2008-11-09 Thread jvdelisle at gcc dot gnu dot org


--- Comment #5 from jvdelisle at gcc dot gnu dot org  2008-11-09 18:18 
---
After doing some more testing and comparing g77 vs gfortran, gfortran actually
provides higher resolution 1000 ticks/sec then g77 100 ticks/second on at least
my platform (x86-64-linux) On Cygwin, results are identical except gfortran
does allow integer(kind=8) where g77 does not.

Therefore, I am closing this as not a bug.  If greater timing precision is
needed, then Steve's suggestion of binding to a custom C routine is the wy to
go.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37832



[Bug fortran/37832] System_Clock

2008-11-08 Thread jvdelisle at gcc dot gnu dot org


--- Comment #4 from jvdelisle at gcc dot gnu dot org  2008-11-09 07:46 
---
According to the g77 documentation, system_clock uses the times(2) function.

gfortran uses either the time(2) (note no 's' on the end of the name) or the
gettimeofday function.  When I revise the gfortran routines to use the times(2)
function I get results similar to g77.

Now question is, how equivalent to g77 do we want to get in this case?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37832



[Bug fortran/37832] System_Clock

2008-11-02 Thread jvdelisle at gcc dot gnu dot org


--- Comment #3 from jvdelisle at gcc dot gnu dot org  2008-11-03 02:17 
---
I will add this to my list and see if we can get to what g77 does.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-11-03 02:17:47
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37832



[Bug fortran/37832] System_Clock

2008-10-15 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2008-10-15 06:33 ---
See also PR 28484 comment 5.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37832



[Bug fortran/37832] System_Clock

2008-10-14 Thread kargl at gcc dot gnu dot org


--- Comment #1 from kargl at gcc dot gnu dot org  2008-10-15 05:50 ---
You can already get an integer(8) result.

integer(8) ticks,rate
call system_clock(count=ticks,count_rate=rate)
print *, ticks, rate
end

gfc -o z a.f90
./z
   2131173368 1000

count_rate is determined from either /usr/include/sys/time.h or
/usr/include/time.h.  You need to munge your system header files.

For the record, there is very little OS specific code in the
library, and I would actively oppose putting more OS specific code
in the library.  If you want higher resolution try cpu_time, which
is one of the few routines that has OS specific code.

You can also write your timing routine in C and use ISO C binding
to call that routine.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37832