Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Segmentation fault while calling ngsolve library

More
6 years 2 months ago #382 by ankit101
Hi:
I am using the following python script in which I call both netgen and ngsolve:
from netgen.read_gmsh import ReadGmsh
# import the Gmsh file to a Netgen mesh object
mesh = ReadGmsh("output")

# wrap it into an NGSolve mesh
from ngsolve import *
mesh = Mesh(mesh)
Draw(mesh)
mesh.ngmesh.Save("netgen_cube.vol")
print ("num vol elements:", mesh.GetNE(VOL))
print ("num bnd elements:", mesh.GetNE(BND))

I have build netgen on an linux machine with no gui availbale and there has no error while building it while following the build instruction. The error which I get when I is the following:
python3 testgmsh.py (testgmsh.py is the name of the file)
set global mesh
zsh: segmentation fault (core dumped) python3 testgmsh.py
This error arises when control reaches "from ngsolve import *" although I am able to call netgen and associated function
More
6 years 2 months ago #384 by matthiash
Would you try running it in the debugger to see where exactly the segfault happens?

Just run
gdb -ex run -ex bt --args python3 testgmsh.py

and append the complete console output.
More
6 years 2 months ago - 6 years 2 months ago #387 by ankit101
hi Matthiash,
I have added the full output in text file (console_output.txt with this reply) from console after running the script in debugger. I also wanted to add that same segfault occurs when I call netgen only which is as follows:
togl-version : 2
no OpenGL
loading ngsolve library
zsh: segmentation fault (core dumped) netgen

Regards

Reegards
Ankit
Last edit: 6 years 2 months ago by ankit101.
Time to create page: 0.111 seconds