Compilation from source crash at flowEngine

Asked by Raphaël Maurin

Hi,

I re-installed xubuntu (18.04) and I am unable to compile Yade from the actual source file. After downloading all the libraries necessary for Yade, I compiled the code and it stopped at 81% with the following error:

[ 81%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o
In file included from /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.hpp:481:0,
                 from /home/raphael/work/software/Yade/trunk/pkg/pfv/FlowEngine.cpp:11:
/home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp: In instantiation of ‘void TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::updateLinearSystem(TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::Solver&) [with _CellInfo = FlowCellInfo_FlowEngineT; _VertexInfo = FlowVertexInfo_FlowEngineT; _Tesselation = CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> >; solverT = CGT::FlowBoundingSphere<CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> > >; TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::Solver = CGT::FlowBoundingSphere<CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> > >]’:
/home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:91:90: required from ‘void TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::action() [with _CellInfo = FlowCellInfo_FlowEngineT; _VertexInfo = FlowVertexInfo_FlowEngineT; _Tesselation = CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> >; solverT = CGT::FlowBoundingSphere<CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> > >]’
/home/raphael/work/software/Yade/trunk/pkg/pfv/FlowEngine.cpp:34:754: required from here
/home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:810:14: error: ‘TemplateFlowEngine_FlowEngineT<FlowCellInfo_FlowEngineT, FlowVertexInfo_FlowEngineT>::Solver {aka class CGT::FlowBoundingSphere<CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> > >}’ has no member named ‘isLinearSystemSet’; did you mean ‘resetLinearSystem’?
         flow.isLinearSystemSet = false;
         ~~~~~^~~~~~~~~~~~~~~~~
         resetLinearSystem
/home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:811:7: error: ‘TemplateFlowEngine_FlowEngineT<FlowCellInfo_FlowEngineT, FlowVertexInfo_FlowEngineT>::Solver {aka class CGT::FlowBoundingSphere<CGT::_Tesselation<CGT::TriangulationTypes<FlowVertexInfo_FlowEngineT, FlowCellInfo_FlowEngineT> > >}’ has no member named ‘factorizedEigenSolver’; did you mean ‘factorizeOnly’?
  flow.factorizedEigenSolver = false;
  ~~~~~^~~~~~~~~~~~~~~~~~~~~
  factorizeOnly
CMakeFiles/yade.dir/build.make:3422: recipe for target 'CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o' failed
make[2]: *** [CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o] Error 1
make[2]: *** Attente des tâches non terminées....
CMakeFiles/Makefile2:139: recipe for target 'CMakeFiles/yade.dir/all' failed
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Any idea of what it could be due to ? Is there a problem in the source code or am I missing something ?

Thank you in advance,

Raphael

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:
Last reply:
Revision history for this message
Best Robert Caulk (rcaulk) said :
#1

Hello,

Please confirm that you are not using LINSOLV by pasting the output of your cmake command.

Next question: why aren't you using LINSOLV?! sudo apt-get libsuitesparse-dev, libmetis-dev and re-cmake and re-make. I see no reason to not use LINSOLV.

Thanks for pointing this out. I need to add some #ifdefs to protect against non LINSOLV compiled version.

Cheers,

Robert

Revision history for this message
Raphaël Maurin (raphael-maurin) said :
#2

Hi Robert,

Thank you for your answer. Here is the output of the cmake command:

raphael@raphaelPerso:~/work/software/Yade/build$ cmake -DCMAKE_INSTALL_PREFIX=../compiled ../trunk
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
qmake: could not find a Qt installation of ''
-- Found unsuitable Qt version "" from NOTFOUND
-- Version is set to 2018-09-13.git-2c71b2a
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0
-- GCC Version >= 4.8. Adding -save-temps
-- GCC Version >= 4.9. Adding -fstack-protector-strong
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- chrono
-- atomic
-- Boost_VERSION: 106501
-- Boost_LIB_VERSION: 1_65_1
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_python.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_iostreams.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_serialization.so/usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found Eigen3, version: 3.3.4
-- Disable vectorization
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- Found VTK
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GTS
-- USE QT5
-- Found GUI-Qt5-LIBS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- Could NOT find Cholmod (missing: CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY)
-- Could NOT find Metis (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Missing dependency for LINSOLV, disabled
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at your own risk!
Yade will be installed to /home/raphael/work/software/Yade/compiled
-- Suffix is set to -2018-09-13.git-2c71b2a
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/raphael/work/software/Yade/compiled
-- Could NOT find gts (missing: PY_gts)
-- Use embedded version of gts. Please, consider installing the corresponding package
-- VTK version >5 is found
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW TWOPHASEFLOW GL2PS LBMFLOW
-- Disabled features: LINSOLV SPH DEFORM LIQMIGRATION MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raphael/work/software/Yade/build

It is indeed not using LINSOLV as you guessed. I didn't do that on purpose, I just followed the step of the installation from source written on Yade website.
I installed libsuiteparse and libmetis as you said and everything is compiling. But when I launch yade, I obtain an error:

raphael@raphaelPerso:~/work/software/Yade/compiled/bin$ ./yade-2018-09-13.git-2c71b2a
Welcome to Yade 2018-09-13.git-2c71b2a
Traceback (most recent call last):
  File "./yade-2018-09-13.git-2c71b2a", line 129, in <module>
    import yade
  File "/home/raphael/work/software/Yade/compiled/lib/x86_64-linux-gnu/yade-2018-09-13.git-2c71b2a/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /home/raphael/work/software/Yade/compiled/lib/x86_64-linux-gnu/yade-2018-09-13.git-2c71b2a/libyade.so: undefined symbol: openblas_set_num_threads

I do not understand the error message, could you help me ?

Cheers,

Raphael

Revision history for this message
Robert Caulk (rcaulk) said :
#3

Did you also install libopenblas-dev as requested in the installation instructions?

"sudo apt-get install libopenblas-dev libsuitesparse-dev libmetis-dev"

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Hi Raphaël,
Thanks for reporting, it may help keeping a lightweight (non-linsolv) version of FlowEngine possible.
Although as Robert suggests it makes little sense currently to compile PFV without LINSOLV it might be useful in the long run.

Note that you can also disable FlowEngine as a whole if escaping the compile error is you immediate need and you don't need the fluid couplings: -DENABLE_PFVFLOW=OFF, -DENABLE_TWOPHASEFLOW=OFF

Cheers

Bruno

Revision history for this message
Raphaël Maurin (raphael-maurin) said :
#5

Hi Robert and Bruno,

Indeed, I didn't install libopenblas-dev. Actually, it is not written that this is mandatory on the installation webpage, so I just copied and paste the five lines of mandatory libraries. Probably we should actualize the installation webpage, can I change it myself in the source code ? (if yes, where ? )

Thank you for the precision Bruno, indeed I don't need the flow engine so I should probably have disabled it.

After installing libopenblas, everything works fine, thank you Robert !

Cheers,

Raphael

Revision history for this message
Raphaël Maurin (raphael-maurin) said :
#6

Thanks Robert Caulk, that solved my question.

Revision history for this message
Robert Caulk (rcaulk) said :
#7

Thanks Raphael,

For various reasons, we like keeping LINSOLV optional. Therefore, the main fix is simply adding #ifdefs to FlowEngine and adding a dependency for TWOPHASFLOW. I just completed these changes so you are welcome to recompile without LINSOLV and test it out :-)