Update MPROBE, IMPROBE, MRECV, IMRECV with the behavior described in
MPI-3 ticket 328: https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/328. Add MPI_MESSAGE_NO_PROC constant. This commit was SVN r26115.
Этот коммит содержится в:
родитель
164ee92f22
Коммит
91b80630aa
@ -765,7 +765,9 @@ OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_empty;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_group_t ompi_mpi_group_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_request_t ompi_request_null;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_message_t ompi_message_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_message_t ompi_message_no_proc;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_op_t ompi_mpi_op_min;
|
||||
@ -894,6 +896,8 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
|
||||
#define MPI_GROUP_EMPTY OMPI_PREDEFINED_GLOBAL(MPI_Group, ompi_mpi_group_empty)
|
||||
|
||||
#define MPI_MESSAGE_NO_PROC OMPI_PREDEFINED_GLOBAL(MPI_Message, ompi_message_no_proc)
|
||||
|
||||
#define MPI_MAX OMPI_PREDEFINED_GLOBAL(MPI_Op, ompi_mpi_op_max)
|
||||
#define MPI_MIN OMPI_PREDEFINED_GLOBAL(MPI_Op, ompi_mpi_op_min)
|
||||
#define MPI_SUM OMPI_PREDEFINED_GLOBAL(MPI_Op, ompi_mpi_op_sum)
|
||||
|
@ -10,7 +10,7 @@
|
||||
! 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) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
! Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
! Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
|
||||
! $COPYRIGHT$
|
||||
@ -400,12 +400,14 @@
|
||||
integer MPI_COMM_WORLD, MPI_COMM_SELF
|
||||
integer MPI_GROUP_EMPTY
|
||||
integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
|
||||
integer MPI_MESSAGE_NO_PROC
|
||||
|
||||
parameter (MPI_COMM_WORLD=0)
|
||||
parameter (MPI_COMM_SELF=1)
|
||||
parameter (MPI_GROUP_EMPTY=1)
|
||||
parameter (MPI_ERRORS_ARE_FATAL=1)
|
||||
parameter (MPI_ERRORS_RETURN=2)
|
||||
parameter (MPI_MESSAGE_NO_PROC=1)
|
||||
|
||||
integer MPI_BYTE, MPI_PACKED, MPI_UB, MPI_LB
|
||||
integer MPI_CHARACTER, MPI_LOGICAL
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/constants.h"
|
||||
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "ompi/message/message.h"
|
||||
#include "ompi/constants.h"
|
||||
@ -24,6 +26,7 @@ opal_free_list_t ompi_message_free_list;
|
||||
opal_pointer_array_t ompi_message_f_to_c_table;
|
||||
|
||||
ompi_predefined_message_t ompi_message_null;
|
||||
ompi_predefined_message_t ompi_message_no_proc;
|
||||
|
||||
static void ompi_message_constructor(ompi_message_t *msg)
|
||||
{
|
||||
@ -51,12 +54,21 @@ ompi_message_init(void)
|
||||
ompi_message_null.message.m_f_to_c_index =
|
||||
opal_pointer_array_add(&ompi_message_f_to_c_table, &ompi_message_null);
|
||||
|
||||
OBJ_CONSTRUCT(&ompi_message_no_proc, ompi_message_t);
|
||||
ompi_message_no_proc.message.m_f_to_c_index =
|
||||
opal_pointer_array_add(&ompi_message_f_to_c_table,
|
||||
&ompi_message_no_proc);
|
||||
if (1 != ompi_message_no_proc.message.m_f_to_c_index) {
|
||||
return OMPI_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
ompi_message_finalize(void)
|
||||
{
|
||||
OBJ_DESTRUCT(&ompi_message_no_proc);
|
||||
OBJ_DESTRUCT(&ompi_message_free_list);
|
||||
OBJ_DESTRUCT(&ompi_message_f_to_c_table);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -51,6 +52,7 @@ int ompi_message_finalize(void);
|
||||
|
||||
OMPI_DECLSPEC extern opal_free_list_t ompi_message_free_list;
|
||||
OMPI_DECLSPEC extern opal_pointer_array_t ompi_message_f_to_c_table;
|
||||
OMPI_DECLSPEC extern ompi_predefined_message_t ompi_message_no_proc;
|
||||
|
||||
static inline
|
||||
ompi_message_t*
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -56,12 +57,12 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag,
|
||||
if (MPI_PROC_NULL == source) {
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
*status = ompi_request_empty.req_status;
|
||||
/*
|
||||
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
|
||||
*/
|
||||
/* Per MPI-1, the MPI_ERROR field is not defined for
|
||||
single-completion calls */
|
||||
MEMCHECKER(
|
||||
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
|
||||
);
|
||||
*message = &ompi_message_no_proc.message;
|
||||
}
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
@ -69,9 +70,8 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag,
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
rc = MCA_PML_CALL(improbe(source, tag, comm, flag, message, status));
|
||||
/*
|
||||
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
|
||||
*/
|
||||
/* Per MPI-1, the MPI_ERROR field is not defined for
|
||||
single-completion calls */
|
||||
MEMCHECKER(
|
||||
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
|
||||
);
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -56,6 +57,11 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype type,
|
||||
comm = (*message)->comm;
|
||||
}
|
||||
|
||||
if (&ompi_message_no_proc.message == *message) {
|
||||
*request = &ompi_request_empty;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
rc = MCA_PML_CALL(imrecv(buf, count, type, message, request));
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -56,12 +57,12 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm,
|
||||
if (MPI_PROC_NULL == source) {
|
||||
if (MPI_STATUS_IGNORE != status) {
|
||||
*status = ompi_request_empty.req_status;
|
||||
/*
|
||||
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
|
||||
*/
|
||||
/* Per MPI-1, the MPI_ERROR field is not defined for
|
||||
single-completion calls */
|
||||
MEMCHECKER(
|
||||
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
|
||||
);
|
||||
*message = &ompi_message_no_proc.message;
|
||||
}
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
@ -69,9 +70,8 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm,
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
rc = MCA_PML_CALL(mprobe(source, tag, comm, message, status));
|
||||
/*
|
||||
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
|
||||
*/
|
||||
/* Per MPI-1, the MPI_ERROR field is not defined for
|
||||
single-completion calls */
|
||||
MEMCHECKER(
|
||||
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
|
||||
);
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -56,12 +57,16 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype type,
|
||||
comm = (*message)->comm;
|
||||
}
|
||||
|
||||
if (&ompi_message_no_proc.message == *message) {
|
||||
*status = ompi_request_empty.req_status;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
rc = MCA_PML_CALL(mrecv(buf, count, type, message, status));
|
||||
/*
|
||||
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
|
||||
*/
|
||||
/* Per MPI-1, the MPI_ERROR field is not defined for
|
||||
single-completion calls */
|
||||
MEMCHECKER(
|
||||
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
|
||||
);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user