Save scalars and segmentation fault

Numerical methods and mathematical models of Elmer
Post Reply
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Save scalars and segmentation fault

Post by annier »

Hi All,
What is the primary reason for segmentation fault while saving scalars using N-S solver with findOptimum, MeshUpdate, Result Output solvers in scanning mode?

Code: Select all

...
SaveScalars: Saving scalar values of various kinds

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

Backtrace for this error:
#0  0x7FE52E4A5E08
#1  0x7FE52E4A4F90
#2  0x7FE52E0F64AF
#3  0x7FE52E805DE8
#4  0x7FE52E8087B0
#5  0x7FE51D189D5E
#6  0x7FE52E9C761A
#7  0x7FE52E9D8474
#8  0x7FE52E9DA6A9
#9  0x7FE52EBB97ED
#10  0x4010D5 in MAIN__ at Solver.F90:?
Segmentation fault (core dumped)
I tried to lower the viscosity, changed the solver settings from ILU1 preconditioner to Diagonal preconditioner. These did not prevent this error.
Is it related to too fine mesh?

Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
vencels
Posts: 63
Joined: 20 Sep 2016, 17:05
Antispam: Yes
Location: Latvia
Contact:

Re: Save scalars and segmentation fault

Post by vencels »

You could try to recompile Elmer in debug mode

cmake -DCMAKE_BUILD_TYPE=Release ../elmerfemhen you

Then you will get a file name and line number where this error happens.
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Save scalars and segmentation fault

Post by annier »

Hi Juris,
1.
vencels wrote:cmake -DCMAKE_BUILD_TYPE=Release ../elmerfemhen you
Yours tips is an excellent solution for attempting to go ahead in debugging this fault. I will use later on when i compile elmer with cmake as this is the most convenient way ahead.

2. Currently, I am using Elmer via launchpad (which cannot be used with modified installation instructions) and not through cmake. For now, I guess the error is related to saving variables as it goes away when I comment that solver.


Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Save scalars and segmentation fault

Post by raback »

Hi Anil,

You could test which operator in the SaveScalars causes the dump by toggling them on and off. Most of the time the solver is running ok, so it is probably some particular operator & variable combination.

-Peter
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Save scalars and segmentation fault

Post by annier »

Peter,
- I will try to find the particular operator within the solver as you mention.
- At this moment, I am also learning about coupling opencalphad with elmer.

Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Post Reply