4
编译器
提问帖
有回复
新人贴
dtk编译问题
2026-09-28 16:19:24
94
环境是: module load compiler/cmake/3.24.1 module load compiler/devtoolset/11.2.1 module load mpi/hpcx/2.13.1/gcc-11.2.1 module load compiler/rocm/dtk/25.04.3 ----------------------------------------------------------------------------------------------------------------------------------- 试过dtk-24.04.1至dtk25.04.3,和gcc/mpi-11.2.1,gcc/mpi-9.3.1的所有排列组合,都在编译hypre时遇到这个报错,请老师答疑解惑 Making lib ... In file included from csr\_spgemm\_device\_symbl.c:10: In file included from ./csr\_spgemm\_device.h:11: In file included from ./../utilities/\_hypre\_utilities.hpp:348: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/execution\_policy.h:33: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/cpp/execution\_policy.h:51: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/cpp/detail/merge.h:22: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/sequential/merge.h:78: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/sequential/merge.inl:21: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/copy.h:90: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/copy.inl:23: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/adl/copy.h:44: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/copy.h:81: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:40: /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/uninitialized\_copy.h:66:13: error: no matching 'operator new' function for non-allocating placement new expression; include ``` ::new(static\_cast(&out)) OutputType(in); ^\~ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:72:17: note: in instantiation of function template specialization 'thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>::operator()' requested here ``` f(offset + tile\_base + idx); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:109:48: note: in instantiation of function template specialization 'thrust::hip\_rocprim::\_\_parallel\_for::kernel<256U, thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long, 1U>' requested here ``` hipLaunchKernelGGL(HIP\_KERNEL\_NAME(kernel), ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:142:50: note: in instantiation of function template specialization 'thrust::hip\_rocprim::\_\_parallel\_for::parallel\_for \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long>' requested here ``` hipError\_t status = \_\_parallel\_for::parallel\_for(count, f, stream); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:136:12: note: in instantiation of member function 'thrust::hip\_rocprim::parallel\_for(execution\_policy> &, thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long)::workaround::par' requested here ``` struct workaround ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/uninitialized\_copy.h:81:18: note: in instantiation of function template specialization 'thrust::hip\_rocprim::parallel\_for, thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long>' requested here ``` hip\_rocprim::parallel\_for(policy, functor\_t(first, result), count); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:203:18: note: (skipping 13 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) ``` hip\_rocprim::uninitialized\_copy\_n(device\_s, first, num\_items, d\_in\_ptr.data()); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/find.h:167:25: note: in instantiation of function template specialization 'thrust::hip\_rocprim::find\_if\_n, char \*, long, thrust::identity>' requested here ``` return hip\_rocprim::find\_if\_n(policy, first, thrust::distance(first, last), predicate); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/find.inl:49:10: note: in instantiation of function template specialization 'thrust::hip\_rocprim::find\_if, char \*, thrust::identity>' requested here return find\_if(thrust::detail::derived\_cast(thrust::detail::strip\_const(exec)), first, last, pred); ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/logical.h:46:18: note: in instantiation of function template specialization 'thrust::find\_if, char \*, thrust::identity>' requested here return thrust::find\_if(exec, first, last, pred) != last; ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/logical.inl:43:10: note: in instantiation of function template specialization 'thrust::system::detail::generic::any\_of, char \*, thrust::identity>' requested here return any\_of(thrust::detail::derived\_cast(thrust::detail::strip\_const(exec)), first, last, pred); ``` ^ ``` csr\_spgemm\_device\_symbl.c:140:44: note: in instantiation of function template specialization 'thrust::any\_of, char \*, thrust::identity>' requested here \*rownnz\_exact\_ptr = !HYPRE\_THRUST\_CALL( any\_of, ``` ^ ``` In file included from csr\_spgemm\_device\_symbl.c:10: In file included from ./csr\_spgemm\_device.h:11: In file included from ./../utilities/\_hypre\_utilities.hpp:348: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/execution\_policy.h:33: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/cpp/execution\_policy.h:51: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/cpp/detail/merge.h:22: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/sequential/merge.h:78: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/sequential/merge.inl:21: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/copy.h:90: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/copy.inl:22: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/copy.h:57: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/copy.inl:23: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/transform.h:721: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/transform.inl:24: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/transform.h:104: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/transform.inl:21: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/for\_each.h:277: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/for\_each.inl:24: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/adl/for\_each.h:44: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/for\_each.h:35: /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:153:17: error: no matching function for call to object of type 'thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>' ``` f(idx); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:136:12: note: in instantiation of member function 'thrust::hip\_rocprim::parallel\_for(execution\_policy> &, thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long)::workaround::seq' requested here ``` struct workaround ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/uninitialized\_copy.h:81:18: note: in instantiation of function template specialization 'thrust::hip\_rocprim::parallel\_for, thrust::hip\_rocprim::\_\_uninitialized\_copy::functor \*, thrust::pointer, thrust::detail::execute\_with\_allocator>>, unsigned long>' requested here ``` hip\_rocprim::parallel\_for(policy, functor\_t(first, result), count); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:203:18: note: in instantiation of function template specialization 'thrust::hip\_rocprim::uninitialized\_copy\_n, thrust::tuple \*, unsigned long, thrust::pointer, thrust::detail::execute\_with\_allocator>>' requested here ``` hip\_rocprim::uninitialized\_copy\_n(device\_s, first, num\_items, d\_in\_ptr.data()); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:239:26: note: in instantiation of function template specialization 'thrust::hip\_rocprim::\_\_copy::cross\_system\_copy\_n\_dh\_nt, thrust::system::cpp::detail::tag, thrust::tuple \*, unsigned long, thrust::tuple \*>' requested here ``` result = cross\_system\_copy\_n\_dh\_nt(device\_s, host\_s, first, num\_items, result); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:231:12: note: in instantiation of member function 'thrust::hip\_rocprim::\_\_copy::cross\_system\_copy\_n(thrust::hip\_rocprim::execution\_policy> &, thrust::cpp::execution\_policy &, thrust::tuple \*, unsigned long, thrust::tuple \*, thrust::detail::false\_type)::workaround::par' requested here ``` struct workaround ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/internal/copy\_cross\_system.h:270:16: note: (skipping 10 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) ``` return cross\_system\_copy\_n( ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/find.h:167:25: note: in instantiation of function template specialization 'thrust::hip\_rocprim::find\_if\_n, char \*, long, thrust::identity>' requested here ``` return hip\_rocprim::find\_if\_n(policy, first, thrust::distance(first, last), predicate); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/find.inl:49:10: note: in instantiation of function template specialization 'thrust::hip\_rocprim::find\_if, char \*, thrust::identity>' requested here return find\_if(thrust::detail::derived\_cast(thrust::detail::strip\_const(exec)), first, last, pred); ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/detail/generic/logical.h:46:18: note: in instantiation of function template specialization 'thrust::find\_if, char \*, thrust::identity>' requested here return thrust::find\_if(exec, first, last, pred) != last; ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/logical.inl:43:10: note: in instantiation of function template specialization 'thrust::system::detail::generic::any\_of, char \*, thrust::identity>' requested here return any\_of(thrust::detail::derived\_cast(thrust::detail::strip\_const(exec)), first, last, pred); ``` ^ ``` csr\_spgemm\_device\_symbl.c:140:44: note: in instantiation of function template specialization 'thrust::any\_of, char \*, thrust::identity>' requested here \*rownnz\_exact\_ptr = !HYPRE\_THRUST\_CALL( any\_of, ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/uninitialized\_copy.h:61:41: note: candidate template ignored: substitution failure [with Size = unsigned long] ``` void THRUST\_HIP\_DEVICE\_FUNCTION operator()(Size idx) ^ ``` In file included from csr\_spgemm\_device\_symbl.c:10: In file included from ./csr\_spgemm\_device.h:11: In file included from ./../utilities/\_hypre\_utilities.hpp:348: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/execution\_policy.h:26: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/execute\_with\_allocator.h:25: In file included from /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/allocator/allocator\_traits.h:441: /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/allocator/allocator\_traits.inl:197:3: error: reference to \_\_host\_\_ function 'operator new' in \_\_host\_\_ \_\_device\_\_ function ::new(static\_cast(p)) T(); ^ /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/allocator/allocator\_traits.inl:409:35: note: called by 'construct>' return allocator\_traits\_detail::construct(a,p); ``` ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/allocator/default\_construct\_range.inl:47:34: note: called by 'operator()>' ``` allocator\_traits::construct(a, &x); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/detail/function.h:117:5: note: called by 'operator()>' ``` m\_f(thrust::raw\_reference\_cast(x)); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/for\_each.h:61:9: note: called by 'operator()' ``` op(raw\_reference\_cast(\*(input + static\_cast::difference\_type>(idx)))); ^ ``` /public/software/compiler/dtk/dtk-25.04.3/include/thrust/system/hip/detail/parallel\_for.h:72:17: note: called by 'kernel<256U, thrust::hip\_rocprim::for\_each\_f, thrust::detail::execute\_with\_allocator>, thrust::detail::wrapped\_function, thrust::detail::execute\_with\_allocator>>>, void>>, unsigned long, 1U>' ``` f(offset + tile\_base + idx); ^ ``` /public/software/compiler/devtoolset-11/root/usr/include/c++/11/new:174:33: note: 'operator new' declared here \_GLIBCXX\_NODISCARD inline void\* operator new(std::size\_t, void\* \_\_p) \_GLIBCXX\_USE\_NOEXCEPT ``` ^ ``` 3 errors generated when compiling for gfx906. gmake[5]: \*\*\* [../config/Makefile.config:66: csr\_spgemm\_device\_symbl.obj] Error 1 gmake[5]: \*\*\* Waiting for unfinished jobs....
全部评论(1)
只看楼主
L
liumg
1楼
需要贴一下具体的应用
10/8
没有更多内容了
--
楼主
Level.4
0 帖子
楼主热帖
暂无数据