Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMReX Build Errors Windows Visual Studio 2022 (CUDA Enabled) - With Latest Development branch Pull #3972

Open
ramsampath opened this issue Jun 3, 2024 · 6 comments · May be fixed by #4309

Comments

@ramsampath
Copy link

Hello,

I was wondering if someone could help out with the following errors during build using Visual Studio 2022 (With CUDA Enabled).

Error: static assertion failed with "PackComponents is expected to satisfy the concept DataPacking." amrex_3d on amrex\Src\Base\AMReX_NonLocalBC.H 605
Error static assertion failed with "ApplyDtosAndProjectionOnReciever<> is expected to satisfy the DataPacking concept." amrex_3d amrex\Src\Base\AMReX_NonLocalBC.H 666
....

and

Error C2244 'amrex::FabArray::array': unable to match function definition to an existing declaration amrex_3d
amrex\Src\Base\AMReX_FabArray.H 1552

Error C2244 'amrex::FabArray::const_array': unable to match function definition to an existing declaration amrex_3d
amrex\Src\Base\AMReX_FabArray.H 1584

...

there are many errors but with a similar error code.

Would be great if someone could give some pointers on how to fix these.

Thank you much.

Ram.

@WeiqunZhang
Copy link
Member

Unfortunately we don't have windows machines for testing. There is a PR trying to set up a GitHub Action for Windows + CUDA. But it still has some issues. It seems to have a different issue than what you have. @ramsampath maybe you can offer some help on #1585.

@ramsampath
Copy link
Author

Thank you Weiqun . I will try to figure this error and if this works can then try to help out with #1585

@asalmgren
Copy link
Member

@ramsampath - Closing this due to inactivity -- let us know if you still have questions!

@ruohai0925
Copy link
Contributor

ruohai0925 commented Jan 21, 2025

Same as @ramsampath's finding, I also tested CUDA 11.2 + Visual Studio 2019 on Windows 10 for running a gmres case on gpus. Here are errors:

C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_NonLocalBC.H(605): error : static assertion failed with "PackComponents is expected to satisfy the concept DataPacking." [C:\Users\yzeng\Codes\
       prepost\build\release_3d_gnu_single_cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_NonLocalBC.H(666): error : static assertion failed with "ApplyDtosAndProjectionOnReciever<> is expected to satisfy the DataPacking concept." [C
       :\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_NonLocalBC.H(605): error : static assertion failed with "PackComponents is expected to satisfy the concept DataPacking." [C:\Users\yzeng\Codes\
       prepost\build\release_3d_gnu_single_cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_NonLocalBC.H(666): error : static assertion failed with "ApplyDtosAndProjectionOnReciever<> is expected to satisfy the DataPacking concept." [C
       :\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

@WeiqunZhang Any further updates for this issue?

@ruohai0925
Copy link
Contributor

ruohai0925 commented Jan 21, 2025

And also another two compilation errors.

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base/AMReX_MultiFab.cpp(631): error : calling a __host__ function("isfinite<float> ") from a __device__ function("amrex::MultiFab::is_finite(int, int, con
       st  ::amrex::IntVectND<(int)3>  &, bool) const::[lambda(int, int, int, int, int) (instance 1)]::operator () const") is not allowed [C:\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_cuda86_theav
       2\amrex\Src\amrex_3d.vcxproj]

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base/AMReX_MultiFab.cpp(631): error : identifier "isfinite<float> " is undefined in device code [C:\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_
       cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

and

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_Reduce.H(356): error : calling a __host__ function("isfinite<float> ") from a __device__ function("amrex::Reduce::detail::mf_call_f< ::amrex::R
       educe::detail::iterate_box_comp,  ::amrex::MultiFab::is_finite(int, int, const  ::amrex::IntVectND<(int)3>  &, bool) const   ::[lambda(int, int, int, int, int) (instance 1)],  ::amrex::GpuTuple<bool >
       ,  ::amrex::ReduceOpLogicalOr , (int)0> ") is not allowed [C:\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_cuda86_theav2\amrex\Src\amrex_3d.vcxproj]

     3>C:/Users/yzeng/Codes/prepost/submods/amrex/Src/Base\AMReX_Reduce.H(356): error : identifier "isfinite<float> " is undefined in device code [C:\Users\yzeng\Codes\prepost\build\release_3d_gnu_single_cuda
       86_theav2\amrex\Src\amrex_3d.vcxproj]

@asalmgren asalmgren reopened this Jan 21, 2025
@WeiqunZhang WeiqunZhang linked a pull request Jan 23, 2025 that will close this issue
@WeiqunZhang
Copy link
Member

I have implemented a number of workarounds in #4309. If there are still issues, let us know. Otherwise the merge of that PR will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants