LLNL / axom

CS infrastructure components for HPC applications
BSD 3-Clause "New" or "Revised" License
157 stars 27 forks source link

amdclang build failure #1039

Open adayton1 opened 1 year ago

adayton1 commented 1 year ago

Build command:

cd axom/build-toss4_mi250x_cray_rocm-relwithdebinfo/axom/multimat && /usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.21-rocmcc-5.4.3/bin/mpiamdclang++ -DCAMP_HAVE_HIP -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 -Iaxom/build-toss4_mi250x_cray_rocm-relwithdebinfo/include -Iinstall/camp/include -Iinstall/umpire/include -Iinstall/raja/include -Iaxom/src/axom/core/../.. -isystem /axom/src/thirdparty -isystem /usr/tce/packages/rocmcc/rocmcc-5.4.3-magic/include -ffp-model=strict -fbracket-depth=512 -g -O3 -fdebug-default-version=4 -fPIC -std=c++17 -MD -MT axom/multimat/CMakeFiles/multimat.dir/multimat.cpp.o -MF CMakeFiles/multimat.dir/multimat.cpp.o.d -o CMakeFiles/multimat.dir/multimat.cpp.o -c axom/src/axom/multimat/multimat.cpp

Error message:

RAJA/policy/hip/MemUtils_HIP.hpp:263:5: error: unknown type name 'hip_dim_t'
    hip_dim_t blockDim,
    ^
In file included from axom/src/axom/multimat/multimat.cpp:12:
In file included from axom/src/axom/core/../../axom/multimat/multimat.hpp:15:
In file included from axom/build-toss4_mi250x_cray_rocm-relwithdebinfo/include/axom/slam.hpp:12:
In file included from axom/src/axom/core/../../axom/slam/Utilities.hpp:13:
In file included from axom/build-toss4_mi250x_cray_rocm-relwithdebinfo/include/axom/core.hpp:33:
In file included from axom/src/axom/core/../../axom/core/Array.hpp:13:
In file included from axom/src/axom/core/../../axom/core/ArrayBase.hpp:16:
In file included from axom/src/axom/core/../../axom/core/execution/for_all.hpp:10:
In file included from axom/src/axom/core/../../axom/core/execution/execution_space.hpp:94:
In file included from axom/src/axom/core/../../axom/core/execution/internal/seq_exec.hpp:14:
In file included from RAJA/RAJA.hpp:44:
In file included from RAJA/pattern/forall.hpp:76:
In file included from RAJA/policy/sequential/forall.hpp:38:
In file included from RAJA/pattern/params/forall.hpp:10:
In file included from RAJA/policy/hip/params/reduce.hpp:8:
In file included from RAJA/policy/hip/reduce.hpp:43:
adayton1 commented 1 year ago

@robinson96 found a workaround where we add blt::hip as a dependency to multimat, sidre, and slam. We are still using hipcc, with support for that added to BLT, so I'm not sure if this is a general issue or just related to our particular environment.

kennyweiss commented 1 year ago

Reformatting the build line to make it easier to read:

cd axom/build-toss4_mi250x_cray_rocm-relwithdebinfo/axom/multimat && 
/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.21-rocmcc-5.4.3/bin/mpiamdclang++ \
    -DCAMP_HAVE_HIP \
    -D__HIP_PLATFORM_AMD__=1 \
    -D__HIP_PLATFORM_HCC__=1 \
    -Iaxom/build-toss4_mi250x_cray_rocm-relwithdebinfo/include \
    -Iinstall/camp/include \
    -Iinstall/umpire/include \
    -Iinstall/raja/include \
    -Iaxom/src/axom/core/../.. \
    -isystem /axom/src/thirdparty \
    -isystem /usr/tce/packages/rocmcc/rocmcc-5.4.3-magic/include \
    -ffp-model=strict -fbracket-depth=512 -g -O3 -fdebug-default-version=4 -fPIC -std=c++17 \
    -MD -MT \
    axom/multimat/CMakeFiles/multimat.dir/multimat.cpp.o \
    -MF \
    CMakeFiles/multimat.dir/multimat.cpp.o.d \
    -o CMakeFiles/multimat.dir/multimat.cpp.o \
    -c axom/src/axom/multimat/multimat.cpp
kennyweiss commented 1 year ago

Happy to hear you have a solution @adayton1 and @robinson96

We've had to explicitly add some extra cuda target dependencies to our components, so it doesn't seem completely unexpected to need additional blt::hip dependencies.

I suspect it's related to our usage of object libraries within our components. @white238 is hoping to refactor this in the near future.