[petsc-users] Memory Accumulation

Zhenglun (Alan) Wei zhenglun.wei at gmail.com
Thu Aug 30 18:08:45 CDT 2012


Dear All,
     I hope you're having a nice day.
     I coded my program based on the 
/src/ksp/ksp/example/tutorial/ex45.c. However, I met a problem that the 
memory is accumulating while the program is running. I have a doubt on 
the DMDAVecGetArray(da, b, &bb) and DMDAVecRestoreArray(da,b,&bb). Does 
the former one allocate any memory for 'bb'? If so, does the later one 
free the memory allocated for the 'bb'?
     BTW, I just installed the Valgrind. Is there any useful commands in 
Valgrind can monitor the memory of all the arrays in my program in real 
time so that I can detect which array keeps requesting the memory?

thanks,
Alan


More information about the petsc-users mailing list