llnl / llnl/camp

Friend functions of private Base class in tuple not accessible when building with XLC.

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
107
Forks
26
Avg merge
8d 11h
Merged PRs (30d)
2

Description

- [ ] Place `base` back into private members of `tuple`.

While the test-kernel-single-loop-ForICount-8-OpenMPTarget test in RAJA (https://github.com/LLNL/RAJA/pull/1207), there was a compilation error in CAMP tuple. I'm not sure if this is the right solution, but making the base tuple_helper class publicly accessible solved the build error (although the test still failed with XLC).

Note: This solution does not solve the clang internal error https://github.com/LLNL/RAJA/issues/1216.

This PR was a band-aid for the problem (https://github.com/LLNL/camp/pull/98), but we want to avoid exposing the `Base` class.

Error:
In file included from /usr/WS1/chen59/allraja/rajaatomicexhaustive/raja_git_atomicexhaustive/build_lc_blueos-xl_omptarget-2021.12.22/test/functional/kernel/single-loop-tile-icount-tcount/test-kernel-single-loop-ForICount-8-OpenMPTarget.cpp:11:
In file included from /usr/WS1/chen59/allraja/rajaatomicexhaustive/raja_git_atomicexhaustive/test/include/RAJA_test-base.hpp:15:
In file included from /usr/WS1/chen59/allraja/rajaatomicexhaustive/raja_git_atomicexhaustive/include/RAJA/RAJA.hpp:33:
In file included from /usr/WS1/chen59/allraja/rajaatomicexhaustive/raja_git_atomicexhaustive/include/RAJA/util/camp_aliases.hpp:31:
/usr/WS1/chen59/allraja/rajaatomicexhaustive/raja_git_atomicexhaustive/tpl/camp/include/camp/tuple.hpp:154:60: error: 'base' is a private member of 'camp::tuple >'
return static_cast const&>(t.base).get_inner();
^

CI Error:
https://lc.llnl.gov/gitlab/radiuss/RAJA/-/jobs/561894

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tpl/camp/include/camp/tuple.hpp around the access to t.base at line 154, then inspect the test-kernel-single-loop-ForICount-8-OpenMPTarget test and its XLC CI error. Determine how to keep Base private while allowing the required tuple access, and verify the test builds without exposing Base; the noted clang internal error is separate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.