Re: Odd omp_get_wtime()



Reinhold Bader wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gib Bogle wrote:


module wtime_mod
contains
subroutine wtimer2(t)
real(8) :: t
t = omp_get_wtime()
end subroutine
end module

[snip]
I was just about to post this when I realized that module wtime_mod
lacked 'use omp_lib'. Sure enough, adding that line makes it work
properly. It's surprising, though, that the program as shown compiles
and runs without an error.

You're not really allowed to complain, not having specified "implicit none"
in the module wtime_mod.

I've worked with people who make a practice of declaring omp functions locally rather than by 'use omp_lib'. Intel Thread Checker raises a run time warning on this, even though the code is working correctly.
.



Relevant Pages

  • Re: Odd omp_get_wtime()
    ... Hash: SHA1 ... Gib Bogle wrote: ... subroutine wtimer2 ... It's surprising, though, that the program as shown compiles ...
    (comp.lang.fortran)
  • Re: Odd omp_get_wtime()
    ... Hash: SHA1 ... Gib Bogle wrote: ... subroutine wtimer2 ... Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org ...
    (comp.lang.fortran)
  • Re: Exit Sub not exiting
    ... After trying this, then deleting the subroutine, ... Judy Hopkins ... This happened once before in another workbook, ...
    (microsoft.public.excel.programming)
  • Re: Use of subroutines
    ... Go tos are not evil. ... >I still maintain that a subroutine is first and foremost a GOTO ...
    (comp.lang.fortran)
  • Re: Two COBOL questions
    ... -Steve Comstock ... Easier to use CEEENV than calling the C subroutine putenv(), ...
    (bit.listserv.ibm-main)