🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fj.lang.fortran
3 messages
3 total messages Started by Hiroshi Tanaka Thu, 19 Feb 1998 00:00
How to measure elapsed time on g77
#130
Author: Hiroshi Tanaka
Date: Thu, 19 Feb 1998 00:00
11 lines
838 bytes
たなか@島根大学と申します.

g77で経過時間,もしくは現在時刻を知る組み込み関数は
あるんでしょうか?またあるとしたら,何という関数でどのように使えば
良いのでしょうか?ご存知のかたがいましたら教えてください.

g77の言語リファレンスというのは,あるんでしょうか?

田中 宏志
島根大学・総合理工学部・物質科学科
Re: How to measure elapsed time on g77
#131
Author: Tamio Tsukamoto
Date: Fri, 20 Feb 1998 00:00
45 lines
2046 bytes
$BEDCf$5$s!"$3$s$K$A$O!#(B

fj.lang.fortran$B$N(B<34EC199D.D655F8E5@riko.shimane-u.ac.jp>$B$N5-;v$K$*$$$F(B
JST$B;~4V(B1998$BG/(B02$B7n(B19$BF|(B($BLZ(B)20$B;~(B38$BJ,(B05$BIC:"!"(Btanakah@riko.shimane-u.ac.jp$B$5$s$O=q$-$^$7$?!#(B

  | g77$B$G7P2a;~4V!$$b$7$/$O8=:_;~9o$rCN$kAH$_9~$_4X?t$O(B
  | $B$"$k$s$G$7$g$&$+!)$^$?$"$k$H$7$?$i!$2?$H$$$&4X?t$G$I$N$h$&$K;H$($P(B
  | $BNI$$$N$G$7$g$&$+!)$4B8CN$N$+$?$,$$$^$7$?$i65$($F$/$@$5$$!%(B

 g77 $B$N%P!<%8%g%s$K$h$j$^$9$,!"(Bg77-0.5.19.1 $B$^$G$O!"(Bunix $B8_49%i%$%V%i%j$O(B
g77 $B$N%3%s%Q%$%k;~$K!"(Bg77-0.5.19-libu77-12.tar.gz $B$J$I!"%$%.%j%9$N(B 
Daresbury Lab.$B$K$"$k%i%$%V%i%j$rAH$_9~$`$3$H$G<B8=$5$l$F$$$^$9!#(B

 g77-0.5.20 $B$+$i$O!">e5-%i%$%V%i%j$,I8=`$G(Bg77$B$KAH$_9~$^$l$F$$$k$O$:$G$9!#(B
 etime $B$H$$$&%5%V%k!<%A%s$N$O$:$G$9!#(B

$B;d$O$=$l0JA0$O0J2<$N$h$&$J4X?t$r%j%s%/$7$F$$$^$7$?!#(B

#include <time.h>
#include <sys/times.h>
#include <stdlib.h>
#include <f2c.h>
#ifdef  CLOCKS_PER_SEC
#undef  CLOCKS_PER_SEC
#endif
#define CLOCKS_PER_SEC 100.0  /* system dependent */
double etime_(float *tarray)
{
  double        elapsed;
  struct tms    t_buf;
  elapsed=times(&t_buf)/CLOCKS_PER_SEC;
  tarray[0]=(float)(t_buf.tms_utime + t_buf.tms_cutime)/CLOCKS_PER_SEC;
  tarray[1]=(float)(t_buf.tms_stime + t_buf.tms_cstime)/CLOCKS_PER_SEC;
  return(elapsed);
}

$BDMK\(B


----------------------------------------------------
Tamio Tsukamoto
10-31-18-108,Handa-Kita,Sakai,Osaka 599-8262 Japan
E-mail : tamio@mb.infoweb.ne.jp
URL    : http://village.infoweb.ne.jp/~tamio
Re: How to measure elapsed time on g77
#132
Author: Hiroshi Tanaka
Date: Fri, 27 Feb 1998 00:00
21 lines
1445 bytes
塚本さん,返信ありがとうございます.

大変遅くなってしまいましたが,

>  g77 のバージョンによりますが、g77-0.5.19.1 までは、unix 互換ライブラリは
> g77 のコンパイル時に、g77-0.5.19-libu77-12.tar.gz など、イギリスの
> Daresbury Lab.にあるライブラリを組み込むことで実現されています。
>
>  g77-0.5.20 からは、上記ライブラリが標準でg77に組み込まれているはずです。
>  etime というサブルーチンのはずです。

ありがとうございます.さっそくg77-0.5.20をとってきて試してみました.
実は私はWin95+cygnus+egcs1.00という構成でして,
コンパイルは通るんですが,システムがサポートしてないみたいです.
ちゃんとしたPC Unixなら大丈夫らしいですが.

やはり素直にLinuxかFreeBSDにしようと思ってます.

田中 宏志
島根大学総合理工学部・物質科学科
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads