additional p2p i/f functions
This commit was SVN r921.
Этот коммит содержится в:
родитель
4f3bca907f
Коммит
cd29faa1e0
@ -5,13 +5,45 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Bsend_init = PMPI_Bsend_init
|
||||
#endif
|
||||
|
||||
int MPI_Bsend_init(void *buf, int count, MPI_Datatype datatype,
|
||||
int dest, int tag, MPI_Comm comm, MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Bsend_init(void *buf, int count, MPI_Datatype type,
|
||||
int dest, int tag, MPI_Comm comm, MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm, request);;
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,46 @@
|
||||
#include "lam_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Ibsend = PMPI_Ibsend
|
||||
#endif
|
||||
|
||||
int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Ibsend(void *buf, int count, MPI_Datatype type, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend(buf,count,type,dest,tag,MCA_PML_BASE_SEND_BUFFERED,comm,request);
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,46 @@
|
||||
#include "lam_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Irsend = PMPI_Irsend
|
||||
#endif
|
||||
|
||||
int MPI_Irsend(void *buf, int count, MPI_Datatype datatype, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Irsend(void *buf, int count, MPI_Datatype type, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend(buf,count,type,dest,tag,MCA_PML_BASE_SEND_READY,comm,request);
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,46 @@
|
||||
#include "lam_config.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Issend = PMPI_Issend
|
||||
#endif
|
||||
|
||||
int MPI_Issend(void *buf, int count, MPI_Datatype datatype, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Issend(void *buf, int count, MPI_Datatype type, int dest,
|
||||
int tag, MPI_Comm comm, MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend(buf,count,type,dest,tag,MCA_PML_BASE_SEND_SYNCHRONOUS,comm,request);
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,43 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Recv_init = PMPI_Recv_init
|
||||
#endif
|
||||
|
||||
int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
|
||||
int tag, MPI_Comm comm, MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Recv_init(void *buf, int count, MPI_Datatype type, int source,
|
||||
int tag, MPI_Comm comm, MPI_Request *request)
|
||||
{
|
||||
if (source == MPI_PROC_NULL) {
|
||||
return mca_pml.pml_null(request);
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (source != MPI_ANY_SOURCE && source != MPI_PROC_NULL && lam_comm_peer_invalid(comm, source)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
return mca_pml.pml_irecv_init(buf,count,type,source,tag,comm,request);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ int MPI_Rsend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
@ -41,6 +41,6 @@ int MPI_Rsend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_READY, comm);
|
||||
}
|
||||
|
@ -5,14 +5,47 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Rsend_init = PMPI_Rsend_init
|
||||
#endif
|
||||
|
||||
int MPI_Rsend_init(void *buf, int count, MPI_Datatype datatype,
|
||||
int MPI_Rsend_init(void *buf, int count, MPI_Datatype type,
|
||||
int dest, int tag, MPI_Comm comm,
|
||||
MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_READY, comm, request);;
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,47 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Send_init = PMPI_Send_init
|
||||
#endif
|
||||
|
||||
int MPI_Send_init(void *buf, int count, MPI_Datatype datatype,
|
||||
int MPI_Send_init(void *buf, int count, MPI_Datatype type,
|
||||
int dest, int tag, MPI_Comm comm,
|
||||
MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_STANDARD, comm, request);;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ int MPI_Ssend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
@ -41,7 +41,7 @@ int MPI_Ssend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm);
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,46 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Ssend_init = PMPI_Ssend_init
|
||||
#endif
|
||||
|
||||
int MPI_Ssend_init(void *buf, int count, MPI_Datatype datatype,
|
||||
int MPI_Ssend_init(void *buf, int count, MPI_Datatype type,
|
||||
int dest, int tag, MPI_Comm comm,
|
||||
MPI_Request *request) {
|
||||
return MPI_SUCCESS;
|
||||
MPI_Request *request)
|
||||
{
|
||||
if (dest == MPI_PROC_NULL) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (count < 0) {
|
||||
rc = MPI_ERR_COUNT;
|
||||
#if 0
|
||||
} else if (type == MPI_DATATYPE_NULL) {
|
||||
rc = MPI_ERR_TYPE;
|
||||
#endif
|
||||
} else if (tag < 0 || tag > MPI_TAG_UB_VALUE) {
|
||||
rc = MPI_ERR_TAG;
|
||||
} else if (lam_comm_invalid(comm)) {
|
||||
rc = MPI_ERR_COMM;
|
||||
} else if (lam_comm_peer_invalid(comm, dest)) {
|
||||
rc = MPI_ERR_RANK;
|
||||
} else if (request == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return mca_pml.pml_isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm, request);;
|
||||
}
|
||||
|
@ -5,13 +5,27 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Waitany = PMPI_Waitany
|
||||
#endif
|
||||
|
||||
int MPI_Waitany(int count, MPI_Request *array_of_requests,
|
||||
int *index, MPI_Status *status) {
|
||||
return MPI_SUCCESS;
|
||||
int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status)
|
||||
{
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (requests == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
return mca_pml.pml_wait(count, requests, index, status);
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,40 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
||||
#pragma weak MPI_Waitsome = PMPI_Waitsome
|
||||
#endif
|
||||
|
||||
int MPI_Waitsome(int incount, MPI_Request *array_of_requests,
|
||||
int *outcount, int *array_of_indices,
|
||||
MPI_Status *array_of_statuses) {
|
||||
|
||||
int MPI_Waitsome(int incount, MPI_Request *requests,
|
||||
int *outcount, int *indices,
|
||||
MPI_Status *statuses)
|
||||
{
|
||||
int index;
|
||||
int rc;
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int rc = MPI_SUCCESS;
|
||||
if (lam_mpi_finalized) {
|
||||
rc = MPI_ERR_INTERN;
|
||||
} else if (requests == NULL) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
}
|
||||
if (rc != MPI_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
/* optimize this in the future */
|
||||
if((rc = mca_pml.pml_wait(incount, requests, &index, statuses)) != LAM_SUCCESS)
|
||||
return rc;
|
||||
*outcount = 1;
|
||||
indices[0] = index;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user