unknown DEAL_II_HOST_DEVICE

107 views
Skip to first unread message

H

unread,
Jul 28, 2024, 7:02:35 PM7/28/24
to deal.II User Group
Hi Everyone,

I am new to the dealii. I use Mac M1 and installed dealii from candi. I tried to run step-64 example and having an error of Unknown type name 'DEAL_II_HOST_DEVICE'. 

May I ask why would this error show up?

Sincerely,
H
Screenshot 2024-07-28 at 17.51.10.png

Daniel Arndt

unread,
Jul 28, 2024, 10:16:53 PM7/28/24
to dea...@googlegroups.com
Are you sure that you are using the same deal.II version for the
examples as you installed? That macro should be defined in
deal.II/base/numbers.h.

Best,
Daniel
> --
> 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/6220756f-732a-4a71-a74a-e941b2207813n%40googlegroups.com.

H

unread,
Aug 2, 2024, 9:59:36 AM8/2/24
to deal.II User Group
Hi Daniel,

I am sorry for the late response. Thank you so much for your help! 

Yes, I am sure it is the same version. I tried VScode and this error disappeared for few days, and today I tried again and it re-appeared. 

Now it has 

1) mpi.h{Ln140, Col 27]: unknown type name 'MPI_Comm'
2) exceptions.h[Ln 1743, Col 12]: unknown type name 'DEAL_II_HOST_DEVICE'
3) all the errors in mpi.h in deal.II/base/mpi.h, identifier :MPI_Comm", "MPI_Request', "MPI_Group" "MPI_Datatype" .... undefined. 

I am not sure if these are related with deal.II or VScode. 

Sincere thanks and Best regards,
H

Wolfgang Bangerth

unread,
Aug 2, 2024, 10:15:15 AM8/2/24
to dea...@googlegroups.com
On 8/1/24 18:29, H wrote:
>
> Now it has
>
> 1) mpi.h{Ln140, Col 27]: unknown type name 'MPI_Comm'
> 2) exceptions.h[Ln 1743, Col 12]: unknown type name 'DEAL_II_HOST_DEVICE'
> 3) all the errors in mpi.h in deal.II/base/mpi.h, identifier :MPI_Comm",
> "MPI_Request', "MPI_Group" "MPI_Datatype" .... undefined.

This looks to me like you are compiling a file by setting up the compiler by
hand. Are you using the deal.II-provided cmake scripts?

Best
W.

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


H

unread,
Aug 2, 2024, 3:12:28 PM8/2/24
to deal.II User Group
Hi,

Thank you so much for your reply.

No, I am not using the deal.II provided cmake scripts. Where can I find them?

Sincerely,
H

Wolfgang Bangerth

unread,
Aug 4, 2024, 10:52:10 PM8/4/24
to dea...@googlegroups.com
On 8/2/24 12:59, H wrote:
>
> Thank you so much for your reply.
>
> No, I am not using the deal.II provided cmake scripts. Where can I find them?

Your installation should contain all of the tutorial programs. In each
tutorial program directory, there is a CMakeLists.txt file that sets
everything up for you. There is a lot of work happening behind the scenes of
these files that ensure your compile knows where to find what files, how to
drive the compiler, etc. It is not easy at all to set up compiling a
deal.II-based program without using these cmake scripts.

H

unread,
Aug 5, 2024, 7:57:18 AM8/5/24
to deal.II User Group
Hi W.

Sure! Thank you so much for your help!! 

Sincerely,
H
Reply all
Reply to author
Forward
0 new messages