[petsc-users] proper Fortran usage for PetscMemoryGetMaximumUsage

Anthony Paul Haas aph at email.arizona.edu
Thu Jul 2 19:03:02 CDT 2015


Hi Barry,

Here it is. Note that the options -memory_info and -malloc_log provide
proper data but I wanted to monitor some operations more closely.

Thanks,

Anthony

On Thu, Jul 2, 2015 at 4:49 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   It is PetscLogDouble which is an alias for real*8.
>
>  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.
>
>   Barry
>
>
> > On Jul 2, 2015, at 4:51 PM, Anthony Paul Haas <aph at email.arizona.edu>
> wrote:
> >
> > Hi,
> >
> > 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.
> >
> > I did:
> >
> >        1st try:  PetscLogDouble mem
> >        2nd try:  PetscInt mem
> >
> >     call SlepcInitialize(PETSC_NULL_CHARACTER,ierr)
> >
> >     call MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
> >     call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
> >
> >     call PetscMemorySetGetMaximumUsage(ierr)
> >
> >
> >     .... some code with allocate, MatCreate, MatsetValues,...
> >
> >     call PetscMemoryGetMaximumUsage(mem,ierr)
> >
> >     write(*,*)'On Processor',rank,'memory:',mem
> >
> >
> > Thanks,
> >
> > Anthony
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150702/ce30aa52/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petscconf.h
Type: text/x-chdr
Size: 15653 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150702/ce30aa52/attachment-0001.h>


More information about the petsc-users mailing list