forall with dynamic policy selection
Building on user feedback a first pass at introducing run-time policy selection to forall.
See example run-time-forall.cpp
Developers can provide any number of execution policies and then select at run time how to dispatch their code.
Example usage:
./run-time-forall pol_0
./run-time-forall pol_1
./run-time-forall pol_2
tag: @adayton1
TODO: strongly type policy selection.
TODO:
//User should provide a pair of policies and indices,
//camp tuple, generate if run-time == ....
TODO: Add coverage for versions of forall that take a resource.
@ajkunen @davidbeckingsale I made a clean up pass to this PR. I wasn't sure on how integrate creating a list of both policies and indices, but hopefully what I have here does that job.
Any feedback would be great, ping: @tomstitt @rcarson3 @adayton1
Some of the CI are failing due to time limits and connectivity issues.
Did anyone else want to take a look or are we good to merge?
I'll take a look tomorrow, thanks.
I'll take a look tomorrow, thanks.
Ditto, for me.
@artv3 👍 for adding tests!
@artv3 👍 for adding tests!
Thanks, not ready yet though just wanted to commit initial progress.
I just pushed up some basic test for dynamic forall. If they pass this PR should be good to go. The testing may be a bit redundant because of the run-time switching capability.
@artv3 is there a (good) way to prevent the redundant tests? We don't want to have to deal with more timeouts than we already experience.
@artv3 is there a (good) way to prevent the redundant tests? We don't want to have to deal with more timeouts than we already experience.
I'm thinking if we have a way to detect what test the executable is supposed to run, for example openmp vs sequential could try to only only invoke that policy number. Cmake would have to pass in extra info into the executable to be more clear.
If there are concerns about timing out, I can shorted the policy list to just 1 host and 1 device and we can differentiate based the working resource. This would be simpler.
Let's let it go as is for now. We can address it later if it becomes a problem.
I hit the following errors: srun: Job 10457853 step creation still disabled, retrying (Requested nodes are busy)
Will try again in the evening.
@rhornung67 are we ready to merge this PR?