forked from open-mpi/ompi
-
Notifications
You must be signed in to change notification settings - Fork 4
OMPI: Notified RMA ops Public API #9
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
Open
joe-explr
wants to merge
1
commit into
devreal:notified-rma
Choose a base branch
from
joe-explr:notified-rma-sm
base: notified-rma
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | ||
| /* | ||
| * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana | ||
| * University Research and Technology | ||
| * Corporation. All rights reserved. | ||
| * Copyright (c) 2004-2020 The University of Tennessee and The University | ||
| * of Tennessee Research Foundation. All rights | ||
| * reserved. | ||
| * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, | ||
| * University of Stuttgart. All rights reserved. | ||
| * Copyright (c) 2004-2005 The Regents of the University of California. | ||
| * All rights reserved. | ||
| * Copyright (c) 2015 Los Alamos National Security, LLC. All rights | ||
| * reserved. | ||
| * Copyright (c) 2015 Research Organization for Information Science | ||
| * and Technology (RIST). All rights reserved. | ||
| * Copyright (c) 2024 Triad National Security, LLC. All rights | ||
| * reserved. | ||
| * $COPYRIGHT$ | ||
| * | ||
| * Additional copyrights may follow | ||
| * | ||
| * $HEADER$ | ||
| */ | ||
| #include "ompi_config.h" | ||
| #include <stdio.h> | ||
|
|
||
| #include "ompi/mpi/c/bindings.h" | ||
| #include "ompi/runtime/params.h" | ||
| #include "ompi/communicator/communicator.h" | ||
| #include "ompi/errhandler/errhandler.h" | ||
| #include "ompi/win/win.h" | ||
| #include "ompi/mca/osc/osc.h" | ||
| #include "ompi/datatype/ompi_datatype.h" | ||
| #include "ompi/runtime/ompi_spc.h" | ||
|
|
||
| PROTOTYPE ERROR_CLASS get_with_notify(BUFFER_OUT origin_addr, COUNT origin_count, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be consistent with the proposal ( |
||
| DATATYPE origin_datatype, INT target_rank, | ||
| AINT target_disp, COUNT target_count, | ||
| DATATYPE target_datatype, INT notification_idx, WIN win) | ||
| { | ||
| int rc; | ||
|
|
||
| SPC_RECORD(OMPI_SPC_GET_WITH_NOTIFY, 1); | ||
|
|
||
| if (MPI_PARAM_CHECK) { | ||
| rc = OMPI_SUCCESS; | ||
|
|
||
| OMPI_ERR_INIT_FINALIZE(FUNC_NAME); | ||
|
|
||
| if (ompi_win_invalid(win)) { | ||
| return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_WIN, FUNC_NAME); | ||
| } else if (origin_count < 0 || target_count < 0) { | ||
| rc = MPI_ERR_COUNT; | ||
| } else if (ompi_win_peer_invalid(win, target_rank) && | ||
| (MPI_PROC_NULL != target_rank)) { | ||
| rc = MPI_ERR_RANK; | ||
| } else if ( MPI_WIN_FLAVOR_DYNAMIC != win->w_flavor && target_disp < 0 ) { | ||
| rc = MPI_ERR_DISP; | ||
| } else if (notification_idx < 0) { | ||
| rc = MPI_ERR_NOTIFY_IDX; | ||
| } else { | ||
| OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count); | ||
| if (OMPI_SUCCESS == rc) { | ||
| OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, target_datatype, target_count); | ||
| } | ||
| } | ||
| OMPI_ERRHANDLER_CHECK(rc, win, rc, FUNC_NAME); | ||
| } | ||
|
|
||
| if (MPI_PROC_NULL == target_rank) return MPI_SUCCESS; | ||
|
|
||
| rc = win->w_osc_module->osc_get_with_notify(origin_addr, origin_count, origin_datatype, | ||
| target_rank, target_disp, target_count, | ||
| target_datatype, notification_idx, win); | ||
| OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | ||
| /* | ||
| * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana | ||
| * University Research and Technology | ||
| * Corporation. All rights reserved. | ||
| * Copyright (c) 2004-2020 The University of Tennessee and The University | ||
| * of Tennessee Research Foundation. All rights | ||
| * reserved. | ||
| * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, | ||
| * University of Stuttgart. All rights reserved. | ||
| * Copyright (c) 2004-2005 The Regents of the University of California. | ||
| * All rights reserved. | ||
| * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. | ||
| * Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights | ||
| * reserved. | ||
| * Copyright (c) 2015 Research Organization for Information Science | ||
| * and Technology (RIST). All rights reserved. | ||
| * Copyright (c) 2024 Triad National Security, LLC. All rights | ||
| * reserved. | ||
| * $COPYRIGHT$ | ||
| * | ||
| * Additional copyrights may follow | ||
| * | ||
| * $HEADER$ | ||
| */ | ||
| #include "ompi_config.h" | ||
| #include <stdio.h> | ||
|
|
||
| #include "ompi/mpi/c/bindings.h" | ||
| #include "ompi/runtime/params.h" | ||
| #include "ompi/communicator/communicator.h" | ||
| #include "ompi/errhandler/errhandler.h" | ||
| #include "ompi/win/win.h" | ||
| #include "ompi/mca/osc/osc.h" | ||
| #include "ompi/datatype/ompi_datatype.h" | ||
| #include "ompi/runtime/ompi_spc.h" | ||
|
|
||
| PROTOTYPE ERROR_CLASS put_with_notify(BUFFER origin_addr, COUNT origin_count, DATATYPE origin_datatype, | ||
| INT target_rank, AINT target_disp, COUNT target_count, | ||
| DATATYPE target_datatype, INT notification_idx, WIN win) | ||
| { | ||
| int rc; | ||
|
|
||
| SPC_RECORD(OMPI_SPC_PUT_WITH_NOTIFY, 1); | ||
|
|
||
| if (MPI_PARAM_CHECK) { | ||
| rc = OMPI_SUCCESS; | ||
|
|
||
| OMPI_ERR_INIT_FINALIZE(FUNC_NAME); | ||
|
|
||
| if (ompi_win_invalid(win)) { | ||
| return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_WIN, FUNC_NAME); | ||
| } else if (origin_count < 0 || target_count < 0) { | ||
| rc = MPI_ERR_COUNT; | ||
| } else if (ompi_win_peer_invalid(win, target_rank) && | ||
| (MPI_PROC_NULL != target_rank)) { | ||
| rc = MPI_ERR_RANK; | ||
| } else if (NULL == target_datatype || | ||
| MPI_DATATYPE_NULL == target_datatype) { | ||
| rc = MPI_ERR_TYPE; | ||
| } else if ( MPI_WIN_FLAVOR_DYNAMIC != win->w_flavor && target_disp < 0 ) { | ||
| rc = MPI_ERR_DISP; | ||
| } else if (notification_idx < 0) { | ||
| rc = MPI_ERR_NOTIFY_IDX; | ||
| } else { | ||
| OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, origin_datatype, origin_count); | ||
| if (OMPI_SUCCESS == rc) { | ||
| OMPI_CHECK_DATATYPE_FOR_ONE_SIDED(rc, target_datatype, target_count); | ||
| } | ||
| } | ||
| OMPI_ERRHANDLER_CHECK(rc, win, rc, FUNC_NAME); | ||
| } | ||
|
|
||
| if (MPI_PROC_NULL == target_rank) return MPI_SUCCESS; | ||
|
|
||
| rc = win->w_osc_module->osc_put_with_notify(origin_addr, origin_count, origin_datatype, | ||
| target_rank, target_disp, target_count, | ||
| target_datatype, notification_idx, win); | ||
| OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should go before
MPI_ERR_LASTCODE.