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

Compiler errors on GCC 10.1 #6

Open
PayasR opened this issue Oct 29, 2021 · 2 comments
Open

Compiler errors on GCC 10.1 #6

PayasR opened this issue Oct 29, 2021 · 2 comments

Comments

@PayasR
Copy link

PayasR commented Oct 29, 2021

Configuration: x86-64, CentOS 7

-- --------------- General configuration -------------
-- CMake Generator:                Ninja
-- Compiler:                       GNU 10.1.0
-- Build type:                     Release

I'm seeing 3 error(s):

/home/praja002/OpenSource/PAM/examples/tpch/queries/Q10.h:25:43: **error:** ‘group_by_and_combine’ is not a member of ‘parlay::internal’
   25 |   sequence<kf_pair> r = parlay::internal::group_by_and_combine(elts, parlay::addm<float>());
      |                                           ^~~~~~~~~~~~~~~~~~~~
In file included from /home/praja002/OpenSource/PAM/examples/tpch/queries/queries.h:25,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:26:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q15.h: In function ‘Q15_rtype Q15(maps, const char*, const char*)’:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q15.h:30:21: **error:** no matching function for call to ‘collect_reduce(parlay::sequence<std::pair<unsigned int, float> >&, Q15(maps, const char*, const char*)::<lambda(const sr_type&)>&, Q15(maps, const char*, const char*)::<lambda(const sr_type&)>&, parlay::addm<double>, int&)’
   30 |          max_supp_id);
      |                     ^
In file included from /usr/local/include/parlay/internal/group_by.h:17,
                 from /usr/local/include/parlay/primitives.h:897,
                 from /home/praja002/OpenSource/PAM/examples/tpch/lineitem.h:1,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:5:
/usr/local/include/parlay/internal/collect_reduce.h:162:6: note: candidate: ‘template<class Seq, class Helper> auto parlay::internal::collect_reduce(const Seq&, const Helper&, size_t)’
  162 | auto collect_reduce(Seq const &A, Helper const &helper, size_t num_buckets) {
      |      ^~~~~~~~~~~~~~
/usr/local/include/parlay/internal/collect_reduce.h:162:6: note:   template argument deduction/substitution failed:
In file included from /home/praja002/OpenSource/PAM/examples/tpch/queries/queries.h:25,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:26:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q15.h:30:21: note:   candidate expects 3 arguments, 5 provided
   30 |          max_supp_id);
      |                     ^
In file included from /home/praja002/OpenSource/PAM/examples/tpch/queries/queries.h:32,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:26:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q22.h: In function ‘Q22_rtype Q22(maps, bool, uchar*)’:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q22.h:58:7: **error:** no matching function for call to ‘collect_reduce(parlay::sequence<std::tuple<float, unsigned char, bool> >&, Q22(maps, bool, uchar*)::<lambda(a_type)>&, Q22(maps, bool, uchar*)::<lambda(a_type)>&, parlay::monoid<parlay::pair_monoid<parlay::addm<int>, parlay::addm<double> >::<lambda(P, P)>, std::pair<int, double> >, int)’
   58 |     32);
      |       ^
In file included from /usr/local/include/parlay/internal/group_by.h:17,
                 from /usr/local/include/parlay/primitives.h:897,
                 from /home/praja002/OpenSource/PAM/examples/tpch/lineitem.h:1,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:5:
/usr/local/include/parlay/internal/collect_reduce.h:162:6: note: candidate: ‘template<class Seq, class Helper> auto parlay::internal::collect_reduce(const Seq&, const Helper&, size_t)’
  162 | auto collect_reduce(Seq const &A, Helper const &helper, size_t num_buckets) {
      |      ^~~~~~~~~~~~~~
/usr/local/include/parlay/internal/collect_reduce.h:162:6: note:   template argument deduction/substitution failed:
In file included from /home/praja002/OpenSource/PAM/examples/tpch/queries/queries.h:32,
                 from /home/praja002/OpenSource/PAM/examples/tpch/test.cpp:26:
/home/praja002/OpenSource/PAM/examples/tpch/queries/Q22.h:58:7: note:   candidate expects 3 arguments, 5 provided
   58 |     32);
@PayasR
Copy link
Author

PayasR commented Oct 29, 2021

Also, on compiling with clang on MacOS, I get the following warning (After commenting out the #include<parallel/algorithm>, since clang doesn't have support for it yet):

/Users/payasr/OpenSource/PAM/include/pam/utils.h:70:7: warning: 'memcpy' will always overflow; destination buffer has size 4, but size argument is 8 [-Wfortify-source]
      memcpy(&r_nval, &newval, sizeof(ET));

@syhlalala
Copy link
Collaborator

Hi,

For the first problem, it looks like it's because parlaylib changed the interface of collect_reduce (the three queries all use collect_reduce). You could try this:

https://github.com/cmuparlay/PAM/releases/tag/V1

with using pbbslib, which is available here:

https://github.com/cmuparlay/pbbslib

I will also try to fix the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants