Solver Segmentation Fault

Discussion about building and installing Elmer
Post Reply
crotales
Posts: 5
Joined: 08 Dec 2017, 12:17
Antispam: Yes

Solver Segmentation Fault

Post by crotales »

Hi, I just install Elmer in my system (Kubuntu 14.04) from the launchpad ppa:elmer-csc-ubuntu/elmer-csc-ppa and tried the first tutorial (pump_carter_sup.stp)

Everything works flawlessly (loading, meshing, seting up equations and boundary conditions), until I run the solver, which terminates with

Code: Select all

ELMER SOLVER (v 8.3) STARTED AT: 2017/12/08 16:35:53
ParCommInit:  Initialize #PEs:            1
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: Version: 8.3 (Rev: unknown, Compiled: 2017-12-05)
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Loading input file: case.sif
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init0]

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

Backtrace for this error:
#0  0xB7191133
#1  0xB71917D0
#2  0xB7727403
#3  0x0
I tried a simpler geometry of a cube and ended up with the same result.
Compiling from source also produced the same segmentation fault.

My SIF file in case I did something wrong

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = case.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
  Body Force = 1
End

Solver 1
  Equation = Result Output
  Output Format = Vtu
  Output File Name = case
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Exec Solver = Always
End

Equation 1
  Name = "Equation 1"
  Active Solvers(1) = 1
End

Material 1
  Name = "Aluminium (generic)"
  Heat expansion Coefficient = 23.1e-6
  Heat Conductivity = 237.0
  Sound speed = 5000.0
  Heat Capacity = 897.0
  Mesh Poisson ratio = 0.35
  Density = 2700.0
  Poisson ratio = 0.35
  Youngs modulus = 70.0e9
End

Body Force 1
  Name = "BodyForce 1"
  Heat Source = 0.01
End

Boundary Condition 1
  Target Boundaries(1) = 57 
  Name = "RoomTemp"
  Temperature = 293
End

Thanks in advance for any help.
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Solver Segmentation Fault

Post by mzenker »

HI,

you have only the result output solver in your sif file. That one doesn't calculate anything, it just writes the results to an (or several) output file(s).The tutorial uses the heat equation which is not in your sif file. So I think that is the cause of the error. Maybe you forgot to check the "active" checkbox.

Remark to Elmer team: The Solver could throw a more self-explaining error in such cases... ;)

HTH,

Matthias
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Solver Segmentation Fault

Post by raback »

Hi

Note taken. Also you request .vtu already with the "Post File". These are alternative. The ResultOutputSolver offers richer control but by default is exactly the same as just defined .vtu suffix for your Post File.

-Peter
crotales
Posts: 5
Joined: 08 Dec 2017, 12:17
Antispam: Yes

Re: Solver Segmentation Fault

Post by crotales »

That's just plain weird :D
But even worse

New SIF (stil doesn't work)

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = case.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
  Body Force = 1
End

Solver 1
  Equation = Heat Equation
  Procedure = "HeatSolve" "HeatSolver"
  Variable = Temperature
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Heat Equation"
  Active Solvers(1) = 1
End

Material 1
  Name = "Aluminium (generic)"
  Heat expansion Coefficient = 23.1e-6
  Heat Conductivity = 237.0
  Sound speed = 5000.0
  Heat Capacity = 897.0
  Mesh Poisson ratio = 0.35
  Density = 2700.0
  Poisson ratio = 0.35
  Youngs modulus = 70.0e9
End

Body Force 1
  Name = "BodyForce 1"
  Heat Source = 0.01
End

Boundary Condition 1
  Target Boundaries(1) = 57 
  Name = "RoomTemp"
  Temperature = 293
End

Output

Code: Select all

ELMER SOLVER (v 8.3) STARTED AT: 2017/12/08 17:32:03
ParCommInit:  Initialize #PEs:            1
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: Version: 8.3 (Rev: unknown, Compiled: 2017-12-05)
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Loading input file: case.sif
Loading user function library: [HeatSolve]...[HeatSolver_Init0]

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

Backtrace for this error:
#0  
0xB716C133
#1  0xB716C7D0
#2  0xB7702403
#3  0x0
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Solver Segmentation Fault

Post by mzenker »

Hmmm, I don't see an obvious error in your sif. If not too large, could you post your mesh files?

Matthias
crotales
Posts: 5
Joined: 08 Dec 2017, 12:17
Antispam: Yes

Re: Solver Segmentation Fault

Post by crotales »

Thank you so much for the quick help.

The mesh file is attached.

I don't think it has anything to do with the problem at hand, as I have tried several different geometries, and other problems. Nothing works, always a segfault. I believe it has something to do with the installation.
Attachments
pump_carter_sup.msh
(221.79 KiB) Downloaded 336 times
crotales
Posts: 5
Joined: 08 Dec 2017, 12:17
Antispam: Yes

Re: Solver Segmentation Fault

Post by crotales »

Tried to recompile from source.

ctest failed at every single test.

Any suggestion?
crotales
Posts: 5
Joined: 08 Dec 2017, 12:17
Antispam: Yes

Re: Solver Segmentation Fault

Post by crotales »

Found a workaround, somewhat

Install the elmer 6.1 from official repository

Use the ElmerGUI v8.3 combined with the ElmerSolver 6.1. Not sure if it is a good idea, but at least it works for the time being.
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Solver Segmentation Fault

Post by mzenker »

Hi,

I just downloaded your mesh file and the last sif you posted. The case ran flawlessly, no segfault here.
What I did (command line):

Code: Select all

ElmerGrid 14 2 pump_carter_sup.msh
ElmerSolver case.sif
I had to change one line in the sif to point to the mesh directory made by ElmerGrid:

Code: Select all

Mesh DB "./pump_carter_sup" "."
I use Elmer 8.3 installed from launchpad under Linux Mint 17.3.
If you use ElmerGUI, you have to open your mesh with File->Open. Also make sure to do a "Save project" before you start the solver.

HTH,

Matthias
Post Reply