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

Unnecesary template member in communicator #2

Closed
RaulPPelaez opened this issue Mar 21, 2019 · 0 comments
Closed

Unnecesary template member in communicator #2

RaulPPelaez opened this issue Mar 21, 2019 · 0 comments

Comments

@RaulPPelaez
Copy link
Contributor

RaulPPelaez commented Mar 21, 2019

mpl/mpl/comm_group.hpp

Lines 895 to 904 in 3012645

template<typename T>
std::pair<bool, status> iprobe(int source, tag t=tag(0)) const {
check_source(source);
check_recv_tag(t);
int result;
status s;
MPI_Iprobe(source, static_cast<int>(t),
comm, &result, reinterpret_cast<MPI_Status *>(&s));
return std::make_pair(static_cast<bool>(result), s);
}

The iprobe member is declared as a template but the template argument is never used, it is necessary to explicitly provide an argument for this member to compile, even when the argument itself is irrelevant.
This means this simple line wont compile (at least with my OpenMPI-4.0.0 + g++-5.5):

#include<mpl/mpl.hpp>
int main(){
   mpl::environment::comm_world().iprobe(mpl::any_source); 
return 0;
}

Unless you put <literally any typename> after iprobe.
Just commenting line 895 above solves the issue.

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

1 participant