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

Add WindowIO and MPIWindowIOManager #203

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

barche
Copy link
Collaborator

@barche barche commented Feb 24, 2018

The objective of this PR is to get some better cooperation between the Julia parallel processing system and MPI.

  • WindowIO allows point-to-point communication between MPI processes using a Julia IO. Brief excerpt from the test:
using MPI

MPI.Init()
comm = MPI.COMM_WORLD
const rank = MPI.Comm_rank(comm)
const N = MPI.Comm_size(comm)

const winio = WindowIO(comm) # read from anyone
const writer = WindowWriter(winio, 0) # writes to rank 0
if rank != 0
    write(writer, rank)
    flush(writer) # Must flush to trigger communication
else
    result = read(winio, (N-1)*sizeof(Int)) # Blocks until all required data is read
end
  • MPIWindowIOManager sets up a cluster manager to use the WindowIO buffer as communication layer. It adds two modes for start_main_loop:
    • MPI_WINDOW_IO: Normal cluster manager, with the workers only waiting on the process_events loop and all commands only executed on master
    • MPI_WINDOW_NOWAIT: The cluster manager is initialized, but workers don't process events and instead run in SPMD MPI fashion as usual. If a Julia parallel call is needed, it must be prefixed with the @cluster macro to activate the event loops on the workers. All code in the @cluster block then only runs on the master and can contain normal Julia parallel programming calls. After the block ends, SPMD mode is resumed.

@lcw
Copy link
Member

lcw commented May 24, 2018

I don't know much about the cluster manager but WindowIO seems cool to me.

@barche barche force-pushed the window-cman branch 2 times, most recently from f9f2233 to 41d37e9 Compare August 2, 2018 18:02
@simonbyrne simonbyrne force-pushed the master branch 2 times, most recently from 02c2bbd to 3cb2df0 Compare November 20, 2019 21:14
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.

2 participants