<div dir="ltr">Hi,<div><br></div><div>Could you please tell me what is the proper Fortran usage for <b>P</b><h1 style="display:inline!important"><font size="2">etscMemoryGetMaximumUsage? <span style="font-weight:normal">Do I need to define </span></font></h1>mem (see below) as PetscInt or PetscLogDouble? I tried both and in both case I got zero memory for all the processes.</div><div><h1 style="display:inline!important"><font size="2"><br></font></h1></div><div>I did:</div><div><br></div><div> 1st try: PetscLogDouble mem</div><div> 2nd try: PetscInt mem</div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(213,59,211)">call</span> SlepcInitialize(PETSC_NULL_CHARACTER,ierr)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(213,59,211)">call</span> MPI_COMM_SIZE(MPI_COMM_WORLD,<span style="color:rgb(52,187,199)">size</span>,ierr)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(213,59,211)">call</span> MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(213,59,211)">call</span> PetscMemorySetGetMaximumUsage(ierr)</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo"> .... some code with allocate, MatCreate, MatsetValues,...</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo"><span style="color:rgb(213,59,211)"> call</span> PetscMemoryGetMaximumUsage(mem,ierr)</p><p style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">
</p><p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)"><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(206,121,36)">write</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(206,121,36)">*</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(206,121,36)">*</span><span style="color:rgb(0,0,0)">)</span>'On Processor'<span style="color:rgb(0,0,0)">,rank,</span>'memory:'<span style="color:rgb(0,0,0)">,mem</span></p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">Thanks,</p><p style="margin:0px;font-size:11px;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;font-family:Menlo">Anthony</p></div></div>