AMReX-Astro / Microphysics

common astrophysical microphysics routines with interfaces for the different AMReX codes
https://amrex-astro.github.io/Microphysics
Other
35 stars 35 forks source link

Can't Compile tabular rates with CUDA #952

Closed biboyd closed 2 years ago

biboyd commented 2 years ago

Errors are raised when trying to compile tabulated rates (like with the urca problem) with CUDA.

Reproduce:

Compile the unit_test/test_react problem with make -j USE_CUDA=TRUE NETWORK_DIR=ignition_reaclib/URCA-simple

Result:

../../networks/ignition_reaclib/URCA-simple/table_rates_data.cpp(11): error: dynamic initialization is not supported for a __managed__ variable

../../networks/ignition_reaclib/URCA-simple/table_rates_data.cpp(16): error: dynamic initialization is not supported for a __managed__ variable
zingale commented 2 years ago

the issue is the std::string in table_t.

The solution here is to not include the filename in table_t and instead have pynucastro pass it to the init function as needed.