1
1
This commit was SVN r921.
Этот коммит содержится в:
Tim Woodall 2004-03-18 20:04:09 +00:00
родитель 4f3bca907f
Коммит cd29faa1e0
12 изменённых файлов: 333 добавлений и 34 удалений

Просмотреть файл

@ -5,13 +5,45 @@
#include <stdio.h> #include <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Bsend_init = PMPI_Bsend_init #pragma weak MPI_Bsend_init = PMPI_Bsend_init
#endif #endif
int MPI_Bsend_init(void *buf, int count, MPI_Datatype datatype, int MPI_Bsend_init(void *buf, int count, MPI_Datatype type,
int dest, int tag, MPI_Comm comm, MPI_Request *request) { int dest, int tag, MPI_Comm comm, MPI_Request *request)
return MPI_SUCCESS; {
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 "lam_config.h"
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Ibsend = PMPI_Ibsend #pragma weak MPI_Ibsend = PMPI_Ibsend
#endif #endif
int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest, int MPI_Ibsend(void *buf, int count, MPI_Datatype type, int dest,
int tag, MPI_Comm comm, MPI_Request *request) { int tag, MPI_Comm comm, MPI_Request *request)
return MPI_SUCCESS; {
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 "lam_config.h"
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Irsend = PMPI_Irsend #pragma weak MPI_Irsend = PMPI_Irsend
#endif #endif
int MPI_Irsend(void *buf, int count, MPI_Datatype datatype, int dest, int MPI_Irsend(void *buf, int count, MPI_Datatype type, int dest,
int tag, MPI_Comm comm, MPI_Request *request) { int tag, MPI_Comm comm, MPI_Request *request)
return MPI_SUCCESS; {
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 "lam_config.h"
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Issend = PMPI_Issend #pragma weak MPI_Issend = PMPI_Issend
#endif #endif
int MPI_Issend(void *buf, int count, MPI_Datatype datatype, int dest, int MPI_Issend(void *buf, int count, MPI_Datatype type, int dest,
int tag, MPI_Comm comm, MPI_Request *request) { int tag, MPI_Comm comm, MPI_Request *request)
return MPI_SUCCESS; {
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 <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Recv_init = PMPI_Recv_init #pragma weak MPI_Recv_init = PMPI_Recv_init
#endif #endif
int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int MPI_Recv_init(void *buf, int count, MPI_Datatype type, int source,
int tag, MPI_Comm comm, MPI_Request *request) { int tag, MPI_Comm comm, MPI_Request *request)
return MPI_SUCCESS; {
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) { if (dest == MPI_PROC_NULL) {
return MPI_SUCCESS; return MPI_SUCCESS;
} }
if ( MPI_PARAM_CHECK ) { if ( MPI_PARAM_CHECK ) {
int rc = MPI_SUCCESS; int rc = MPI_SUCCESS;
if (lam_mpi_finalized) { 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 rc;
} }
} }
return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_READY, comm); return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_READY, comm);
} }

Просмотреть файл

@ -5,14 +5,47 @@
#include <stdio.h> #include <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Rsend_init = PMPI_Rsend_init #pragma weak MPI_Rsend_init = PMPI_Rsend_init
#endif #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, int dest, int tag, MPI_Comm comm,
MPI_Request *request) { MPI_Request *request)
return MPI_SUCCESS; {
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 <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Send_init = PMPI_Send_init #pragma weak MPI_Send_init = PMPI_Send_init
#endif #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, int dest, int tag, MPI_Comm comm,
MPI_Request *request) { MPI_Request *request)
return MPI_SUCCESS; {
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) { if (dest == MPI_PROC_NULL) {
return MPI_SUCCESS; return MPI_SUCCESS;
} }
if ( MPI_PARAM_CHECK ) { if ( MPI_PARAM_CHECK ) {
int rc = MPI_SUCCESS; int rc = MPI_SUCCESS;
if (lam_mpi_finalized) { 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 rc;
} }
} }
return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm); return mca_pml.pml_send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm);
} }

Просмотреть файл

@ -5,14 +5,46 @@
#include <stdio.h> #include <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Ssend_init = PMPI_Ssend_init #pragma weak MPI_Ssend_init = PMPI_Ssend_init
#endif #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, int dest, int tag, MPI_Comm comm,
MPI_Request *request) { MPI_Request *request)
return MPI_SUCCESS; {
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 <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Waitany = PMPI_Waitany #pragma weak MPI_Waitany = PMPI_Waitany
#endif #endif
int MPI_Waitany(int count, MPI_Request *array_of_requests, int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status)
int *index, MPI_Status *status) { {
return MPI_SUCCESS; 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 <stdio.h>
#include "mpi.h" #include "mpi.h"
#include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h"
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES #if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
#pragma weak MPI_Waitsome = PMPI_Waitsome #pragma weak MPI_Waitsome = PMPI_Waitsome
#endif #endif
int MPI_Waitsome(int incount, MPI_Request *array_of_requests,
int *outcount, int *array_of_indices, int MPI_Waitsome(int incount, MPI_Request *requests,
MPI_Status *array_of_statuses) { 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; return MPI_SUCCESS;
} }