- Thank you received: 0
Compile error when both MPI and GUI are turned on
7 years 2 months ago #179
by massing
Compile error when both MPI and GUI are turned on was created by massing
Dear all,
Following the description from
ngsolve.org/docu/latest/install/installlinux.html
I am trying to compile netgen/ngsolve on Debian 9.0 with cmake flags
This results in a compile error when build the target visual
With either one of the MPI/GUI options turned off, the code compiles just fine.
I did a quick grepping of the source code and understood that many vssolution.MEMBERFUNCTION() calls have been replaced by netgen::GetVSSolution().MEMBERFUNCTION() calls.
So while not being sure what I was doing, I tried my luck and replaced the corresponding line 835 in mvdraw.cpp by
The the code compiled fine, but I now get a linking error
Any advice on how to fix this compile/linking error?
Thanks and best,
Andre
Following the description from
ngsolve.org/docu/latest/install/installlinux.html
I am trying to compile netgen/ngsolve on Debian 9.0 with cmake flags
Code:
cmake -DCMAKE_INSTALL_PREFIX=${BASEDIR}/ngsolve-install \
-DUSE_GUI=ON \
-DUSE_MPI=ON \
${BASEDIR}/ngsolve-src
This results in a compile error when build the target visual
Code:
[ 42%] Linking CXX shared library libmesh.so
[ 42%] Built target mesh
Scanning dependencies of target visual
[ 42%] Building CXX object libsrc/visualization/CMakeFiles/visual.dir/meshdoc.cpp.o
[ 43%] Building CXX object libsrc/visualization/CMakeFiles/visual.dir/mvdraw.cpp.o
/home/andre/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/visualization/mvdraw.cpp: In member function ‘void netgen::VisualScene::Broadcast()’:
/home/andre/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/visualization/mvdraw.cpp:835:5: error: ‘vssolution’ was not declared in this scope
vssolution.Broadcast ();
^~~~~~~~~~
libsrc/visualization/CMakeFiles/visual.dir/build.make:86: recipe for target 'libsrc/visualization/CMakeFiles/visual.dir/mvdraw.cpp.o' failed
make[8]: *** [libsrc/visualization/CMakeFiles/visual.dir/mvdraw.cpp.o] Error 1
CMakeFiles/Makefile2:1333: recipe for target 'libsrc/visualization/CMakeFiles/visual.dir/all' failed
With either one of the MPI/GUI options turned off, the code compiles just fine.
I did a quick grepping of the source code and understood that many vssolution.MEMBERFUNCTION() calls have been replaced by netgen::GetVSSolution().MEMBERFUNCTION() calls.
So while not being sure what I was doing, I tried my luck and replaced the corresponding line 835 in mvdraw.cpp by
Code:
netgen::GetVSSolution().Broadcast();
The the code compiled fine, but I now get a linking error
Code:
Scanning dependencies of target netgen
[ 99%] Building CXX object ng/CMakeFiles/netgen.dir/ngappinit.cpp.o
[ 99%] Building CXX object ng/CMakeFiles/netgen.dir/onetcl.cpp.o
[100%] Linking CXX executable netgen
libgui.so: undefined reference to `netgen::vssolution'
collect2: error: ld returned 1 exit status
ng/CMakeFiles/netgen.dir/build.make:142: recipe for target 'ng/netgen' failed
make[8]: *** [ng/netgen] Error 1
Any advice on how to fix this compile/linking error?
Thanks and best,
Andre
7 years 2 months ago #180
by matthiash
Replied by matthiash on topic Compile error when both MPI and GUI are turned on
Hello Andre,
Thank you for the concise report. I fixed the build errors of both Netgen and NGSolve on master.
Note that the GUI might currently be in an unstable state if you run netgen with mpi, like
mpirun -np x netgen
Best,
Matthias
Thank you for the concise report. I fixed the build errors of both Netgen and NGSolve on master.
Note that the GUI might currently be in an unstable state if you run netgen with mpi, like
mpirun -np x netgen
Best,
Matthias
Time to create page: 0.098 seconds