Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29275 Discussions

second() equivalent using intel fortran compiler

mausmi_kotecha
Beginner
900 Views

hi,

i have used second() in my fortran code. when i am compiling the same code using intel compiler, i am not able to get the right value of system time. but the same works fine when compiled with GNU compiler. please let me know what is missing or an equivalent function for getting a system time.

thanks in advance.

-mausmi

0 Kudos
1 Reply
TimP
Honored Contributor III
900 Views
The standard Fortran intrinsic subroutine cpu_time() has the same function as the legacy extension second():
http://gcc.gnu.org/onlinedocs/gfortran/SECOND.html

It's not intended to give system time; if you really mean that, you would use system_clock, or, with -openmp, omp_get_wtime().
0 Kudos
Reply