|
From: | Magnus Paulsson |
Subject: | [Getfem-users] Python interface memory use ... |
Date: | Fri, 6 May 2016 13:31:01 +0000 |
It seems that mf.basic_dof_nodes() takes huge amount of memory and is running very slowly.
In the example below the size of the DOF array should be ~ 3MB which is returned but it
takes considerable time uses up approx. 1 GB.
To make things more complicated I do not get consistent results. I.e., getfem-5.0 on one
machine it’s not too bad … while getfem-5321 (new svn) on with slightly different numpy etc
uses 1 GB.
I’m sorry I have not been able to nail it down better.
-Magnus
import getfem as GF
import numpy as N
import resource, gc
NN=50
print "Mem use before mesh generation %i kb"%(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
mesh = GF.Mesh('regular simplices', N.arange(NN),
N.arange(NN),N.arange(NN))
mf = GF.MeshFem(mesh,1)
mf.set_fem(GF.Fem('FEM_PK(3,1)'))
print "Mem use after mesh generation %i kb"%(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
dof=mf.basic_dof_nodes()
print "DOF size %i kb"%(dof.size*8.0/1024.0)
print "Mem use after DOF %i kb"%(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
del mesh, mf, dof
gc.collect()
print "Mem use after deleting objects %i kb"%(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
-----------------------------------------------
Magnus Paulsson Associate Professor
Dept. of Physics and Electrical Engineering
Linnaeus University Phone: +46-480-446308 Mobile: +46-70-6942987 |
[Prev in Thread] | Current Thread | [Next in Thread] |