如微信沟通,建议先尝试不用openmp编译,暂时没有其它更好的解决方法。
DTK 22.10 及以前 版本的 thrust 库 对 OpenMP 的支持还有些问题。 我们要移植的程序在代码完成移植后,卡在编译 thrust 与 OpenMP 的混合编译这一步了。
[ghfund2_a27@login07 codes]$ grep -n -R "error:" -B2 -A5 a00.log
4997-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/uninitialized_fill.inl:28:
4998-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/uninitialized_fill.h:44:
4999:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/uninitialized_fill.h:63:13: error: no matching 'operator new' function for non-allocating placement new expression; include <new>
5000- ::new(static_cast<void*>(&out)) value_type(value);
5001- ^~
5002-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:72:17: note: in instantiation of function template specialization 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<double>>, thrust::complex<double>>::operator()<unsigned long>' requested here
5003- f(offset + tile_base + idx);
5004- ^
--
5103-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/for_each.h:44:
5104-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/for_each.h:35:
5105:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:157:17: error: no matching function for call to object of type 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<double>>, thrust::complex<double>>'
5106- f(idx);
5107- ^
5108-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:135:12: note: in instantiation of member function 'thrust::hip_rocprim::parallel_for(execution_policy<thrust::hip_rocprim::tag> &, thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<double>>, thrust::complex<double>>, unsigned long)::workaround::seq' requested here
5109- struct workaround
5110- ^
--
5184- void THRUST_HIP_DEVICE_FUNCTION operator()(Size idx)
5185- ^
5186:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/uninitialized_fill.h:63:13: error: no matching 'operator new' function for non-allocating placement new expression; include <new>
5187- ::new(static_cast<void*>(&out)) value_type(value);
5188- ^~
5189-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:72:17: note: in instantiation of function template specialization 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<double>, double>::operator()<unsigned long>' requested here
5190- f(offset + tile_base + idx);
5191- ^
--
5290-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/for_each.h:44:
5291-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/for_each.h:35:
5292:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:157:17: error: no matching function for call to object of type 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<double>, double>'
5293- f(idx);
5294- ^
5295-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:135:12: note: in instantiation of member function 'thrust::hip_rocprim::parallel_for(execution_policy<thrust::hip_rocprim::tag> &, thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<double>, double>, unsigned long)::workaround::seq' requested here
5296- struct workaround
5297- ^
--
5371- void THRUST_HIP_DEVICE_FUNCTION operator()(Size idx)
5372- ^
5373:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/uninitialized_fill.h:63:13: error: no matching 'operator new' function for non-allocating placement new expression; include <new>
5374- ::new(static_cast<void*>(&out)) value_type(value);
5375- ^~
5376-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:72:17: note: in instantiation of function template specialization 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<unsigned long>, unsigned long>::operator()<unsigned long>' requested here
5377- f(offset + tile_base + idx);
5378- ^
--
5477-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/for_each.h:44:
5478-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/for_each.h:35:
5479:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:157:17: error: no matching function for call to object of type 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<unsigned long>, unsigned long>'
5480- f(idx);
5481- ^
5482-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:135:12: note: in instantiation of member function 'thrust::hip_rocprim::parallel_for(execution_policy<thrust::hip_rocprim::tag> &, thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<unsigned long>, unsigned long>, unsigned long)::workaround::seq' requested here
5483- struct workaround
5484- ^
--
5577-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce.inl:20:
5578-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/default_decomposition.h:43:
5579:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/default_decomposition.inl:41:3: error: static_assert failed due to requirement 'thrust::detail::depend_on_instantiation<long, false>::value' "OpenMP compiler support is not enabled"
5580- THRUST_STATIC_ASSERT_MSG(
5581- ^~~~~~~~~~~~~~~~~~~~~~~~~
5582-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/static_assert.h:50:44: note: expanded from macro 'THRUST_STATIC_ASSERT_MSG'
5583-# define THRUST_STATIC_ASSERT_MSG(B, msg) static_assert(B, msg)
5584- ^ ~
--
5644-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce.inl:21:
5645-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.h:51:
5646:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.inl:48:3: error: static_assert failed due to requirement 'thrust::detail::depend_on_instantiation<thrust::transform_iterator<thrust::detail::zipped_binary_op<double, thrust::multiplies<double>>, thrust::zip_iterator<thrust::tuple<double *, double *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, double, thrust::use_default>, false>::value' "OpenMP compiler support is not enabled"
5647- THRUST_STATIC_ASSERT_MSG(
5648- ^~~~~~~~~~~~~~~~~~~~~~~~~
5649-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/static_assert.h:50:44: note: expanded from macro 'THRUST_STATIC_ASSERT_MSG'
5650-# define THRUST_STATIC_ASSERT_MSG(B, msg) static_assert(B, msg)
5651- ^ ~
--
5711-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce.inl:21:
5712-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.h:51:
5713:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.inl:48:3: error: static_assert failed due to requirement 'thrust::detail::depend_on_instantiation<thrust::detail::normal_iterator<thrust::pointer<double, thrust::system::omp::detail::par_t, thrust::use_default, thrust::use_default>>, false>::value' "OpenMP compiler support is not enabled"
5714- THRUST_STATIC_ASSERT_MSG(
5715- ^~~~~~~~~~~~~~~~~~~~~~~~~
5716-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/static_assert.h:50:44: note: expanded from macro 'THRUST_STATIC_ASSERT_MSG'
5717-# define THRUST_STATIC_ASSERT_MSG(B, msg) static_assert(B, msg)
5718- ^ ~
--
6488-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/uninitialized_fill.inl:28:
6489-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/uninitialized_fill.h:44:
6490:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/uninitialized_fill.h:63:13: error: no matching 'operator new' function for non-allocating placement new expression; include <new>
6491- ::new(static_cast<void*>(&out)) value_type(value);
6492- ^~
6493-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:72:17: note: in instantiation of function template specialization 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<float>>, thrust::complex<float>>::operator()<unsigned long>' requested here
6494- f(offset + tile_base + idx);
6495- ^
--
6594-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/adl/for_each.h:44:
6595-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/for_each.h:35:
6596:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:157:17: error: no matching function for call to object of type 'thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<float>>, thrust::complex<float>>'
6597- f(idx);
6598- ^
6599-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/parallel_for.h:135:12: note: in instantiation of member function 'thrust::hip_rocprim::parallel_for(execution_policy<thrust::hip_rocprim::tag> &, thrust::hip_rocprim::__uninitialized_fill::functor<thrust::device_ptr<thrust::complex<float>>, thrust::complex<float>>, unsigned long)::workaround::seq' requested here
6600- struct workaround
6601- ^
--
6694-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce.inl:21:
6695-In file included from /public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.h:51:
6696:/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/omp/detail/reduce_intervals.inl:48:3: error: static_assert failed due to requirement 'thrust::detail::depend_on_instantiation<thrust::transform_iterator<thrust::detail::zipped_binary_op<double, thrust::multiplies<double>>, thrust::zip_iterator<thrust::tuple<float *, float *, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, double, thrust::use_default>, false>::value' "OpenMP compiler support is not enabled"
6697- THRUST_STATIC_ASSERT_MSG(
6698- ^~~~~~~~~~~~~~~~~~~~~~~~~
6699-/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/static_assert.h:50:44: note: expanded from macro 'THRUST_STATIC_ASSERT_MSG'
6700-# define THRUST_STATIC_ASSERT_MSG(B, msg) static_assert(B, msg)
6701- ^ ~
感觉问题可以归结为两个问题:一是编译器没有分清 Thrust 库中 调用OpenMP的设备是CPU还是 GPU; 二是 operator new' function for non-allocating placement 问题。具体的 log 在 /public/home/ghfund2_a27/codes/a00.log .

暂无数据