Created
October 21, 2014 16:48
-
-
Save wence-/e32949453feaa6774eb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gc | |
| def howmany(cls): | |
| return len([x for x in gc.get_objects() if isinstance(x, cls)]) | |
| from firedrake.matrix import Matrix | |
| from firedrake.petsc import PETSc | |
| import gc | |
| gc.collect() | |
| gc.collect() | |
| print 'matrices', howmany(Matrix), howmany(op2.Mat), howmany(PETSc.Mat) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment