On 9/28/24 02:08, wei zhang wrote:
*** Caution: EXTERNAL Sender ***

Dear Dealii_group,

I am currently learning Dealii and have successfully compiled dealii-9.6.0 using Visual Studio 2019 with the default settings, without encountering any issues.  However, after creating a blank C++ project in Visual Studio 2019 and copying the code from the step-1 tutorial into the project, I encountered the following errors during debugging:


Error C2995: “T desul::Impl::atomic_oper_fetch(const Oper &,T *const ,dont_deduce_this_parameter<const T>::type,MemoryOrder,MemoryScope)”: function template already defined step1 C:\dealii-9.6.0\deal.II\bundled\kokkos-3.7.00\tpls\desul\include\desul\atomics\Generic.hpp 326

Error C2995: “T desul::Impl::atomic_fetch_oper(const Oper &,T *const ,dont_deduce_this_parameter<const T>::type,MemoryOrder,MemoryScope)”: function template already defined step1 C:\dealii-9.6.0\deal.II\bundled\kokkos-3.7.00\tpls\desul\include\desul\atomics\Generic.hpp 247

Error C2572: “desul::Impl::atomic_oper_fetch”: redefinition of default argument: parameter 5 step1 C:\dealii-9.6.0\deal.II\bundled\kokkos-3.7.00\tpls\desul\include\desul\atomics\Generic.hpp 319

Error C2572: “desul::Impl::atomic_fetch_oper”: redefinition of default argument: parameter 5 step1 C:\dealii-9.6.0\deal.II\bundled\kokkos-3.7.00\tpls\desul\include\desul\atomics\Generic.hpp 240 Despite multiple attempts, I have not been able to resolve the issue. Could you please advise me on how to fix this?

Wei:
I'm not particularly familiar with Visual Studio, but have a couple of suggestions:

* As a general rule, setting up deal.II projects "a blank C++ project in Visual Studio 2019 and copying the code from the step-1 tutorial into the project" is likely not going to work. You need to also copy the CMakeLists.txt into it, and let cmake do its magic to properly set up compiler flags and all sorts of other things. Is that what you did? If you really started with a blank project, can you compile step-1 in its original directory, using cmake to set up the project?

* Do you happen to have access to a newer version of Visual Studio? 2019 is a good while ago, newer compilers might have this fixed.

* You say that you "encountered the following errors during debugging". Do you mean during "compiling"? Or which part of the build process is producing this error? Perhaps during linking?

Best
 W.
--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f11f36d1-9772-4d04-9099-e355861ad4e7%40colostate.edu.

Reply via email to