[petsc-users] MPI_Wtime in fortran

Matthew Knepley knepley at gmail.com
Thu Jan 26 07:58:40 CST 2017


Just use PETSc events, since we will call MPI_Wtime() for you.

  Matt

On Thu, Jan 26, 2017 at 6:41 AM, Praveen C <cpraveen at gmail.com> wrote:

> To be more precise, my code looks something like this
>
> implicit none
> #include <petsc/finclude/petsc.h90>
> double precision time
>
> time = MPI_Wtime()
>
> I get the warning of conversion from REAL(16) to REAL(8) and the value of
> time is always zero.
>
> Thanks
> praveen
>
> On Thu, Jan 26, 2017 at 5:59 PM, Praveen C <cpraveen at gmail.com> wrote:
>
>> Dear all
>>
>> In my petsc fortran code, I am using MPI_Wtime to measure times. I include
>>
>> #include <petsc/finclude/petsc.h90>
>>
>> When compiling, I get warning for MPI_Wtime
>>
>> *Warning:* Possible change of value in conversion from REAL(16) to
>> REAL(8) at (1) [*-Wconversion*]
>>
>>
>> But MPI_Wtime is supposed to return double precision. The values I get
>> from this function also seem to be wrong, always zero.
>>
>> Thanks
>> praveen
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170126/31e3f4fa/attachment.html>


More information about the petsc-users mailing list