install NGsolve without root access

More
7 years 5 months ago #28 by Guosheng Fu
Hello all,

I am interested to install NGsolve on a local cluster, but I don't have root access.
There are a couple of required libraries missing, including:

1, tk version >8.5 ****(I only have module tcltk version 8.4.19)
2, libxmu-dev, xorg-dev, libglu**, liblapacke-dev missing

I was wondering if I could install NGsolve without using these libraries, or is there a way to install these libraries without root access. If there is no cheap way to do so, I might turn to ask the cluster helpdesk to install the missing libraries...


Best regards,
Guosheng
More
7 years 5 months ago #29 by lkogler
You can build Netgen without the GUI (CMake-option -DUSE_GUI=OFF), in which case you should not need the tcl/tk/OpenGL-libraries.

You can run all computations without the GUI and use VTKOut and for example ParaView for visualization.

If you need/want to have the GUI, in principle, you can compile all of those libraries yourself, however properly compiling and installing the OpenGL-libraries is probably pretty difficult and I have personally never made this work myself, so in that case I would recommend asking the cluster helpdesk.

If you want to use LAPACK, you will either need the liblapacke-dev package or you will have to compile a lapack-library yourself. One option which is relatively uncomplicated would be openblas (which also provides lapack-functionality).

Alternatively, you can turn LAPACK support off with the CMake-option -DUSE_LAPACK=OFF.

One more thing to consider: If you are planning on using MPI, the Netgen GUI does not currently work at all (or, at least, is very unstable).
Also, there should be a big patch with MPI-bugfixes and additional MPI-functionality coming out in the next few days, so maybe wait for that one.

Best regards,
Lukas Kogler
More
7 years 5 months ago #30 by Guosheng Fu
Hi Lukas,

So, I turned off GUI, and am able to install netgen with the python interface.
But I got a compiling error when install ngsolve. here is the error information:

[ 37%] Building CXX object fem/CMakeFiles/ngfem.dir/l2hofe.cpp.o
[ 37%] Building CXX object fem/CMakeFiles/ngfem.dir/l2hofe_trig.cpp.o
[ 38%] Building CXX object linalg/CMakeFiles/ngla.dir/elementbyelement.cpp.o
[ 39%] Building CXX object linalg/CMakeFiles/ngla.dir/arnoldi.cpp.o
[ 40%] Building CXX object fem/CMakeFiles/ngfem.dir/l2hofe_segm.cpp.o
[ 41%] Building CXX object linalg/CMakeFiles/ngla.dir/paralleldofs.cpp.o
[ 41%] Building CXX object linalg/CMakeFiles/ngla.dir/python_linalg.cpp.o
[ 42%] Building CXX object linalg/CMakeFiles/ngla.dir/umfpackinverse.cpp.o
[ 43%] Building CXX object fem/CMakeFiles/ngfem.dir/l2hofe_tet.cpp.o
[ 43%] Building CXX object fem/CMakeFiles/ngfem.dir/hcurlhofe.cpp.o
[ 44%] Building CXX object fem/CMakeFiles/ngfem.dir/hcurlhofe_hex.cpp.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See < gcc.gnu.org/bugs.html > for instructions.
make[6]: *** [fem/CMakeFiles/ngfem.dir/l2hofe_trig.cpp.o] Error 4
make[6]: *** Waiting for unfinished jobs....
[ 45%] Linking CXX shared library libngla.so
[ 45%] Built target ngla
make[5]: *** [fem/CMakeFiles/ngfem.dir/all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [dependencies/Stamp/ngsolve/ngsolve-build] Error 2
make[2]: *** [CMakeFiles/ngsolve.dir/all] Error 2
make[1]: *** [CMakeFiles/ngsolve.dir/rule] Error 2
make: *** [ngsolve] Error 2

Do you know where might go wrong?
I use cmake version 3.5.2, gcc/g++ version 5.1.0, and python3.4

Best,
Guosheng
More
7 years 5 months ago #31 by lkogler
You might have run out of memory during compilation - try keeping an eye on the free memory on the node you are compiling on (ex: watch -n 0.5 free -g).

This might happen if you compile with very many threads on a node with comparatively little memory, try to compile with fewer threads (make -j 4).
More
7 years 5 months ago #32 by Guosheng Fu
Yeah, it was a memory issue.

Now, I got a build error at the very final stage:

[100%] Linking CXX executable ngs
[100%] Built target ngslib
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi2ELi2EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi3EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi2ELi3EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi1EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi2EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi3ELi3EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi0ELi2EDv4_dEEviiPKT1_mPS3_mS6_m'
../comp/libngcomp.so: undefined reference to `_ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi0ELi1EDv4_dEEviiPKT1_mPS3_mS6_m'
collect2: error: ld returned 1 exit status
make[5]: *** [solve/ngs] Error 1
make[4]: *** [solve/CMakeFiles/ngs.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [dependencies/Stamp/ngsolve/ngsolve-build] Error 2
make[1]: *** [CMakeFiles/ngsolve.dir/all] Error 2
make: *** [all] Error 2

Any clue what might went wrong?

Best,
Guosheng
More
7 years 5 months ago #33 by lkogler
It says that it is missing some symbols which should be in libinterface.so, which is a netgen-library.

The build-process works like this:
First, netgen is compiled, linked and installed and after that ngsolve is compiled, then the netgen-libs are linked to the ngsolve-libs where necessary and then ngsolve is installed.

The issue seems to be that the linker either cannot find libinterface or that the one it is trying to link to does not have the right symbols in it.

Where are you installing netgen/ngsolve TO? Do you have write-permissions there?
If not, cmake cannot properly copy the netgen-libraries out of the build-folder into the install-folder and then cannot find them during the linking of ngsolve. I am not sure which install-path is the default, but I think it is "/bin/.." or "/opt/.." where you do not have write-permissions. You can set the folder you are installing to with "-DCMAKE_INSTALL_PREFIX=..." .

You can check what exactly is happening with "make VERBOSE=1", you should be able to tell exactly against which libraries the compiler is trying to link from that.

Check where the compiler thinks libinterface.so is located and doublecheck that it is actually there.

You can also check if the libinterface.so you are linking to actually has those symbols with:

nm ~/local/netgen-std/lib/libinterface.so -a | grep MultiElement

This should give you a couple of lines like these:
000000000016d10 T _ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi1EdEEviiPKT1_mPS2_mS5_m
0000000000016ef0 T _ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi1EDv4_dEEviiPKT1_mPS3_mS6_m
0000000000016ce0 T _ZNK6netgen8Ngx_Mesh26MultiElementTransformationILi1ELi2EdEEviiPKT1_mPS2_mS5_m

If you do not get any output here, this means that the library does not have these symbols. In that case, are you maybe trying to link against a libinterface from an old install or maybe even against a library that is called "libinterface" but might just by coincidence have the same name and actually come from somewhere completely different?

If you still have issues, could you post the output of "make VERBOSE=1" (the command that comes after the cmake-message "Linking CXX shared library libngcomp.so"?
Time to create page: 0.107 seconds