Standalone Compilation of Examples Fails

27 views
Skip to first unread message

Travis Chapman

unread,
May 24, 2024, 4:45:02 PMMay 24
to dea...@googlegroups.com
Hi,

I am able to successfully install deal-ii with petsc, p4est and metis, and am able to run the examples that use those libraries after the installation finishes.

And yet, when I try to compile those same examples separately, i.e., if I copy them to some other path and do, for example:

cd step-2/build
cmake .. -DDEAL_II_DIR=path/to/deal-ii/install
make,

then the compilation fails during the linking phase. A brief snapshot of the errors is copied below.  Please advise, how do I fix this?

Error message (partial):

CMakeFiles/step-2.dir/step-2.cc.o:step-2.cc:function tbb::detail::d1::task_group_context::~task_group_context(): error: undefined reference to 'tbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)'           
CMakeFiles/step-2.dir/step-2.cc.o:step-2.cc:function tbb::detail::d1::start_for<tbb::detail::d1::blocked_range<unsigned long>, dealii::parallel::ParallelForInteger::apply_parallel(unsigned long, unsigned long, unsigned long) const::{lambda(tbb::detail::d1::blocked_range<unsigned long> const&)#1}, tbb::detail::d1::auto_partitioner const>::finalize(tbb::detail::d1::execution_data const&): error: undefined r
eference to 'tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'                                                                CMakeFiles/step-2.dir/step-2.cc.o:step-2.cc:function tbb::detail::d1::start_for<tbb::detail::d1::blocked_range<unsigned long>, dealii::parallel::ParallelForInteger::apply_parallel(unsigned long, unsigned 
long, unsigned long) const::{lambda(tbb::detail::d1::blocked_range<unsigned long> const&)#1}, tbb::detail::d1::auto_partitioner const>::finalize(tbb::detail::d1::execution_data const&): error: undefined reference to 'tbb::detail::r1::notify_waiters(unsigned long)'


__________________________________
Thanks, and regards,
Travis

Wolfgang Bangerth

unread,
May 24, 2024, 11:30:32 PMMay 24
to dea...@googlegroups.com
On 5/24/24 00:32, Travis Chapman wrote:
>
> then the compilation fails during the linking phase. A brief snapshot of the
> errors is copied below. Please advise, how do I fix this?

Travis,
I don't know what exactly it is that is going on here. It *looks* like a
mismatch in the versions of the Threading Building Blocks that are used when
you are building in the two directories, but I'm unsure how or why. You may
want to compare what the exact compile and linker lines are when you compile with
make VERBOSE=1
in the two directories. (I assume that the issue happens during linking, not
when you execute the program.)

Best
W.

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


Reply all
Reply to author
Forward
0 new messages