AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
518 stars 339 forks source link

Cannot override `amdgpu-function-calls` in downstream codes #3819

Closed psharda closed 1 month ago

psharda commented 5 months ago

When amrex is compiled as a submodule in quokka, and quokka is compiled for AMD GPUs, this line sets amdgpu-function-calls=false which does not seem to be overridden even if we set it to true in quokka CMakeLists:

https://github.com/psharda/amrex/blob/a5720c951e81e78097b9b00aeb1aac2c3b4366a6/Tools/CMake/AMReXParallelBackends.cmake#L271

How can a downstream code like quokka change the value of amdgpu-function-calls without having to go into amrex CMake files and manually setting it to true? This is needed to compile problems in quokka that use chemistry (microphysics).

This is related to https://github.com/quokka-astro/quokka/issues/569

ax3l commented 5 months ago

Ideas:

BenWibking commented 4 months ago

Ideas:

  • We could make this flag PRIVATE instead of PUBLIC to keep it contained inside AMReX.
  • We can add an option to enable/disable this work-around. Is it even still needed?

I think making it PRIVATE would solve our issue.

When compiling our reaction network, we still need this.

asalmgren commented 1 month ago

Closing this issue due to lack of activity. Please re-open it if there is still a problem.