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

How to implement resolved() for an MPI-based cluster? #130

Closed
HenrikBengtsson opened this issue Mar 7, 2017 · 2 comments
Closed

How to implement resolved() for an MPI-based cluster? #130

HenrikBengtsson opened this issue Mar 7, 2017 · 2 comments
Labels
Milestone

Comments

@HenrikBengtsson
Copy link
Owner

After some fixes, the develop branch now supports MPI clusters (I haven't really had a good place to check this before). However, it's not very optimal, because currently there's no efficient resolved() implementation, because I don't know yet how to do a non-blocking MPI check to see whether a particular worker is ready or not. In the meanwhile, resolved() calls value(..., signal = FALSE) and then return TRUE. This means that resolved() is blocking for MPI-based cluster futures.

Example:

library("future")
cl <- parallel::makeCluster(2L, type = "MPI")
plan(cluster, workers = cl)

> x %<-% { Sys.sleep(5); Sys.getpid() }; print(1); y %<-% { Sys.sleep(5); Sys.getpid() }; print(2); z %<-% { Sys.sleep(5); Sys.getpidWarning message:
In resolved.ClusterFuture(future) :
  resolved() is not yet implemented for workers of class 'MPInode'. Will use value() instead and return TRUE
[1] 1
Warning message:
In resolved.ClusterFuture(future) :
  resolved() is not yet implemented for workers of class 'MPInode'. Will use value() instead and return TRUE
[1] 2
Warning message:
In resolved.ClusterFuture(future) :
  resolved() is not yet implemented for workers of class 'MPInode'. Will use value() instead and return TRUE
[1] 3
> x
[1] 13023
> y
[1] 13024
> z
[1] 13023
> Sys.getpid()
[1] 13019
@HenrikBengtsson
Copy link
Owner Author

Probably Rmpi::mpi.iprobe().

@HenrikBengtsson HenrikBengtsson added this to the Next release milestone Jul 15, 2018
@HenrikBengtsson HenrikBengtsson modified the milestones: 1.9.0, Next release Jul 23, 2018
HenrikBengtsson added a commit that referenced this issue Jul 27, 2018
…on-blocking with fallback to value() which is blocking [#130]
HenrikBengtsson added a commit that referenced this issue Jul 30, 2018
…ll happen out of the box everywhere. For now, tests/mpi.R will only be run locally/manually [#130]
@HenrikBengtsson
Copy link
Owner Author

For my own records: To run the tests/mpi.R tests, use export _R_CHECK_FULL_=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant