Regarding Installation

I have installed Netgen and NGSOLVE 6.0 on my local machine using the instruction given on your download page of Ngsolve. But recently I needed to install Netgen 6.0 on our university cluster. As given in the instructions, we need to have root privileges for installation of all the Prerequisites. Given that it’s our university cluster, I don’t have root privileges. Hence I would like to know whether anyone has a complete set of instruction for installing netgen 6.0 and all the prerequisites without root privileges.


Which instructions did you follow? Did you compile NGSolve yourself?

On a cluster I recommend to compile from sources. Also have a look at the configuration options. I recommend to disable the graphical user interface (by setting -DUSE_GUI=OFF at configuration).
I guess you have Intel MKL and some c++ (with C++14 support!) compiler already available on the cluster. If you can use that too, the list of dependencies strips down to:

  • python3 (including headers)
  • cmake
  • git (to fetch the sources, you can also download a zip file instead)

I am sure the system administrators can help you with them in case they are not already installed.


I did install again using the flag -DUSE_GUI=OFF while configuring but after installation, i ran into following problems:
(a) I have a python script as following which converts a gmesh into .vol format

from netgen.read_gmsh import ReadGmsh
mesh = ReadGmsh(“output”)

wrap it into an NGSolve mesh

from ngsolve import *
mesh = Mesh(mesh)
print (“num vol elements:”, mesh.GetNE(VOL))
print (“num bnd elements:”, mesh.GetNE(BND))

i cant run this script as it gives me the following error:
Traceback (most recent call last):
File “”, line 1, in
from netgen.read_gmsh import ReadGmsh
ImportError: No module named ‘netgen’

I need this script as I have to convert my gmsh into .vol format

Did you set NETGENDIR and PYTHONPATH appropriately, as stated here?

export PYTHONPATH=$NETGENDIR/../`python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))"`

Thanks, I just set the python path and although python script is now being interpreted properly, I get a seg fault while importing this ngsolve library(that is when the control reaches the line: from ngsolve import *). I had this problem even when I had netgen installed with gui on the cluster. I am adding the command line’s output on running the code is my python script that I posted earlier

set global mesh
zsh: segmentation fault (core dumped) python3