<div dir="ltr">Hi Barry,<div><br></div><div>Here it is. Note that the options -memory_info and -malloc_log provide proper data but I wanted to monitor some operations more closely.</div><div><br></div><div>Thanks,</div><div><br></div><div>Anthony</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 2, 2015 at 4:49 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
It is PetscLogDouble which is an alias for real*8.<br>
<br>
Only certain systems give easy access to the memory usage. Send the file $PETSC_ARCH/include/petscconf.h and I'll check if yours is suppose to be able to.<br>
<br>
Barry<br>
<span class=""><br>
<br>
> On Jul 2, 2015, at 4:51 PM, Anthony Paul Haas <<a href="mailto:aph@email.arizona.edu">aph@email.arizona.edu</a>> wrote:<br>
><br>
> Hi,<br>
><br>
</span>> Could you please tell me what is the proper Fortran usage for PetscMemoryGetMaximumUsage? Do I need to define mem (see below) as PetscInt or PetscLogDouble? I tried both and in both case I got zero memory for all the processes.<br>
<div class="HOEnZb"><div class="h5">><br>
> I did:<br>
><br>
> 1st try: PetscLogDouble mem<br>
> 2nd try: PetscInt mem<br>
><br>
> call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)<br>
><br>
> call MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)<br>
> call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)<br>
><br>
> call PetscMemorySetGetMaximumUsage(ierr)<br>
><br>
><br>
> .... some code with allocate, MatCreate, MatsetValues,...<br>
><br>
> call PetscMemoryGetMaximumUsage(mem,ierr)<br>
><br>
> write(*,*)'On Processor',rank,'memory:',mem<br>
><br>
><br>
> Thanks,<br>
><br>
> Anthony<br>
<br>
</div></div></blockquote></div><br></div>