custer installation issue (again)

Hi guys,

I am going through the same installation issue again…

A year ago, with your help I have installed ngsolve in a cluster… but I have no access to the cluster anymore…

Now, I would like to get ngsolve installed on my local cluster, but it cause issue again as usual.

So, after make install, I got the following error message at the final linking stage (100%):

/users/gfu1/data/ngbuild/ngsolve-install/lib/ undefined reference to gzclose' /users/gfu1/data/ngbuild/ngsolve-install/lib/ undefined reference to gzwrite’
/users/gfu1/data/ngbuild/ngsolve-install/lib/ undefined reference to gzopen' /users/gfu1/data/ngbuild/ngsolve-install/lib/ undefined reference to gzread’

A similar linking issue was found a year ago, but the fix there was simple…here I don’t have a clue what’s going on



sounds like you are missing “zlib”.
On my ubuntu 18.04 the package “zlib1g-dev” contains what you need. But at least for ubuntu, I thinks that’s installed by default. Which OS are you using?


I do have a zlib(what is there!?) issue initially, so, I passed the flags in cmake to the correct location
to locate zlib

I thought this shall be enough

We have a RedHat7 system…


you could check your netgen cmake cache. This file is located in the netgen subfolder of you ngsolve build folder.
My CMakeCache.txt contains these lines.

//Path to a file.

//Path to a library.

//Path to a library.

Which variable did you set? The location of the following variable should be used as hint to search for the header and the library.



I have

//No help, variable specified on the command line.

But I don’t have

In the cmake file, I used these two lines to locate zlib

-DZLIB_LIBRARY=/gpfs/runtime/opt/zlib/1.2.8/lib \

If you specify it that way, you have to set


And check if the “” is in this folder.

Did you try to set


I think this should find both, library and header.


is not recognized…

Now, I have a even worse issue while building netgen…

[ 26%] Built target visual
/tmp/ccV60kWH.s: Assembler messages:
/tmp/ccV60kWH.s:1100: Error: suffix or operands invalid for vbroadcastsd' make[8]: *** [libsrc/linalg/CMakeFiles/la.dir/bfgs.cpp.o] Error 1 [ 26%] Building CXX object libsrc/general/CMakeFiles/gen.dir/seti.cpp.o [ 27%] Building CXX object libsrc/general/CMakeFiles/gen.dir/sort.cpp.o /tmp/ccsdcFfI.s: Assembler messages: /tmp/ccsdcFfI.s:896: Error: suffix or operands invalid for vbroadcastsd’
/tmp/ccsdcFfI.s:1039: Error: suffix or operands invalid for vbroadcastsd' /tmp/ccsdcFfI.s:1504: Error: no such instruction: vpbroadcastd %xmm0,%ymm0’
/tmp/ccsdcFfI.s:1505: Error: suffix or operands invalid for vpaddd' /tmp/ccsdcFfI.s:1510: Error: suffix or operands invalid for vpaddd’
/tmp/ccsdcFfI.s:2813: Error: suffix or operands invalid for vbroadcastsd' /tmp/ccsdcFfI.s:3999: Error: suffix or operands invalid for vbroadcastsd’
/tmp/ccsdcFfI.s:4462: Error: suffix or operands invalid for `vbroadcastsd’
make[8]: *** [libsrc/linalg/CMakeFiles/la.dir/densemat.cpp.o] Error 1

This didn’t happen yesterday :<

After deleting all the old files… now, the installation phase is working fine. It was the ZLIB issue…

However, it give me a segmentation fault when I tried

from ngsolve import *

FYI, besides the seg. fault,
this is what I got when run
make test_ngsolve

3% tests passed, 28 tests failed out of 29

Label Time Summary:
accuracy = 0.26 sec (3 tests)
performance = 0.09 sec (1 test)
standard = 0.95 sec (11 tests)

Total Test time (real) = 3.79 sec

The following tests FAILED:
1 - (Failed)
2 - (Failed)
3 - (Failed)
4 - (Failed)
5 - (Failed)
6 - (Failed)
7 - (Failed)
8 - (Failed)
9 - (Failed)
10 - (Failed)
11 - (Failed)
12 - d1_square.pde (Failed)
13 - d2_chip.pde (Failed)
14 - d3_helmholtz.pde (Failed)
15 - d4_cube.pde (Failed)
16 - d5_beam.pde (Failed)
17 - d6_shaft.pde (Failed)
18 - d7_coil.pde (Failed)
19 - d8_coilshield.pde (Failed)
20 - d9_hybridDG.pde (Failed)
21 - d10_DGdoubleglazing.pde (Failed)
22 - d11_chip_nitsche.pde (Failed)
23 - d4_cube_performance.pde (Failed)
24 - acc_poisson_circle.pde (Failed)
25 - acc_poisson_circle_HDG.pde (Failed)
26 - acc_poisson_circle_HDG_hodc.pde (Failed)
28 - test_ngscxx (Not Run)
29 - pytest (Failed)
Errors while running CTest
gmake[4]: *** [test] Error 8
make[3]: *** [CMakeFiles/test_ngsolve] Error 2
make[2]: *** [CMakeFiles/test_ngsolve.dir/all] Error 2
make[1]: *** [CMakeFiles/test_ngsolve.dir/rule] Error 2
make: *** [test_ngsolve] Error 2

Hi Guosheng,

not everything from the sequential version is expected to work in parallel, see this list of supported MPI functionality:


Hi Guosheng,

Sorry to hear you are running into issues again :frowning: . Let’s see if we can resolve this.

Could you send me a backtrace of gdb for a simple .pde-file?

For example, execute “d1_square.pde” from the pde_tutorials with

mpirun -np 5  bash .wrap_mpirun gdb -batch -ex "run" -ex bt --args ngs d1_square.pde

“.wrap_mpirun” should be something like this (with OpenMPI), and just pipes the output to seperate files
for all mpi-ranks:


Also, please send me the output of:

which ngspy | xargs cat
which ngs | xargs ldd

Also, could you try to import netgen in python and see if that crashes too?

Finally, your CmakeCache, the cmake-command you used and the cmake-output would be useful.

In principle, the tests are supposed to work with MPI! In this case, of course, they all fail because something is wrong with the ngsolve-libraries.

While this is probably not the issue you are running into in this case, on the cluster, they might still fail because you might not be allowed to run any MPI computations on the login node . If that is the issue, you have to go through the batch system (e.g. by switching to an interactive session and then running the tests as usual.)



Here is my cmake file:

 cmake \
-DCMAKE_PREFIX_PATH=/users/gfu1/data/ngsolve-install-plain \
-DINSTALL_DIR=/users/gfu1/data/ngsolve-install-plain \
-DMKL_ROOT=/gpfs/runtime/opt/intel/2017.0/mkl \
-DZLIB_INCLUDE_DIR=/gpfs/runtime/opt/zlib/1.2.8/ \
-DZLIB_LIBRARY=/gpfs/runtime/opt/zlib/1.2.8/lib/ \
-DCMAKE_CXX_COMPILER=/gpfs/runtime/opt/gcc/5.2.0/bin/g++ \
-DCMAKE_C_COMPILER=/gpfs/runtime/opt/gcc/5.2.0/bin/gcc \

I turned off MPI.
Here in the attachment is the CmakeCache in the build directory.

I am doing everything in a computing node via a interactive session.

which ngs | xargs ldd gives the following: =>  (0x00007fff643ff000)
	/usr/local/lib/ (0x00007f7bf293f000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bf2644000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bf1adc000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bf0523000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7befdc6000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7befadb000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bef76c000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bef562000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bef308000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bef07b000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7beee39000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7beeb33000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bee623000) => /gpfs/runtime/opt/zlib/1.2.8/lib/ (0x00007f7bee40d000) => /users/gfu1/data/ngsolve-install-plain/lib/ (0x00007f7bee20c000) => /gpfs/runtime/opt/python/3.6.1/lib/ (0x00007f7bedd04000)
	/gpfs/runtime/opt/intel/2017.0/mkl/lib/intel64/ (0x00007f7bed1e6000)
	/gpfs/runtime/opt/intel/2017.0/mkl/lib/intel64/ (0x00007f7bec01a000)
	/gpfs/runtime/opt/intel/2017.0/mkl/lib/intel64/ (0x00007f7bea52a000) => /lib64/ (0x00007f7bea31e000) => /lib64/ (0x00007f7bea101000) => /gpfs/runtime/opt/gcc/5.2.0/lib64/ (0x00007f7be9d73000) => /lib64/ (0x00007f7be9aef000) => /gpfs/runtime/opt/gcc/5.2.0/lib64/ (0x00007f7be98ce000) => /gpfs/runtime/opt/gcc/5.2.0/lib64/ (0x00007f7be96b7000) => /lib64/ (0x00007f7be9323000)
	/lib64/ (0x00007f7bf2cf6000) => /lib64/ (0x00007f7be911f000) => /lib64/ (0x00007f7be8f16000)

I do not have ngspy in my $NETGENDIR directory, where only
ngs, ngscxx, ngsld
are available.
In my laptop version of ngsolve, I also do not have ngspy…


Attachment: CMakeCache.txt

Now I have a complete rebuild of ngsolve.
The segmentation fault is gone, surprise!
But I have a MKL issue (this bug is way more friendly:>):

Intel MKL FATAL ERROR: Cannot load or

In my application, I need a hybrid-Poisson solver, so I am using the static condensation approach for the implementation, and apply a sparsecholesky factorization for the resulting hybrid matrix.
It is this line that cause the code crash:

inva = av.mat.Inverse(fes.FreeDofs(coupling=True), inverse="sparsecholesky")

I recall that I have another build that turned off MKL, which cause the seg. fault before, but now I am not completely sure…


If you have not enabled MPI, that makes things less complicated. You don’t need ngspy in that case
(that only exists because we had some issues with linking MKL libraries and MPI on certain systems).

You can simply run

gdb -ex run --args python3

or something similar.

Try turning MKL_SDL on,

Ha, with
the installation works!

This shall save a lot my computing time, thank you guys! (hopefully everything works…)