Re: [petsc-dev] memory usage with GPUs
On Jul 29, 2016, at 11:58 AM, Karl Rupp <[email protected]> wrote:
Do you know if Nvidia provides an API to determine how much GPU memory has been currently allocated?
Yes it does
The information is readily available through the nvidia-smi command line tool.
But what about from inside the program?
Is there a good reason for providing the total allocated memory on GPUs (including non-PETSc memory) through PETSc? If so, why don't we already print the total system memory usage?
Not sure what you mean. PetscMemoryGetCurrentUsage() returns the current usage as reported by /proc or getrusage and PetscMemoryGetMaxiumUsage() reports the high-water mark. The command line option -memory_view reports this information at the end of the run. So couldn't you easily rig up the same thing for the GPU memory? Barry
Best regards, Karli
participants (1)
-
Barry Smith