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

Tpetra: ImportExport unit test fails to compiler with HIP unified memory #13460

Open
jjellio opened this issue Sep 19, 2024 · 0 comments
Open
Labels
pkg: Tpetra type: bug The primary issue is a bug in Trilinos code or tests

Comments

@jjellio
Copy link
Contributor

jjellio commented Sep 19, 2024

Bug Report

@csiefer2

Description

If I enable -DKokkos_ENABLE_IMPL_HIP_UNIFIED_MEMORY=ON in my AMD HIP build (all unit tests), this tpetra test is failing to compile.

packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp
[3122/9612] Building CXX object packages/tpetra/core/test/Import...raCore_ImportExport2_UnitTests.dir/ImportExport2_UnitTests.cpp.o
FAILED: packages/tpetra/core/test/ImportExport2/CMakeFiles/TpetraCore_ImportExport2_UnitTests.dir/ImportExport2_UnitTests.cpp.o 
/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/build_stat_cxx_wrapper.sh -DKOKKOS_DEPENDENCE -DUSE_PROF_API=1 -D__HIP_PLATFORM_AMD__=1 -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/ext -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/tpetra/core/ext -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/kokkos_refactor -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/tpetra/core/src -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/compat -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/tpetra/core/compat -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/teuchos/core/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/core/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/core/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/../../tpls/desul/include -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/../../tpls/mdspan/include -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/containers/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/containers/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/algorithms/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/algorithms/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/simd/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos/simd/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/parser/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/parameterlist/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/teuchos/parameterlist/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/comm/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/numerics/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/remainder/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/teuchos/remainder/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/teuchos/kokkoscompat/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/kokkoscompat/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/teuchos/kokkoscomm/src -I/g/g20/jjellio/src/github/Trilinos/packages/teuchos/kokkoscomm/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/batched -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/blas -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/blas -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/lapack -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/lapack -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/graph -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/graph -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/ode -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/common/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/common/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/common/unit_test -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/batched/eti -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/dense/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/dense/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/dense/unit_test -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/sparse/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/sparse/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/batched/sparse/unit_test -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/blas/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/blas/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/blas/eti -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/blas/eti -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/blas/tpls -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/lapack/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/lapack/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/lapack/eti -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/lapack/eti -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/lapack/tpls -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/graph/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/graph/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/graph/eti -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/graph/eti -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/sparse/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/sparse/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/sparse/eti -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos-kernels/sparse/eti -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/sparse/tpls -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/ode/src -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/ode/impl -I/g/g20/jjellio/src/github/Trilinos/packages/kokkos-kernels/ode/unit_test -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/tsqr/src -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/tpetra/tsqr/src -I/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/inout -I/tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/tpetra/core/inout -isystem /usr/workspace/trilinos-dev/spack/install-v4/linux-rhel8-zen4/rocmcc-6.2.1/boost-1.84.0-engxvz2vx45hqb4rsyjljimrl7g67anv/include -isystem /usr/workspace/trilinos-dev/spack/install-v4/linux-rhel8-zen4/rocmcc-6.2.1/openblas-0.3.26-lhhtzeb7nprjbid64u4qk5owwjr5thj7/include -isystem /usr/workspace/trilinos-dev/spack/install-v4/linux-rhel8-zen4/rocmcc-6.2.1/metis-5.1.0-wxfxj467u5jd45orro5bxnk2hnqcatz6/include -x hip -mllvm -amdgpu-early-inline-all=false -mllvm -amdgpu-function-calls=false -g -O3 -DNDEBUG -std=c++17 -march=znver3 -mtune=znver3 -fno-gpu-rdc -xhip --rocm-path=/usr/tce/packages/rocbeta/rocm-6.2.1beta2 --offload-arch=gfx942 -MD -MT packages/tpetra/core/test/ImportExport2/CMakeFiles/TpetraCore_ImportExport2_UnitTests.dir/ImportExport2_UnitTests.cpp.o -MF packages/tpetra/core/test/ImportExport2/CMakeFiles/TpetraCore_ImportExport2_UnitTests.dir/ImportExport2_UnitTests.cpp.o.d -o packages/tpetra/core/test/ImportExport2/CMakeFiles/TpetraCore_ImportExport2_UnitTests.dir/ImportExport2_UnitTests.cpp.o -c /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp
In file included from <built-in>:1:
In file included from /collab/usr/global/tools/tce4/packages/rocm/rocm-6.2.1beta2/lib/llvm/lib/clang/18/include/__clang_hip_runtime_wrapper.h:145:
In file included from /collab/usr/global/tools/tce4/packages/rocm/rocm-6.2.1beta2/lib/llvm/lib/clang/18/include/cuda_wrappers/algorithm:55:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/algorithm:61:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:61:
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: warning: 'get_temporary_buffer<long>' is deprecated [-Wdeprecated-declarations]
  263 |                 std::get_temporary_buffer<value_type>(_M_original_len));
      |                      ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:4996:15: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<long *, std::vector<long>>, long>::_Temporary_buffer' requested here
 4996 |       _TmpBuf __buf(__first, (__last - __first + 1) / 2);
      |               ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algo.h:5070:23: note: in instantiation of function template specialization 'std::__stable_sort<__gnu_cxx::__normal_iterator<long *, std::vector<long>>, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:463:9)>>' requested here
 5070 |       _GLIBCXX_STD_A::__stable_sort(__first, __last,
      |                       ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:462:10: note: in instantiation of function template specialization 'std::stable_sort<__gnu_cxx::__normal_iterator<long *, std::vector<long>>, (lambda at /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:463:9)>' requested here
  462 |     std::stable_sort(idx.begin(), idx.end(),
      |          ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:509:20: note: in instantiation of function template specialization 'Tpetra::SortDetails::sort_indexes<int *>' requested here
  509 |     auto indices = sort_indexes(first1, last1);
      |                    ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:566:20: note: in instantiation of function template specialization 'Tpetra::SortDetails::std_sort2<int *, double *>' requested here
  566 |       SortDetails::std_sort2(first1, last1, first2, first2+(last1-first1));
      |                    ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Util.hpp:602:5: note: in instantiation of function template specialization 'Tpetra::sort2<int *, double *>' requested here
  602 |     sort2(view1_rcp.begin(),view1_rcp.end(),view2_rcp.begin());    
      |     ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp:536:17: note: in instantiation of function template specialization 'Tpetra::sort2<Kokkos::View<int *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<double *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>>' requested here
  536 |         Tpetra::sort2 (tgtRowInds, tgtRowInds.extent(0), tgtRowVals);
      |                 ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_tempbuf.h:99:5: note: 'get_temporary_buffer<long>' has been explicitly marked deprecated here
   99 |     _GLIBCXX17_DEPRECATED
      |     ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux/bits/c++config.h:2359:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
 2359 | # define _GLIBCXX17_DEPRECATED [[__deprecated__]]
      |                                  ^
In file included from /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp:12:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/Tpetra_TestingUtilities.hpp:22:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/teuchos/kokkoscompat/src/KokkosCompat_View.hpp:29:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_Core.hpp:45:
In file included from /tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/KokkosCore_Config_DeclareBackend.hpp:22:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/decl/Kokkos_Declare_SERIAL.hpp:21:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Serial/Kokkos_Serial.hpp:284:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Serial/Kokkos_Serial_Parallel_Range.hpp:20:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_Parallel.hpp:31:
/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_View.hpp:1331:19: error: static assertion failed due to requirement 'ViewMapping<Kokkos::ViewTraits<char *, Kokkos::HostSpace>, Kokkos::ViewTraits<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::MemoryTraits<0>>, void>::is_assignable': Incompatible View copy construction
 1331 |     static_assert(Mapping::is_assignable,
      |                   ^~~~~~~~~~~~~~~~~~~~~~
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Details_DistributorActor.hpp:1158:13: note: in instantiation of function template specialization 'Kokkos::View<char *, Kokkos::HostSpace>::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::MemoryTraits<0>>' requested here
 1158 |             subview_offset(sendArray, size_t(0), numPacketsTo_p);
      |             ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Details_DistributorActor.hpp:146:3: note: in instantiation of function template specialization 'Tpetra::Details::DistributorActor::doPosts<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
  146 |   doPosts(plan, exports, numExportPacketsPerLID, imports, numImportPacketsPerLID);
      |   ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Distributor.hpp:640:12: note: in instantiation of function template specialization 'Tpetra::Details::DistributorActor::doPostsAndWaits<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
  640 |     actor_.doPostsAndWaits(plan_, exports, numExportPacketsPerLID, imports, numImportPacketsPerLID);
      |            ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp:2360:12: note: in instantiation of function template specialization 'Tpetra::Distributor::doPostsAndWaits<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
 2360 |     distor.doPostsAndWaits(exports.view_host(),numExportPackets(),importsView,numImportPackets());
      |            ^
In file included from /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp:12:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/Tpetra_TestingUtilities.hpp:22:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/teuchos/kokkoscompat/src/KokkosCompat_View.hpp:29:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_Core.hpp:45:
In file included from /tmp/jjellio/build/amd-6.2.0_prgenv-amd_rocm-6.2.1beta2_mpich-8.1.30_pure-amd_hip_amd-NOinlall-NOfunc-gfx942_serial_atdm_complex_devtpls_opt-g_cxx17/trilinos/packages/kokkos/KokkosCore_Config_DeclareBackend.hpp:22:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/decl/Kokkos_Declare_SERIAL.hpp:21:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Serial/Kokkos_Serial.hpp:284:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Serial/Kokkos_Serial_Parallel_Range.hpp:20:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_Parallel.hpp:31:
In file included from /g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_View.hpp:555:
/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:2967:19: error: static assertion failed due to requirement 'is_assignable_space': View assignment must have compatible spaces
 2967 |     static_assert(is_assignable_space,
      |                   ^~~~~~~~~~~~~~~~~~~
/g/g20/jjellio/src/github/Trilinos/packages/kokkos/core/src/Kokkos_View.hpp:1333:14: note: in instantiation of member function 'Kokkos::Impl::ViewMapping<Kokkos::ViewTraits<char *, Kokkos::HostSpace>, Kokkos::ViewTraits<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::MemoryTraits<0>>, void>::assign' requested here
 1333 |     Mapping::assign(m_map, rhs.m_map, rhs.m_track.m_tracker);
      |              ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Details_DistributorActor.hpp:1158:13: note: in instantiation of function template specialization 'Kokkos::View<char *, Kokkos::HostSpace>::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::MemoryTraits<0>>' requested here
 1158 |             subview_offset(sendArray, size_t(0), numPacketsTo_p);
      |             ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Details_DistributorActor.hpp:146:3: note: in instantiation of function template specialization 'Tpetra::Details::DistributorActor::doPosts<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
  146 |   doPosts(plan, exports, numExportPacketsPerLID, imports, numImportPacketsPerLID);
      |   ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/src/Tpetra_Distributor.hpp:640:12: note: in instantiation of function template specialization 'Tpetra::Details::DistributorActor::doPostsAndWaits<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
  640 |     actor_.doPostsAndWaits(plan_, exports, numExportPacketsPerLID, imports, numImportPacketsPerLID);
      |            ^
/g/g20/jjellio/src/github/Trilinos/packages/tpetra/core/test/ImportExport2/ImportExport2_UnitTests.cpp:2360:12: note: in instantiation of function template specialization 'Tpetra::Distributor::doPostsAndWaits<Kokkos::View<char *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HIPSpace>, Kokkos::Experimental::EmptyViewHooks>, Kokkos::View<char *, Kokkos::HostSpace>>' requested here
 2360 |     distor.doPostsAndWaits(exports.view_host(),numExportPackets(),importsView,numImportPackets());
      |            ^
1 warning and 2 errors generated when compiling for gfx942.

Steps to Reproduce

  1. Use the AMD configure stuff on Tioga.
  2. Add the Unified memory cmake variable
  3. build this unit test
@jjellio jjellio added the type: bug The primary issue is a bug in Trilinos code or tests label Sep 19, 2024
@jjellio jjellio changed the title Tpetra: General Summary of the Bug Tpetra: ImportExport unit test fails to compiler with HIP unified memory Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Tpetra type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

2 participants