- edited description
PETSc + VectorFunctionSpace + ML amg: malloc(): memory corruption
Issue #61
closed
The script
from dolfin import *
mesh = UnitSquareMesh(10, 10)
W = VectorFunctionSpace(mesh, 'Lagrange', 1)
u = TrialFunction(W)
v = TestFunction(W)
sol = Function(W)
solve(
inner(u, v)*dx == inner(Constant((3.14, 2.71)), v) * dx, sol,
solver_parameters={
'linear_solver': 'iterative',
'preconditioner': 'ml_amg'
}
)
crashes on the Docker images (dev + stable) with
*** Error in `python': malloc(): memory corruption: 0x000000000345e440 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f44756fd7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8181e)[0x7f447570781e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f44757095d4]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_memory_alloc+0x64)[0x7f446c2d5f54]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_Aggregate_Compress_Matrix+0x59e)[0x7f446c2e073e]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_Aggregate_CoarsenCoupled+0x201)[0x7f446c2e4fc1]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_Aggregate_Coarsen+0x2c1)[0x7f446c28d481]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_AGG_Gen_Prolongator+0x55c)[0x7f446c283aac]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_Gen_MultiLevelHierarchy+0xa61)[0x7f446c281a71]
/usr/local/petsc-32/lib/libpetsc.so.3.7(ML_Gen_MultiLevelHierarchy_UsingAggregation+0x224)[0x7f446c282484]
/usr/local/petsc-32/lib/libpetsc.so.3.7(+0x7fbaff)[0x7f446bd62aff]
/usr/local/petsc-32/lib/libpetsc.so.3.7(PCSetUp+0x18e)[0x7f446bc49fce]
/usr/local/petsc-32/lib/libpetsc.so.3.7(KSPSetUp+0x408)[0x7f446bd6f9f8]
/usr/local/petsc-32/lib/libpetsc.so.3.7(KSPSolve+0x218)[0x7f446bd707d8]
/home/fenics/local/lib/libdolfin.so.2017.1(_ZN6dolfin17PETScKrylovSolver5solveERNS_11PETScVectorERKS1_+0xd07)[0x7f446d448e87]
[...]
I works fine (as expected) on all other machines I've tested. Could be docker, could be PETSc.
Comments (7)
-
reporter -
- edited description
Changed
amg
->ml_amg
for better reproducibility. -
- changed title to PETSc + VectorFunctionSpace + ML amg: malloc(): memory corruption
-
Garth's suggestion: Do not let PETSc download ML, link to one from Trilinos if possible.
-
I could reproduce the memory corruption with a hashdist based install. I have tried both with ML from PETSc and ML from Trilinos. Here is the output with ML from Trilinos.
-
reporter We should perhaps move this issue over to dolfin proper.
-
- changed status to closed
Reported to DOLFIN as https://bitbucket.org/fenics-project/dolfin/issues/868.
- Log in to comment