<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — A simple clock timer]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=217</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=217&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in A simple clock timer.]]></description>
		<lastBuildDate>Tue, 25 Jun 2013 11:27:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: A simple clock timer]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=847#p847</link>
			<description><![CDATA[<p>The problem you&#039;re encountering is that the timer intrinsic procedures are only available in Fortran 90 and higher.&nbsp; If you set the compiler to enforce the legacy standard, Fortran 77, the compiler specifically disallows these intrinsics.&nbsp; The Fortran 77 standard doesn&#039;t provide or specify any way to do what you&#039;re asking except, perhaps, via a custom, 3rd party, system-dependent library.</p><p>I would suggest using the <em>CPU_TIME</em> intrinsic with your fixed-format (Fortran-77-style) source code.&nbsp; While it isn&#039;t part of the Fortran 77 standard, it is at least part of later standards.&nbsp; If you need to port your code to other compilers, the <em>CPU_TIME</em> intrinsic will be supported by other compilers if they allow you to use Fortran 90+ intrinsics with fixed-format source code (almost every one will).&nbsp; The use of <em>SECNDS</em> is discouraged simply because it is a GNU Fortran extension, and it may not be supported by other compilers.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 25 Jun 2013 11:27:34 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=847#p847</guid>
		</item>
		<item>
			<title><![CDATA[Re: A simple clock timer]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=846#p846</link>
			<description><![CDATA[<p>Yes, so it works in F90+ programs but when I plug it into an F77 program it doesn&#039;t.<br />If I compile the F77 program without the compiler flag -std=legacy it compiles OK, but I&#039;m worried this may lead to other problems.<br />So I guess the question is:<br />What is the equivalent F77 code? Or where can I find another simple clock (not CPU) timer in F77?</p>]]></description>
			<author><![CDATA[null@example.com (francob)]]></author>
			<pubDate>Tue, 25 Jun 2013 09:18:46 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=846#p846</guid>
		</item>
		<item>
			<title><![CDATA[Re: A simple clock timer]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=845#p845</link>
			<description><![CDATA[<p>I&#039;m not sure I understand the problem you&#039;re experiencing.&nbsp; The code you posted is obviously Fortran 90+ code.&nbsp; When you say you&#039;re receiving the error in Fortran 77, are you using code modified to be in fixed-format?</p><p>I should also point out that the <em>SECNDS</em> intrinsic is a GNU extension who&#039;s use is discouraged.&nbsp; I would suggest looking instead at using the <a href="http://gcc.gnu.org/onlinedocs/gfortran/CPU_005fTIME.html#CPU_005fTIME"><em>CPU_TIME</em> intrinsic procedure</a>, which is part of the Fortran 95 standard.&nbsp; That way you&#039;ll ensure code portability.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 24 Jun 2013 12:15:39 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=845#p845</guid>
		</item>
		<item>
			<title><![CDATA[A simple clock timer]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=844#p844</link>
			<description><![CDATA[<p>The following works well in Fortran 95:<br />!Timer variables<br />real(4)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: time1, time2<br />!Start timer<br />time1=secnds(0.0) <br />(do stuff)<br />! Stop timer and write<br />time2=secnds(time1)<br />WRITE (*,&#039;(A,F8.2)&#039;)&nbsp; &nbsp; &nbsp;&quot;Time (sec):&quot;, time2 </p><p>But in Fortran 77 I get these error messages:<br />&nbsp; &nbsp; &nbsp;time1=secnds(0.0)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;1<br />Error: Syntax error in DATA statement at (1)</p><p>&nbsp; &nbsp; &nbsp; time2=secnds(time1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />Error: &#039;x&#039; argument of &#039;secnds&#039; intrinsic at (1) must be of kind 4</p><p>Any ideas?</p>]]></description>
			<author><![CDATA[null@example.com (francob)]]></author>
			<pubDate>Mon, 24 Jun 2013 11:36:29 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=844#p844</guid>
		</item>
	</channel>
</rss>
