small example for etime/dtime with g77 
Author Message
 small example for etime/dtime with g77

Hi,

I am looking for a really small example which writes out the
the number of seconds since the start of the processs; so
which basically uses etime/dtime.
I have some existing code which runs fine with Intelfortran,
but unfortunately not with g77. I tried a couple of
different thing about a year ago, but could not get it to
work and I don't find any example...

I would be nice if anybody has a working g77 example!?

Greetings, Fabian



Fri, 30 Nov 2007 14:08:29 GMT  
 small example for etime/dtime with g77

Quote:

> Hi,

> I am looking for a really small example which writes out the
> the number of seconds since the start of the processs; so
> which basically uses etime/dtime.
> I have some existing code which runs fine with IntelFortran,
> but unfortunately not with g77. I tried a couple of
> different thing about a year ago, but could not get it to
> work and I don't find any example...

> I would be nice if anybody has a working g77 example!?

> Greetings, Fabian

Why not use cpu_time()  ?  If you want to use etime and dtime, you'll have
to check 'info g77' for supported syntax.  g77 etime and cpu_time use the
same library implementation.  They don't usually provide time from start of
process.
--
Tim Prince


Fri, 30 Nov 2007 18:33:50 GMT  
 small example for etime/dtime with g77
Hi Tim,


Quote:

> > Hi,

> > I am looking for a really small example which writes out the
> > the number of seconds since the start of the processs; so
> > which basically uses etime/dtime.
> > I have some existing code which runs fine with IntelFortran,
> > but unfortunately not with g77. I tried a couple of
> > different thing about a year ago, but could not get it to
> > work and I don't find any example...

> > I would be nice if anybody has a working g77 example!?

> > Greetings, Fabian
>  Why not use cpu_time()  ?  If you want to use etime and dtime, you'll have
>  to check 'info g77' for supported syntax.  g77 etime and cpu_time use the
>  same library implementation.  They don't usually provide time from start of
>  process.

Thanks! Did not know cpu_time before; it works well, but the
downside is that it is not very accurate and it seems that I
am not able do calculate the difference of two 'times'!?
I checked 'info g77', but it doesn't help me ...

Greetings, Fabian



Sat, 01 Dec 2007 13:16:22 GMT  
 small example for etime/dtime with g77
Hi,

I found a solution with 'date_and_time' which works fine.

   character*10 datizn(3)                                      
   integer ivalues(8)                                          
   call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)  
    write(6,*)'datizn(1) ',datizn(1)                          
    write(6,*)'datizn(2) ',datizn(2)                          
    write(6,*)'datizn(3) ',datizn(3)                          
    write(6,*)ivalues(7),ivalues(8)


Quote:
>  Hi Tim,



> > > Hi,

> > > I am looking for a really small example which writes out the
> > > the number of seconds since the start of the processs; so
> > > which basically uses etime/dtime.
> > > I have some existing code which runs fine with IntelFortran,
> > > but unfortunately not with g77. I tried a couple of
> > > different thing about a year ago, but could not get it to
> > > work and I don't find any example...

> > > I would be nice if anybody has a working g77 example!?

> > > Greetings, Fabian
> >  Why not use cpu_time()  ?  If you want to use etime and dtime, you'll have
> >  to check 'info g77' for supported syntax.  g77 etime and cpu_time use the
> >  same library implementation.  They don't usually provide time from start of
> >  process.

>  Thanks! Did not know cpu_time before; it works well, but the
>  downside is that it is not very accurate and it seems that I
>  am not able do calculate the difference of two 'times'!?
>  I checked 'info g77', but it doesn't help me ...

>  Greetings, Fabian

Greetings, Fabian


Sun, 02 Dec 2007 01:43:59 GMT  
 small example for etime/dtime with g77


Quote:
>Thanks! Did not know cpu_time before; it works well, but the
>downside is that it is not very accurate

Be warned that some compilers make cpu_time give an approximation to
what you might think of as CPU time, others give an approximation to
"wall clock" elapsed time. These can be very different. Both sorts
conform to the f95 (and f2003) standards. You can check what your own
compiler does by comparing the results of cpu_time and date_and_time
for a calculation taking at least several seconds. I think I posted a
program to do that here some time ago, so I won't repeat it now, but
I shall email it to anyone who asks for it.

John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington, New Zealand



Sun, 02 Dec 2007 05:56:40 GMT  
 small example for etime/dtime with g77
Quote:

> Hi,

> I found a solution with 'date_and_time' which works fine.

>    character*10 datizn(3)                                      
>    integer ivalues(8)                                          
>    call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)  
>     write(6,*)'datizn(1) ',datizn(1)                          
>     write(6,*)'datizn(2) ',datizn(2)                          
>     write(6,*)'datizn(3) ',datizn(3)                          
>     write(6,*)ivalues(7),ivalues(8)


>> Hi Tim,



>>>>Hi,

>>>>I am looking for a really small example which writes out the
>>>>the number of seconds since the start of the processs; so
>>>>which basically uses etime/dtime.
>>>>I have some existing code which runs fine with IntelFortran,
>>>>but unfortunately not with g77. I tried a couple of
>>>>different thing about a year ago, but could not get it to
>>>>work and I don't find any example...

>>>>I would be nice if anybody has a working g77 example!?

>>>>Greetings, Fabian

>>> Why not use cpu_time()  ?  If you want to use etime and dtime, you'll have
>>> to check 'info g77' for supported syntax.  g77 etime and cpu_time use the
>>> same library implementation.  They don't usually provide time from start of
>>> process.

>> Thanks! Did not know cpu_time before; it works well, but the
>> downside is that it is not very accurate and it seems that I
>> am not able do calculate the difference of two 'times'!?
>> I checked 'info g77', but it doesn't help me ...

>> Greetings, Fabian

> Greetings, Fabian

cpu_time() has a resolution of 0.010 second on many systems.  As it is
the same internal function in g77 as dtime() and etime(), they will have
the same resolution. On such systems, time can't be measured any more
accurately per process.  Fortran DATE_AND_TIME() should be capable of
giving wall clock time in milliseconds on most systems.  Fortran
system_clock() should give (indirectly) accurate wall clock timing of
short intervals.


Sun, 02 Dec 2007 11:16:08 GMT  
 small example for etime/dtime with g77
Hi,


Quote:

> > Hi,

> > I found a solution with 'date_and_time' which works fine.

> >    character*10 datizn(3)                                      
> >    integer ivalues(8)                                          
> >    call date_and_time(datizn(1),datizn(2),datizn(3),ivalues)  
> >     write(6,*)'datizn(1) ',datizn(1)                          
> >     write(6,*)'datizn(2) ',datizn(2)                          
> >     write(6,*)'datizn(3) ',datizn(3)                          
> >     write(6,*)ivalues(7),ivalues(8)


> >> Hi Tim,



> >>>>Hi,

> >>>>I am looking for a really small example which writes out the
> >>>>the number of seconds since the start of the processs; so
> >>>>which basically uses etime/dtime.
> >>>>I have some existing code which runs fine with IntelFortran,
> >>>>but unfortunately not with g77. I tried a couple of
> >>>>different thing about a year ago, but could not get it to
> >>>>work and I don't find any example...

> >>>>I would be nice if anybody has a working g77 example!?

> >>>>Greetings, Fabian

> >>> Why not use cpu_time()  ?  If you want to use etime and dtime, you'll have
> >>> to check 'info g77' for supported syntax.  g77 etime and cpu_time use the
> >>> same library implementation.  They don't usually provide time from start of
> >>> process.

> >> Thanks! Did not know cpu_time before; it works well, but the
> >> downside is that it is not very accurate and it seems that I
> >> am not able do calculate the difference of two 'times'!?
> >> I checked 'info g77', but it doesn't help me ...

> >> Greetings, Fabian

> > Greetings, Fabian
>  cpu_time() has a resolution of 0.010 second on many systems.  As it is
>  the same internal function in g77 as dtime() and etime(), they will have
>  the same resolution. On such systems, time can't be measured any more
>  accurately per process.  Fortran DATE_AND_TIME() should be capable of
>  giving wall clock time in milliseconds on most systems.  Fortran
>  system_clock() should give (indirectly) accurate wall clock timing of
>  short intervals.

Thanks for the info!

Greetings, Fabian



Mon, 03 Dec 2007 21:00:45 GMT  
 small example for etime/dtime with g77
Hi John,


Quote:


> >Thanks! Did not know cpu_time before; it works well, but the
> >downside is that it is not very accurate

>  Be warned that some compilers make cpu_time give an approximation to
>  what you might think of as CPU time, others give an approximation to
>  "wall clock" elapsed time. These can be very different. Both sorts
>  conform to the f95 (and f2003) standards. You can check what your own
>  compiler does by comparing the results of cpu_time and date_and_time
>  for a calculation taking at least several seconds. I think I posted a
>  program to do that here some time ago, so I won't repeat it now, but
>  I shall email it to anyone who asks for it.

Thanks for the warning! I would like to take a look at your
posted program. Would you email it?

Greetings, Fabian



Mon, 03 Dec 2007 21:02:35 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. dtime()/etime intrinsic function in F90/HPF?

2. DTIME() and ETIME() for MS FORTRAN

3. dtime, etime and itime in RS6000 fortran

4. idate, etime, and itime in g77

5. ETIME 4 g77/linux???

6. G77,Linux and etime

7. small CGI example written in Clarion

8. Help! Need Eiffel small example programs

9. Need help with small example

10. REQ : Beginner asking for small examples prg

11. Q: small, simple constraint example in Prolog?

12. Looking for small example for C shlib's on SunOS

 

 
Powered by phpBB® Forum Software