<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="serif">Some of you have already figured this out
based on one of the handouts from class -- but I wanted to make
sure you noticed it. When you call walltime and cputime from
Fortran there is no trailing underscore. When you call them
from C/C++ then the names are walltime_ and cputime_. </font></p>
<p><font face="serif">Here is an example from my C code...</font></p>
<blockquote>
<p><font face="monospace">/* Function Prototypes */<br>
<br>
double trig( int, int );<br>
double conrand ( double* );<br>
void idcheck( int , double*, double* , double* , double* );<br>
double walltime_();<br>
double cputime_();<br>
</font></p>
<p><font face="monospace">wall = walltime_();<br>
cpu = cputime_();</font></p>
</blockquote>
<p><font face="serif">This is due to how the symbols are treated
between Fortran and C in the compiler. This will be REALLY
important later when you start writing your own libraries.</font></p>
<p><font face="serif"> </font></p>
<div class="moz-signature">-- <br>
<b><i>Andrew J. Pounds, Ph.D.</i></b><br>
<i>Professor of Chemistry and Computer Science</i><br>
<i>Director of the Computational Science Program</i><br>
<i>Mercer University, Macon, GA 31207 (478) 301-5627</i></div>
</body>
</html>