-
Notifications
You must be signed in to change notification settings - Fork 882
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
MPI-4: Add support for MPI Sessions #9097
Conversation
ompi/attribute/attribute.c
Outdated
@@ -406,13 +411,24 @@ typedef struct attribute_value_t { | |||
int av_sequence; | |||
} attribute_value_t; | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary ? As far as I see there is still a single global object to handle the attributes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it was done to use opal-object reference counting. The last one to tear down attributes calls the destructor. At some point Open MPI should really stop using globals and and this change is a step in the right direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not arguing against avoiding globals (where and when it makes sense), but such a change deserve its own PR instead of being part of a very large one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No argument there. Up to @hppritcha to decide whether to move it to another PR.
ompi/communicator/comm.c
Outdated
@@ -198,15 +207,45 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm, | |||
} | |||
|
|||
newcomm->c_flags |= OMPI_COMM_INTER; | |||
newcomm->c_index_vec = malloc(remote_size * sizeof(int)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one sneaky change, with drastic implications in terms of latency, scalability and memory usage. It need to be carefully assessed and discusses before being merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes agreed. There's an issue to address this in a different way - hpc#65
@@ -2032,3 +2404,28 @@ static int ompi_comm_copy_topo(ompi_communicator_t *oldcomm, | |||
newcomm->c_flags |= newcomm->c_topo->type; | |||
return OMPI_SUCCESS; | |||
} | |||
|
|||
char *ompi_comm_print_cid (const ompi_communicator_t *comm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thread-local 2 correct values function begs for documentation !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I thought I documented this somewhere.... Guess not. Should add documentation to the header declaration.
break; | ||
} | ||
|
||
PMIX_INFO_LOAD(&pinfo, PMIX_GROUP_ASSIGN_CONTEXT_ID, NULL, PMIX_BOOL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How scalable is the construction of the PMIx group ? What process is calling this function ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses the same PRRTE communication collective as the "modex" operation. All processes that are to be members of the group must call it. It basically is a data-less "modex" (aka barrier) that returns a unique context ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, slightly less scalable than MPI collectives on the local costs (because of the need to construct and destruct the group), then delegated to a different software that uses some communication capabilities, to finally be delegated to a RM with or without efficient support for collectives. Hopefully this CID selection is only rarely used and most calls are outside the critical path. Right ?
ompi/communicator/communicator.h
Outdated
|
||
OMPI_DECLSPEC extern opal_pointer_array_t ompi_mpi_communicators; | ||
OMPI_DECLSPEC extern opal_hash_table_t ompi_comm_hash; | ||
OMPI_DECLSPEC extern opal_pointer_array_t ompi_comm_array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the name change ? The old name was clear enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hjelmn any reason not to go back to ompi_mpi_communicators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember why I changed the name. There probably was a reason at one point during the evolution of this branch. Most likely I was making the name consistent with ompi_comm_hash
to make it clear that one is an array of communicators where the lookup is by index where the other one is a hash where the lookup is by exCID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove this name change, the PR is getting more self-contained (aka. smaller and easier to understand).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched back to the old variable name
The IBM CI (GNU/Scale) build failed! Please review the log, linked below. Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6 |
The IBM CI (XL) build failed! Please review the log, linked below. Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6 |
bot:ibm:retest |
The IBM CI (XL) build failed! Please review the log, linked below. Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6 |
The IBM CI (PGI) build failed! Please review the log, linked below. Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6 |
The IBM CI (GNU/Scale) build failed! Please review the log, linked below. Gist: https://gist.github.com/ibm-ompi/88b480fb98dfd2bdac939f023e1f8fe6 |
bot:ibm:retest |
The IBM CI (GNU/Scale) build failed! Please review the log, linked below. Gist: https://gist.github.com/2175efaa13b971835186c294806b0001 |
The IBM CI (XL) build failed! Please review the log, linked below. Gist: https://gist.github.com/61a0a9029bfafb0c95f43f60957a65d5 |
The IBM CI (PGI) build failed! Please review the log, linked below. Gist: https://gist.github.com/52e26384a669f512dad96ba55ceaa81f |
hmm aws seems to have gone bonkers rerun that first |
I suspect the git commit checker is experiencing some kind of scalability melt down. will ignore going forward with this PR. @jsquyres |
It looks like the git commit checker is not running at all. I've seen this before -- rarely, but I have seen it. I haven't been able to figure out the root cause. Perhaps it doesn't run if there's a conflict on the PR...? |
The IBM CI (GNU/Scale) build failed! Please review the log, linked below. Gist: https://gist.github.com/c6fe74035df169e07a5eb531a01cf04d |
The IBM CI (XL) build failed! Please review the log, linked below. Gist: https://gist.github.com/77e50f876685171598bd552c135adaf2 |
The IBM CI (PGI) build failed! Please review the log, linked below. Gist: https://gist.github.com/358a6ff4065920a662e408d5032d02e7 |
Leaving all the commits as is for now. Will squash down to a much smaller set of commits once this PR is reviewd. |
47ebff4
to
7f8dcd4
Compare
0639ea7
to
b229b61
Compare
The IBM CI (GNU/Scale) build failed! Please review the log, linked below. Gist: https://gist.github.com/5993530c5eb1eb4702834c6595aef513 |
dependencies array. If this is not done, then when using a non-ob1 PML, the stages of finalization have the SMSC framework closed before the btl framework is closed or del_procs invoked for the btl(s). When using the --enable-mca_dso this results in a segfault as the code section for the SMSC framework/components has been dlclosed. Moving the opal_smc_base_framework from the opal_init_frameworks to the ompi_framework_dependencies fixes this problem. Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit ec21585)
Fix a memory leak in ofi mtl add_comm method. Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit 3626d64)
when MPI_Session_create_errhandler blows up. Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit e514ce1)
more complex test cases for sessions and world model showed a problem when creating sessions before calling mpi_init. This patch addresses this problem. Related to PR open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit 4848109)
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit 01c2233)
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
related to open-mpi#9097 test https://github.com/open-mpi/ompi-tests-public/blob/master/sessions/sessions_test16.c now passes. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
somehow managed to not get into the original sessions pr. also do some cleanup of the use mpi_f08 profiling functions. Related to open-mpi#10388 Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
comms. related to open-mpi#10449 related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
The sessions attribute functionality was never approved as part of the MPI-4 sessions feature. Remove a vestige of this from Open MPI. Related to open-mpi#10388 Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
comms. related to open-mpi#10449 related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit bfffe99)
The sessions attribute functionality was never approved as part of the MPI-4 sessions feature. Remove a vestige of this from Open MPI. Related to open-mpi#10388 Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit c488c60)
somehow managed to not get into the original sessions pr. also do some cleanup of the use mpi_f08 profiling functions. Related to open-mpi#10388 Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
somehow managed to not get into the original sessions pr. also do some cleanup of the use mpi_f08 profiling functions. Related to open-mpi#10388 Related to open-mpi#9097 Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit e5c3795)
The PR contains changes to Open MPI to support the MPI 4 Sessions API (see chapter 11 sections 3 and 4, and chapter 7 sections 3.2 and 4.2, and parts of chapter 9 concerning errorhandlers). The MPI 4 standard is available at https://www.mpi-forum.org/docs/mpi-4.0/mpi40-report.pdf.
A set of sessions tests has been added to the OMPI public tests repo:https://github.com/open-mpi/ompi-tests-public.
A set of issues concerning this PR are at https://github.com/hpc/ompi/issues
Major changes associated with this PR are:
MPI_Init
and friends and after callingMPI_Finalize
and friends.A paper describing the prototype (at least at an early stage) is available at https://ieeexplore.ieee.org/abstract/document/8891002
There will be extensive squashing of commits prior to merging so it would probably be best to focus on the changes introduced by this PR as a whole rather than reviewing individual commits.