DLR-SC / tigl

The TiGL Geometry Library to process aircraft geometries in pre-design.
https://dlr-sc.github.io/tigl/
Apache License 2.0
235 stars 60 forks source link

OneTBB compatibility #964

Open meerfrau opened 1 year ago

meerfrau commented 1 year ago

Sadly Intel is changing its tbb library to things like oneapi-tbb which has /usr/lib/libtbb.so.12.8

My tigl build from source when through without complaining, but now libtbb is missing: tiglviewer-3: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory

Just linking with ln -s leads to an error in OpenCascade: tiglviewer-3: symbol lookup error: /opt/oce/lib/libTKMath.so.11: undefined symbol: _ZTIN3tbb4taskE

joergbrech commented 1 year ago

Thanks @meerfrau for opening an issue. So you built TiGL from source using the intel-compiler? How did you install OCE? It might be necessary to also build OCE using intel then. Note, that we use a patched opencascade version: https://github.com/DLR-SC/tigl-conda/tree/master/opencascade.

meerfrau commented 1 year ago

Hi Jan,

I'm on gcc. Intel just comes into play because they've renamed their thread buildings blocks into oneTBB.

After overcoming https://github.com/msys2/MINGW-packages/issues/9574 by using sed building against my local OpenCascade failed because it is too new:

./tigl/src/boolean_operations/GEOMAlgo_Splitter.hxx:102:10: Fehler: »void GEOMAlgo_Splitter::PostTreat()« als »override« markiert, überschreibt aber nicht
  102 |     void PostTreat() override;
      |          ^~~~~~~~~
./tigl/src/boolean_operations/GEOMAlgo_Splitter.cxx: In Elementfunktion »void GEOMAlgo_Splitter::PostTreat()«:
./tigl/src/boolean_operations/GEOMAlgo_Splitter.cxx:343:29: Fehler: keine passende Funktion für Aufruf von »GEOMAlgo_Splitter::PostTreat()«
  343 |   BOPAlgo_Builder::PostTreat();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In Datei, eingebunden von ./tigl/src/boolean_operations/GEOMAlgo_Splitter.hxx:52:
/usr/include/opencascade/BOPAlgo_Builder.hxx:519:32: Anmerkung: Kandidat: »virtual void BOPAlgo_Builder::PostTreat(const Message_ProgressRange&)«
  519 |   Standard_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange);
      |                                ^~~~~~~~~
/usr/include/opencascade/BOPAlgo_Builder.hxx:519:32: Anmerkung:   Kandidat erwartet 1 Argument, 0 angegeben
./tigl/src/common/tiglcommonfunctions.cpp:80:10: schwerwiegender Fehler: BRepAdaptor_HCompCurve.hxx: Datei oder Verzeichnis nicht gefunden
   80 | #include <BRepAdaptor_HCompCurve.hxx>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Only have /usr/include/opencascade/BRepAdaptor_CompCurve.hxx

make[2]: *** [src/CMakeFiles/tigl3_objects.dir/build.make:733: src/CMakeFiles/tigl3_objects.dir/common/tiglcommonfunctions.cpp.o] Fehler 1
In Datei, eingebunden von ./tigl/src/boolean_operations/CTrimShape.cpp:22:
./tigl/src/boolean_operations/GEOMAlgo_Splitter.hxx:102:10: Fehler: »void GEOMAlgo_Splitter::PostTreat()« als »override« markiert, überschreibt aber nicht
  102 |     void PostTreat() override;
      |          ^~~~~~~~~

Have you ever contemplated moving to a more recent OpenCascade?

joergbrech commented 1 year ago

Have you ever contemplated moving to a more recent OpenCascade?

Yes, I just haven't gotten around to it, see https://github.com/DLR-SC/tigl/discussions/932/ ...we are currently using 7.4.0. Until then, I suggest installing the patched opencascade version via conda from our deciated channel, ideally in a seperated conda environment:

conda create -n tigl_requirements python opencascade -c dlr-sc