Closed balos1 closed 1 year ago
Note that there are two other posts in #45 related to this. I copy them below.
Here's the contents of the file Backtrace.0
mentioned in the error message above:
=== If no file names and line numbers are shown below, one can run
addr2line -Cpfie my_exefile my_line_address
to convert `my_line_address` (e.g., 0x4a6b) into file name and line number.
Or one can use amrex/Tools/Backtrace/parse_bt.py.
=== Please note that the line number reported by addr2line may not be accurate.
One can use
readelf -wl my_exefile | grep my_line_address'
to find out the offset for that line.
0: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x314b19]
amrex::BLBackTrace::print_backtrace_info(_IO_FILE*) at ??:?
1: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x314707]
amrex::BLBackTrace::handler(int) at ??:?
2: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x2902cf]
amrex::Gpu::ErrorCheck(char const*, int) at ??:?
3: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x2cf532]
amrex::InitRandom(unsigned long, int, unsigned long) at ??:?
4: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x29b7ed]
amrex::Initialize(int&, char**&, bool, int, std::function<void ()> const&, std::ostream&, std::ostream&, void (*)(char const*)) at ??:?
5: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x288efe]
main at ??:?
6: /lib64/libc.so.6(__libc_start_main+0xe5) [0x15553f6d3d85]
7: /dev/shm/dobrev1/xsdk-examples/build/amrex/sundials/amrex_sundials_advection_diffusion() [0x286ade]
_start at ??:?
I also tried a build of xsdk+rocm
with (the default) ^hypre~rocm
and I see the same issue.
Possible solution: https://github.com/xsdk-project/xsdk-examples/pull/52#issuecomment-1568880672
Here's the suggestion:
This should fix the issue.
diff --git a/cmake/FindAMReX.cmake b/cmake/FindAMReX.cmake
index de4b328..91e7979 100644
--- a/cmake/FindAMReX.cmake
+++ b/cmake/FindAMReX.cmake
@@ -7,7 +7,7 @@ if(NOT TARGET XSDK::AMReX)
target_link_libraries(XSDK_AMREX INTERFACE AMReX::amrex)
if(ENABLE_HIP)
target_link_libraries(XSDK_AMREX INTERFACE hip::amdhip64)
- target_link_options(XSDK_AMREX INTERFACE "-fgpu-rdc")
+ target_link_options(XSDK_AMREX INTERFACE "SHELL:-Xoffload-linker --whole-archive" "-fgpu-rdc")
endif()
add_library(XSDK::AMReX ALIAS XSDK_AMREX)
endif()
Originally posted by @v-dobrev in https://github.com/xsdk-project/xsdk-examples/issues/45#issuecomment-1546523242
When trying to run this example with HIP enabled I get the following error from
ctest -V
:Does anyone have any suggestions?
The Spack spec for AMReX is:
Note that
hypre
is built with+rocm
-- could that be a problem?