Undefined reference in data_out_dof_data

85 views
Skip to first unread message

H

unread,
Aug 8, 2024, 5:10:29 PM8/8/24
to deal.II User Group
Hi, 

I was trying to run the dealii with Ubuntu desktop on Mac M1 but this is the error I received. I did not use the add_data_vector_internal function in my code. May I ask why would this happened?

Sincerely and Best Regards,
H

/home/parallels/dealii-candi/deal.II-v9.2.0/include/deal.II/numerics/data_out_dof_data.h:1081: error: undefined reference to 'void dealii::DataOut_DoFData<dealii::DoFHandler<2, 2>, 2, 2>::add_data_vector_internal<dealii::IndexSet>(dealii::DoFHandler<2, 2> const*, dealii::IndexSet const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, dealii::DataOut_DoFData<dealii::DoFHandler<2, 2>, 2, 2>::DataVectorType, std::vector<dealii::DataComponentInterpretation::DataComponentInterpretation, std::allocator<dealii::DataComponentInterpretation::DataComponentInterpretation> > const&, bool)'


Wolfgang Bangerth

unread,
Aug 8, 2024, 5:27:40 PM8/8/24
to dea...@googlegroups.com
H:
I don't quite know what is going wrong here, but you're using deal.II
9.2, which was released 4 years ago. This function no longer exists
today, so it's hard to tell what the source of the error may have been.
In any case, we're not likely going to fix anything in a release this
old. Can you try to install a newer version of deal.II?

Best
W.

Hao Ye

unread,
Aug 8, 2024, 5:39:13 PM8/8/24
to dea...@googlegroups.com
Hi W.

Thank you so much for your response.

I am using Ubuntu and the CMake version is 3. 22. 1, and this dealii is what compatible with the system.

Best,
Hao Ye
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/5406b202-f990-42c2-bec7-d31c83086a2b%40colostate.edu.

Wolfgang Bangerth

unread,
Aug 8, 2024, 5:45:57 PM8/8/24
to dea...@googlegroups.com

On 8/8/24 15:36, Hao Ye wrote:
> I am using Ubuntu and the CMake version is 3. 22. 1, and this dealii is what compatible with the system.

I wished I had a better answer, but the only suggestion I have is to
either find a newer package for the system you have, or to upgrade the
system you have, or to install the latest version of deal.II by hand.

Best
W.

Hao Ye

unread,
Aug 9, 2024, 3:24:56 PM8/9/24
to dea...@googlegroups.com
Hi W.

Thank you so much for your response!

However, if I don’t use Ubuntu then the error would look like this with dealii9.5.2

Best,
H.

Screenshot 2024-08-08 at 16.47.45.png

Hao Ye

unread,
Aug 9, 2024, 3:24:57 PM8/9/24
to dea...@googlegroups.com
If I use the MacOS with dealii 9.5.2 then it would have this error

Screenshot 2024-08-08 at 16.48.00.png

Wolfgang Bangerth

unread,
Aug 9, 2024, 3:28:40 PM8/9/24
to dea...@googlegroups.com

On 8/8/24 16:29, Hao Ye wrote:
>
> However, if I don’t use Ubuntu then the error would look like this with
> dealii9.5.2

It used to be that you can call DataOut::add_data_vector() with an
IndexSet as argument. But this ability has been removed several years
ago -- it is probably listed in one of the changelogs for the past
releases. You can of course use a Vector<double> in which you set
entries to zero or one, depending on whether an index is listed in the
IndexSet.

Best
W.

H

unread,
Aug 11, 2024, 2:50:07 PM8/11/24
to deal.II User Group
Hi W,

Thank you so much for your help. If I switched back to M1 laptop, it has the same error but different reasons. I attached the error from my MacOS with this email.

Great Thanks!
H.

Screenshot 2024-08-09 at 14.26.30.png

Wolfgang Bangerth

unread,
Aug 11, 2024, 6:08:34 PM8/11/24
to dea...@googlegroups.com
On 8/9/24 13:26, H wrote:
>
> Thank you so much for your help. If I switched back to M1 laptop, it has the
> same error but different reasons. I attached the error from my MacOS with this
> email.

Like I said, the ability to call DataOut::add_data_vector with an IndexSet has
been removed. You can probably make your program work by just not doing that
(specifically, by using a Vector object whose elements you set to zero or one
instead).

Best
W.

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


H

unread,
Aug 19, 2024, 8:48:53 AM8/19/24
to deal.II User Group
Hi W.

No problem at all. Thank you so much for your help!!!

Sincerely and Best Regards,
H

Reply all
Reply to author
Forward
0 new messages