Dear all,
I am running the simplest possible 3D problem, a scalar Poisson, with Fenics 1.6. I have used a grid of 200x200x200 P1 tetrahedra. I am using GMRES with incomplete Cholesky preconditioner to solve the system. Incomplete Cholesky should consume (worst case scenario) the same amount of memory as the sparse matrix. The mesh should consume about 1GB and the matrix maximum around 2.5 GB. In total around 6GB. However, when building the dofmap from UFC
Elapsed wall, usr, sys time: 11.3979, 10.67, 0.73 (Init dofmap from
UFC dofmap)
The memory consumption goes up to 20GB. Is it supposed to? I tried to deactivate some options for example
a) parameters["mesh_partitioner"] = "None"
b) parameters["dof_ordering_library"] = "Boost"
c) parameters["reorder_of_serial"] = False
in the hope that I will turn of all reordering and mesh partitioning stuff that consume time and possibly increase memory. Options a) and b) did not help and Option c) helped but then the whole thing got stack at
Elapsed wall, usr, sys time: 476.788, 48.82, 380.86 (Boost graph
coloring (from dolfin::Graph))
from dolfin import *
info(parameters, True)
set_log_level(DEBUG)
list_krylov_solver_preconditioners()
parameters["mesh_partitioner"] = "None"
parameters["num_threads"] = 1
parameters["dof_ordering_library"] = "Boost"
parameters["reorder_dofs_serial"] = False
mesh = UnitCubeMesh(200, 200, 200)
V = FunctionSpace(mesh, 'Lagrange', 1)
u0 = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]+x[2]*x[2]')
def u0_boundary(x, on_boundary):
return on_boundary
bc = DirichletBC(V, u0, u0_boundary)
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
f = Constant(-6.0)
a = inner(grad(u), grad(v))*dx
L = f*v*dx
u = Function(V)
problem = LinearVariationalProblem(a, L, u, bc)
solver = LinearVariationalSolver(problem)
solver.parameters['linear_solver'] = "gmres"
solver.parameters['preconditioner'] = "icc"
gmres_params = solver.parameters["krylov_solver"]
gmres_params['relative_tolerance'] = 1.0e-6
gmres_params['maximum_iterations'] = 1000
gmres_params['monitor_convergence'] = True
solver.solve()