You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stlbm is a very good example of high-performance scientific computation using C++ which can be offloaded sucessfully to accelerators with top-notch performance.
I have tried to compile it using oneDPL, by modifying the cavity.cpp source to add the
which then gets passed to the std::for_each invocations, instead of std::execution::par_unseq.
When doing that I get a rather long C++ error that boils down to:
/work/stlbm/apps/cavity.cpp:300:9: note: in instantiation of function template specialization 'oneapi::dpl::for_each<const oneapi::dpl::execution::device_policy<> &, std::array<double, 19> *, twopop_aos_bgk_unrolled::LBM>' requested here
300 | for_each(mypolicy, lattice, lattice + dim.nelem, lbm);
| ^
/work/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/unseq_backend_sycl.h:90:5: note: candidate template ignored: substitution failure [with _ItemId = size_t, _Ranges = <const oneapi::dpl::__ranges::guard_view<std::array<double, 19> *> &>]: no matching function for call to object of type 'const twopop_aos_bgk_unrolled::LBM'
90 | operator()(const _ItemId __idx, _Ranges&&... __rngs) const -> decltype(__f(__rngs[__idx]...))
Seems like the argument to LBM::operator() should be a CellData = std::array<double, 19> instead of a std::array<double, 19> * (I believe, from cursory examination of the guard_view class). Maybe some "type dressing" has gone wrong?
The text was updated successfully, but these errors were encountered:
Hello @lanwatch ,
Firstly,
It seems you pass into for_each algorithm a data type (aka std::array<double, 19> * ), which is not supported by oneDPL.
OneAPI library documentation tells:
"You can use one of the following ways to pass data to an algorithm executed with a device policy:
oneapi:dpl::begin and oneapi::dpl::end functions
Unified shared memory (USM) pointers and std::vector with USM allocators
Iterators of host-side std::vector
"
Secondly, what is a twopop_aos_bgk_unrolled::LBM type?
Probably, you should add const modificator for LBM::operator(..) ?
stlbm is a very good example of high-performance scientific computation using C++ which can be offloaded sucessfully to accelerators with top-notch performance.
I have tried to compile it using oneDPL, by modifying the
cavity.cpp
source to add theincludes before the standard ones, and defining a policy like:
which then gets passed to the
std::for_each
invocations, instead ofstd::execution::par_unseq
.When doing that I get a rather long C++ error that boils down to:
Seems like the argument to
LBM::operator()
should be aCellData = std::array<double, 19>
instead of astd::array<double, 19> *
(I believe, from cursory examination of theguard_view
class). Maybe some "type dressing" has gone wrong?The text was updated successfully, but these errors were encountered: