I have though observed that the repeated use of the ILU and the solver increases the memory consumption (attached file: memoryCheck.c).
I an other test I solve the same system twice but this time every run is between a magma_init() and magma_finalize() (attached file memoryCheck2.c).
My Matrix has 18400 nnz and the memory consumption status with nvidia-smi after each step is like that:
- ILU1
| 0 27593 C ./memoryCheck2 138MiB |
FGMRES1
| 0 27593 C ./memoryCheck2 138MiB |
After magma_finalize()
| 0 27593 C ./memoryCheck2 132MiB |
ILU2
| 0 27593 C ./memoryCheck2 148MiB |
FGMRES2
| 0 27593 C ./memoryCheck2 148MiB |
After magma_finalize()
| 0 27593 C ./memoryCheck2 142MiB |