I installed netgen/ngsolve following the “Install From Sources > Build on Linux” instructions. I am running Linux Mint version 21.2.
If I navigate to the tutorials directory and execute “netgen navierstokes.py”, everything works. If I try “python3 navierstokes.py”, then nothing happens for about a minute, and then I get “zsh: killed python3 navierstokes.py”.
I usually use zshell, but I have also tried a fresh install with Bash, and I have the same error whether I am running zshell or bash.
To troubleshoot, I tried to write an extremely simple script called test.py, which is the following:
import netgen as ng
print(“netgen imported from:”)
print(ng.__file__)import ngsolve as ng2
print(“ngsolve imported from:”)
print(ng2.__file__)
If I execute the command “netgen test.py”, I get the following (expected) output:
NETGEN-6.2.2404-43-g7f666547
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.2404-135-g68f697650
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 16 thread(s)
netgen imported from:
/home/tyler/Software/Py/Py_Libraries/ngsuite/ngsolve-install/lib/python3.10/dist-packages/netgen/__init__.py
ngsolve imported from:
/home/tyler/Software/Py/Py_Libraries/ngsuite/ngsolve-install/lib/python3.10/dist-packages/ngsolve/__init__.py
Thank you for using NGSolve
zsh: segmentation fault (core dumped) netgen test.py
If, instead, I run “python3 test.py”, I get:
ngsolve imported from:
/home/tyler/Software/Py/Py_Libraries/ngsuite/ngsolve-install/lib/python3.10/dist-packages/netgen/__init__.py
zsh: killed python3 test.py
The result is similar if I open ipy and try to run from there.
From all of the above, it seems that the netgen module loads correctly whether called from the netgen gui or from the command line, and also the ngsolve module loads correctly when called from the netgen gui, but somehow the system gets stuck when I try to load ngsolve from python3.
What could be causing this problem? How to fix it? I am totally stuck!