I have a Fortran code that has been GPU-accelerated using PGI Fortran accelerator. The code performs a number of calculations in an iterative method.
In the beginning of the code, different arrays that we use are allocated on the GPU and in each iteration in some new arrays are allocated and deallocated continuously. The maximum RAM memory of this GPU is 6GB.
My question is: Is there a way where we can see how much memory are we allocating on the GPU? What is of interest is only the maximum memory that was used during the iteration and not how the memory requirements of the code fluctuate.
Thank you very much for your time!.