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

Clang compiler error with named parallel_reduce, tags, and TeamPolicy. #335

Closed
mrtupek opened this issue Jun 27, 2016 · 1 comment
Closed
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@mrtupek
Copy link

mrtupek commented Jun 27, 2016

The following code compiles with gcc, intel, nvcc, but not clang (3.6 and 3.8):

struct Foo {

struct MyTag {
};

void compute() {
double totalEnergy = 0.0;
Kokkos::parallel_reduce("name", Kokkos::TeamPolicy(100, Kokkos::AUTO), *this, totalEnergy);
}

KOKKOS_INLINE_FUNCTION void operator() (const MyTag&, const Kokkos::TeamPolicy::member_type& team, double& val) const {
int index = team.league_rank();
val += index;
}

};

int main(int argc, char* argv[]) {

Kokkos::initialize(argc, argv);

Foo foo;
foo.compute();

Kokkos::finalize();

}

@crtrott crtrott added Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) bug - fix pushed to develop branch labels Jun 28, 2016
@crtrott crtrott added this to the Summer 2016 milestone Jun 28, 2016
@crtrott crtrott self-assigned this Jun 28, 2016
@crtrott
Copy link
Member

crtrott commented Jun 28, 2016

This was incidentally fixed by the parallel_reduce implementation changes I worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

3 participants