turning off tbb dependency without recompiling deal.II ?

20 views
Skip to first unread message

Mathieu

unread,
Jul 12, 2023, 1:56:42 PM7/12/23
to deal.II User Group
Hello everyone,

my question is a follow-up on this question that I created some weeks ago.
In a nutshell, I want to link deal.II against matlab, which results in a segmentation fault.

#include <deal.II/grid/grid_generator.h>
#include "MatlabEngine.hpp"
#include "MatlabDataArray.hpp"

//step-1.cc
int main()
{
matlab::engine::startMATLAB(); //provided by  matlab
dealii::Triangulation<2> triangulation;
}

The call to startMATLAB() results in a segfault, however,
there is no segfault if I comment the triangulation object.

Matthias Maier pointed me in the right direction by considering
ldd ./step-1
which lists, amongst many others, a symbol to the deal.II library and
libtbb.so.2 (thread building blocks)
I could figure out that matlab links against their own shipped version of tbb,
which probably results in the "symbol clash" that Matthias also mentioned.

I compiled deal.II with tbb enabled.
My question is if there is a way to "turn off" the tbb dependency (using a cmake variable) locally such that
ldd ./step-1
does not contain libtbb.so.2 anymore.
I know that one can do for instance
export DEAL_II_NUM_THREADS=1,
but that has no effect on the ldd call.

Thank you,
Math

Wolfgang Bangerth

unread,
Jul 12, 2023, 8:57:19 PM7/12/23
to dea...@googlegroups.com
On 7/12/23 11:56, Mathieu wrote:
>
> I compiled deal.II with tbb enabled.
> My *question* is if there is a way to "turn off" the tbb dependency (using a
> cmake variable) locally such that
> ldd ./step-1
> does not contain *libtbb.so.2* anymore.
> I know that one can do for instance
> export DEAL_II_NUM_THREADS=1,
> but that has no effect on the ldd call.

Right. You need to recompile and reinstall deal.II if you change this
configuration parameter.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages