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

big count: embiggen the pml bsend attach/detach #12860

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ompi/mca/pml/base/pml_base_bsend.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int mca_pml_base_bsend_fini (void)
/*
* User-level call to attach buffer.
*/
int mca_pml_base_bsend_attach(void* addr, int size)
int mca_pml_base_bsend_attach(void* addr, size_t size)
{
int align;

Expand Down Expand Up @@ -179,7 +179,7 @@ int mca_pml_base_bsend_attach(void* addr, int size)
/*
* User-level call to detach buffer
*/
int mca_pml_base_bsend_detach(void* addr, int* size)
int mca_pml_base_bsend_detach(void* addr, size_t* size)
{
OPAL_THREAD_LOCK(&mca_pml_bsend_mutex);

Expand All @@ -201,7 +201,7 @@ int mca_pml_base_bsend_detach(void* addr, int* size)
if(NULL != addr)
*((void**)addr) = mca_pml_bsend_userbase;
if(NULL != size)
*size = (int)mca_pml_bsend_usersize;
*size = mca_pml_bsend_usersize;

/* reset local variables */
mca_pml_bsend_userbase = NULL;
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/pml/base/pml_base_bsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ BEGIN_C_DECLS

OMPI_DECLSPEC int mca_pml_base_bsend_init (void);

int mca_pml_base_bsend_attach(void* addr, int size);
int mca_pml_base_bsend_detach(void* addr, int* size);
int mca_pml_base_bsend_attach(void* addr, size_t size);
int mca_pml_base_bsend_detach(void* addr, size_t* size);

OMPI_DECLSPEC int mca_pml_base_bsend_request_alloc(ompi_request_t*);
OMPI_DECLSPEC int mca_pml_base_bsend_request_start(ompi_request_t*);
Expand Down
14 changes: 7 additions & 7 deletions ompi/mpi/c/buffer_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ int MPI_Buffer_attach(void *buffer, int size)
{
int ret = OMPI_SUCCESS;

if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == buffer || size < 0) {
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_ARG, FUNC_NAME);
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == buffer || size < 0) {
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_ARG, FUNC_NAME);
}
}
}

ret = mca_pml_base_bsend_attach(buffer, size);
ret = mca_pml_base_bsend_attach(buffer, size);

return ret;
return ret;
}

18 changes: 11 additions & 7 deletions ompi/mpi/c/buffer_detach.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ static const char FUNC_NAME[] = "MPI_Buffer_detach";

int MPI_Buffer_detach(void *buffer, int *size)
{
size_t size_arg;
int ret = OMPI_SUCCESS;

if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == buffer || NULL == size) {
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_ARG, FUNC_NAME);
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == buffer || NULL == size) {
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_ARG, FUNC_NAME);
}
}
}

ret = mca_pml_base_bsend_detach(buffer, size);
ret = mca_pml_base_bsend_detach(buffer, &size_arg);
if (MPI_SUCCESS == ret) {
*size = (int)size_arg;
}

return ret;
return ret;
}
Loading