- Thank you received: 0
Segmentation fault while calling ngsolve library
6 years 9 months ago #382
by ankit101
Segmentation fault while calling ngsolve library was created 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
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
6 years 8 months ago #384
by matthiash
Replied by matthiash on topic Segmentation fault while calling ngsolve library
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.
Just run
gdb -ex run -ex bt --args python3 testgmsh.py
and append the complete console output.
6 years 8 months ago - 6 years 8 months ago #387
by ankit101
Replied by ankit101 on topic Segmentation fault while calling ngsolve library
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
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
Attachments:
Last edit: 6 years 8 months ago by ankit101.
Time to create page: 0.099 seconds