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

1260: Fix active messaging functor inference using the FunctorExtractor #1330

Merged
merged 9 commits into from
May 7, 2021

Conversation

JacobDomagala
Copy link
Contributor

Fixes #1260

@JacobDomagala JacobDomagala self-assigned this Mar 16, 2021
@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-5, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-10, ubuntu, openmpi, no LB)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (clang-3.9, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (clang-5.0, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (clang-8, alpine, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-6, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-8, ubuntu, mpich, address sanitizer)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-9, ubuntu, mpich, zoltan)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (nvidia cuda 10.1, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (nvidia cuda 11.0, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (intel 18.03, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (intel 19, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@github-actions
Copy link

github-actions bot commented Mar 16, 2021

PR tests (gcc-7, ubuntu, mpich, trace runtime, LB)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #1330 (b1f37a2) into develop (8337311) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1330      +/-   ##
===========================================
- Coverage    82.69%   82.66%   -0.04%     
===========================================
  Files          760      760              
  Lines        28682    28699      +17     
===========================================
+ Hits         23719    23724       +5     
- Misses        4963     4975      +12     
Impacted Files Coverage Δ
src/vt/messaging/active.h 73.43% <ø> (ø)
examples/collection/transpose.cc 95.71% <100.00%> (ø)
examples/hello_world/hello_world_functor.cc 100.00% <100.00%> (ø)
src/vt/messaging/active.impl.h 99.25% <100.00%> (+0.02%) ⬆️
tutorial/tutorial_1b.h 100.00% <100.00%> (ø)
src/vt/topos/location/location.impl.h 90.49% <0.00%> (-3.69%) ⬇️

@github-actions
Copy link

github-actions bot commented Apr 26, 2021

PR tests (clang-9, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@JacobDomagala JacobDomagala force-pushed the 1260-fix-send-msg-to-functor branch from 189c076 to 6dc8c17 Compare April 26, 2021 18:36
@github-actions
Copy link

github-actions bot commented Apr 26, 2021

PR tests (clang-10, ubuntu, mpich)

Build for b1f37a2

Compilation - successful

Testing - passed

Build log

@JacobDomagala JacobDomagala force-pushed the 1260-fix-send-msg-to-functor branch from e88e3c7 to b091354 Compare April 26, 2021 20:45
@JacobDomagala JacobDomagala marked this pull request as ready for review April 26, 2021 20:45
@JacobDomagala JacobDomagala requested a review from nmm0 April 26, 2021 20:51
@PhilMiller
Copy link
Member

I really like what this does. I want to request an extension to cover updating the codebase as broadly as possible, but that's asking for merge conflicts. Let's get this integrated, and then clean things up across the board in a follow-on PR.

@PhilMiller
Copy link
Member

Could the same thing be done to the interfaces on objgroup and collection proxies?

@JacobDomagala
Copy link
Contributor Author

This PR is merely just a bugfix for Active send/broadcast when used with Functor handler. For any arbitrary handler we're limited by C++14's lack of using the object as template argument, without specifying its type first.

If we really would want to get rid of explicit message type, I think the best we can do currently is:

template <typename HandlerType, HandlerType handler>
send(MsgPtrThief<typename FunctionExtractor<HandlerType >::MsgType >msg, ...)

Then we could provide helper macro like so:

#define VT_HANDLER(handler) decltype(&handler), &handler

which would make the call to send look like this:

send<VT_HANDLER(myHandler)>(my_msg);

Example: https://godbolt.org/z/fK6xvjWa8

Copy link
Collaborator

@lifflander lifflander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good

@JacobDomagala JacobDomagala force-pushed the 1260-fix-send-msg-to-functor branch from b091354 to 29c5ff8 Compare April 29, 2021 11:54
@JacobDomagala
Copy link
Contributor Author

I just realized that this change enforces the user to have a Functor with only single operator() defined. Otherwise it won't compile. I think I will have to update this PR

@JacobDomagala JacobDomagala marked this pull request as draft April 29, 2021 13:54
@JacobDomagala JacobDomagala force-pushed the 1260-fix-send-msg-to-functor branch 2 times, most recently from d64e9a1 to 1f28dc8 Compare May 3, 2021 15:28
@JacobDomagala JacobDomagala marked this pull request as ready for review May 4, 2021 16:58
@JacobDomagala JacobDomagala force-pushed the 1260-fix-send-msg-to-functor branch from b58ec52 to 560f6dd Compare May 7, 2021 13:12
@JacobDomagala JacobDomagala requested a review from lifflander May 7, 2021 14:46
@JacobDomagala JacobDomagala merged commit 743a8e6 into develop May 7, 2021
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

Successfully merging this pull request may close these issues.

Active messaging functor inference using the FunctorExtractor is broken?
4 participants