Segfault ElasticSolve Elmer 7.0

Clearly defined bug reports and their fixes
Post Reply
msui
Posts: 9
Joined: 15 Feb 2011, 13:59

Segfault ElasticSolve Elmer 7.0

Post by msui »

I'm calculating displacements and stresses using Elmer 7.0 (Rev: 6003) on Ubuntu 12.10 x86_64. The mesh is generated by Gmsh 2.7.0 with 2nd order elements (types 203, 306, 510).
If I change from StressSolve to ElasticSolve, Elmer crashes with a segfault, so there seems to be a bug hidden somewhere.

Here's the output snippet:

Code: Select all

ELMER SOLVER (v 7.0) STARTED AT: 2013/05/07 16:43:24
ELMER SOLVER (v 7.0) STARTED AT: 2013/05/07 16:43:24
ParCommInit:  Initialize #PEs:            2
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Library version: 7.0 (Rev: 6003)
MAIN:  Running in parallel using 2 tasks.
MAIN:  HYPRE library linked in.
MAIN:  MUMPS library linked in.
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
Model Input:  Unlisted keyword: [show variables] in section: [solver 2]
Loading user function library: [ElasticSolve]...[ElasticSolver_Init0]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init0]
LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15368
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 15904
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
ERROR:: ElementMetric: Degenerate 3D element: 16449
MAIN: -------------------------------------
Loading user function library: [ElasticSolve]...[ElasticSolver_Init]
Loading user function library: [ElasticSolve]...[ElasticSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: finite elasticity...done.
OptimizeBandwidth:  Half bandwidth without optimization:        24896
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth:  Half bandwidth after optimization:         2824
OptimizeBandwidth: ---------------------------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x2BA8238790F7
#1  0x2BA8238796D4
#2  0x2BA823BAB49F
#3  0x2BA8337B245A
#4  0x2BA8232CC05D
#5  0x2BA8232CC09E
#6  0x2BA823312EA6
#7  0x2BA823322229
#8  0x2BA8233231AA
#9  0x2BA823325EB1
#10  0x2BA82345A5F7
#11  0x2BA82345F429
#12  0x401016 in MAIN__ at Solver.f90:?
#0  0x2B1C3E6A10F7
#1  0x2B1C3E6A16D4
#2  0x2B1C3E9D349F
#3  0x2B1C4E5DB45A
#4  0x2B1C3E0F405D
#5  0x2B1C3E0F409E
#6  0x2B1C3E13AEA6
#7  0x2B1C3E14A229
#8  0x2B1C3E14B1AA
#9  0x2B1C3E14DEB1
#10  0x2B1C3E2825F7
#11  0x2B1C3E287429
#12  0x401016 in MAIN__ at Solver.f90:?
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 7137 on node dt3 exited on signal 11 (Segmentation fault).
Attachments
blok_elasticsolve.tar.gz
mesh and SIF file
(1.49 MiB) Downloaded 457 times
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Segfault ElasticSolve Elmer 7.0

Post by mzenker »

Hi,

I don't know why Elmersolver crashes for your case (didn't try it since I am no mechanics guy), but I have noticed the "Degenerate Elements" messages in your output. This means that you may have elements with (almost) aligned nodes in your mesh. To heal that, you may use the "Optimize 3D" functionality in gmsh - you can read the full story here:
viewtopic.php?f=3&t=2159&start=10#p9050

HTH,

Matthias
msui
Posts: 9
Joined: 15 Feb 2011, 13:59

Re: Segfault ElasticSolve Elmer 7.0

Post by msui »

Hi Matthias,

I checked your suggestion and the segfault still occurs. See the log below:

Code: Select all

Starting program Elmergrid
Elmergrid reading in-line arguments
The mesh will be partitioned with Metis to 2 partitions.
Lower dimensional boundaries will be removed
Materials and boundaries will be renumbered
Nodes that do not appear in any element will be removed
Output will be saved to file /home/matthijs/Documents/ElmerFEM_testcases/voorbeeld_Remacle.

Elmergrid loading data:
-----------------------
Loading mesh in ElmerSolver format from directory /home/matthijs/Documents/ElmerFEM_testcases/voorbeeld_Remacle.
Loading header from mesh.header
Maximum elementtype index is: 510
Allocating for 51067 knots and 35212 elements.
Loading 51067 Elmer nodes from mesh.nodes
Loading 35212 bulk elements from mesh.elements
Loading 5475 boundary elements from mesh.boundary
All done

Elmergrid creating and manipulating meshes:
-------------------------------------------
Removing lower dimensional boundaries
Maximum elementtype is 510 and dimension 3
Removed 0 (out of 5475) less than 3D boundary elements
Removing 1 unused nodes (out of 51067) from the mesh
Initial boundary interval [1,28]
boundary index changed 1 -> 1 in 585 elements
boundary index changed 2 -> 2 in 464 elements
boundary index changed 3 -> 3 in 96 elements
boundary index changed 4 -> 4 in 72 elements
boundary index changed 5 -> 5 in 96 elements
boundary index changed 6 -> 6 in 72 elements
boundary index changed 7 -> 7 in 464 elements
boundary index changed 8 -> 8 in 28 elements
boundary index changed 9 -> 9 in 64 elements
boundary index changed 10 -> 10 in 46 elements
boundary index changed 11 -> 11 in 46 elements
boundary index changed 12 -> 12 in 64 elements
boundary index changed 13 -> 13 in 16 elements
boundary index changed 14 -> 14 in 16 elements
boundary index changed 15 -> 15 in 48 elements
boundary index changed 16 -> 16 in 589 elements
boundary index changed 17 -> 17 in 138 elements
boundary index changed 18 -> 18 in 302 elements
boundary index changed 19 -> 19 in 118 elements
boundary index changed 20 -> 20 in 288 elements
boundary index changed 21 -> 21 in 216 elements
boundary index changed 22 -> 22 in 288 elements
boundary index changed 23 -> 23 in 122 elements
boundary index changed 24 -> 24 in 302 elements
boundary index changed 25 -> 25 in 84 elements
boundary index changed 26 -> 26 in 84 elements
boundary index changed 27 -> 27 in 230 elements
boundary index changed 28 -> 28 in 537 elements
Numbering of boundary types is already ok
Initial body interval [1,3]
body index changed 1 -> 1 in 4176 elements
body index changed 2 -> 2 in 4385 elements
body index changed 3 -> 3 in 26651 elements
Numbering of bodies is ok!

Elmergrid partitioning meshes:
------------------------------
Making a Metis partitioning for 35212 elements in 3-dimensions.
There are at least some higher order elements
The mesh seems to consist of tetrahedra
Using 6772 nodes of 51066 possible nodes in the Metis graph
Starting graph partitioning METIS_PartMeshNodal.
Creating an inverse topology of the finite element mesh
There are from 1 to 44 connections in the inverse topology.
Set the node partitions by the dominating element partition.
There are from 25306 to 25760 nodes in the 2 partitions.
Successfully made a Metis partition using the element mesh.
Optimizing the partitioning at boundaries.
4 bulk elements with BCs removed from interface.
Ownership of 4 parents was changed at BCs
Creating a table showing all parenting partitions of nodes.
Nodes belong to 2 partitions in maximum
There are 961 shared nodes which is 1.88 % of all nodes.
The initial owner was not any of the elements for 1 nodes
Checking partitioning before optimization
Checking for partitioning
Information on partition bandwidth
Distribution of elements, nodes and shared nodes
     partition  elements   nodes      shared    
     1          17411      25305      482       
     2          17801      25761      479       
Maximum deviation in ownership 456
Average deviation in ownership 228.00
Checking for problematic sharings
The partitioning was optimized.
Checking partitioning after optimization
Checking for partitio
ning
Information on partition bandwidth
Distribution of elements, nodes and shared nodes
     partition  elements   nodes      shared    
     1          17411      25305      482       
     2          17801      25761      479       

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in parallel ElmerSolver format to directory /home/matthijs/Documents/ElmerFEM_testcases/voorbeeld_Remacle/partitioning.2.
Nodes belong to 2 partitions in maximum
Saving mesh for 2 partitions
   part  elements   nodes      shared   bc elems orphan  
   1     17411      25305      482      2810     22      
   2     17801      25761      479      2712     25      
Writing of partitioned mesh finished

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
ELMER SOLVER (v 7.0) STARTED AT: 2013/05/10 11:14:48
ELMER SOLVER (v 7.0) STARTED AT: 2013/05/10 11:14:48
ParCommInit:  Initialize #PEs:            2
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Library version: 7.0 (Rev: 6003)
MAIN:  Running in parallel using 2 tasks.
MAIN:  HYPRE library linked in.
MAIN:  MUMPS library linked in.
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
Model Input:  Unlisted keyword: [show variables] in section: [solver 2]
Loading user function library: [ElasticSolve]...[ElasticSolver_Init0]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init0]
LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03
MAIN: -------------------------------------
Loading user function library: [ElasticSolve]...[ElasticSolver_Init]
Loading user function library: [ElasticSolve]...[ElasticSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: finite elasticity...done.
OptimizeBandwidth:  Half bandwidth without optimization:        25780
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth:  Half bandwidth after optimization:         1956
OptimizeBandwidth: ---------------------------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x2AAC489610F7
#0  0x2AD5E9B050F7
#1  0x2AAC489616D4
#1  0x2AD5E9B056D4
#2  0x2AAC48C9349F
#2  0x2AD5E9E3749F
#3  0x2AAC5889B45A
#3  0x2AD5F9A3E45A
#4  0x2AAC483B405D
#4  0x2AD5E955805D
#5  0x2AAC483B409E
#5  0x2AD5E955809E
#6  0x2AAC483FAEA6
#6  0x2AD5E959EEA6
#7  0x2AAC4840A229
#7  0x2AD5E95AE229
#8  0x2AAC4840B1AA
#8  0x2AD5E95AF1AA
#9  0x2AD5E95B1EB1
#9  0x2AAC4840DEB1
#10  0x2AD5E96E65F7
#10  0x2AAC485425F7
#11  0x2AD5E96EB429
#11  0x2AAC48547429
#12  0x401016 in MAIN__ at Solver.f90:?
#12  0x401016 in MAIN__ at Solver.f90:?
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 11729 on node dt3 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
Attached is the mesh and SIF file for testing

regards,
Matthijs Suijlen
Attachments
same_problem_no_degenerate_mesh.tar.gz
(1.55 MiB) Downloaded 483 times
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Segfault ElasticSolve Elmer 7.0

Post by mzenker »

Hi Matthijs,

just a guess: what happens if you run your case in serial mode?

If the crash persists, it's a case for the Elmer team...

Matthias
msui
Posts: 9
Joined: 15 Feb 2011, 13:59

Re: Segfault ElasticSolve Elmer 7.0

Post by msui »

Hi Matthias,

That was a fast reply!

I checked the simulation in serial mode by running the Umfpack solver instead of MUMPS, so
Linear System Direct Method = umfpack
in the SIF file.
Still the crash occurs:

Code: Select all

ELMER SOLVER (v 7.0) STARTED AT: 2013/05/10 11:44:12
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Library version: 7.0 (Rev: 6003)
MAIN:  HYPRE library linked in.
MAIN:  MUMPS library linked in.
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
Model Input:  Unlisted keyword: [show variables] in section: [solver 2]
Loading user function library: [ElasticSolve]...[ElasticSolver_Init0]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init0]
LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03
MAIN: -------------------------------------
Loading user function library: [ElasticSolve]...[ElasticSolver_Init]
Loading user function library: [ElasticSolve]...[ElasticSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: finite elasticity...done.
OptimizeBandwidth:  Half bandwidth without optimization:        50581
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth:  Half bandwidth after optimization:         4023
OptimizeBandwidth: ---------------------------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x2BAA83C010F7
#1  0x2BAA83C016D4
#2  0x2BAA83F3349F
#3  0x2BAA8A2D045A
#4  0x2BAA8365405D
#5  0x2BAA8365409E
#6  0x2BAA8369AEA6
#7  0x2BAA836AA229
#8  0x2BAA836AB1AA
#9  0x2BAA836ADEB1
#10  0x2BAA837E25F7
#11  0x2BAA837E7429
#12  0x402E16 in MAIN__ at Solver.f90:?
I hope this gives sufficient info.

Matthijs
mika
Posts: 253
Joined: 15 Sep 2009, 07:44

Re: Segfault ElasticSolve Elmer 7.0

Post by mika »

Hi,

The revision 6198 hopefully contains a working bug fix relating to this issue.

Best regards,
Mika
Post Reply