fixing the "no MPI-objects underneath the MPI-library functions" problem.
Exchanged therefore MPI_Comm by lam_communicator_t* and MPI_Group by lam_group_t* when calling some internal functions. This commit was SVN r1001.
Этот коммит содержится в:
родитель
6932553a35
Коммит
c6dcaae786
@ -35,6 +35,7 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) {
|
||||
"MPI_Comm_create");
|
||||
}
|
||||
|
||||
rc = lam_comm_create ( comm, group, newcomm );
|
||||
rc = lam_comm_create ( (lam_communicator_t*)comm, (lam_group_t*)group,
|
||||
(lam_communicator_t**)newcomm );
|
||||
LAM_ERRHANDLER_RETURN ( rc, comm, rc, "MPI_Comm_create");
|
||||
}
|
||||
|
@ -83,5 +83,6 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) {
|
||||
return LAM_ERRHANDLER_INVOKE ( comm, rc, "MPI_Comm_dup");
|
||||
}
|
||||
|
||||
*newcomm = (MPI_Comm) newcomp;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) {
|
||||
|
||||
lam_communicator_t* comp;
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
if ( lam_mpi_finalized )
|
||||
return LAM_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_INTERN,
|
||||
@ -33,10 +35,11 @@ int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length) {
|
||||
"MPI_Comm_get_name");
|
||||
}
|
||||
|
||||
comp = (lam_communicator_t*) comm;
|
||||
|
||||
if ( comm->c_flags & LAM_COMM_NAMEISSET ) {
|
||||
strncpy ( name, comm->c_name, MPI_MAX_OBJECT_NAME );
|
||||
*length = strlen ( comm->c_name );
|
||||
if ( comp->c_flags & LAM_COMM_NAMEISSET ) {
|
||||
strncpy ( name, comp->c_name, MPI_MAX_OBJECT_NAME );
|
||||
*length = strlen ( comp->c_name );
|
||||
}
|
||||
else {
|
||||
memset ( name, 0, MPI_MAX_OBJECT_NAME );
|
||||
|
@ -33,6 +33,6 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) {
|
||||
} /* end if ( MPI_PARAM_CHECK) */
|
||||
|
||||
|
||||
rc = lam_comm_group ( comm, group );
|
||||
rc = lam_comm_group ( (lam_communicator_t*)comm, (lam_group_t**)group );
|
||||
LAM_ERRHANDLER_RETURN ( rc, comm, rc, "MPI_Comm_group");
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank) {
|
||||
"MPI_Comm_rank");
|
||||
}
|
||||
|
||||
*rank = lam_comm_rank(comm);
|
||||
*rank = lam_comm_rank((lam_communicator_t*)comm);
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,6 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size) {
|
||||
"MPI_Comm_remote_size");
|
||||
}
|
||||
|
||||
*size = lam_comm_remote_size (comm);
|
||||
*size = lam_comm_remote_size ((lam_communicator_t*)comm);
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
int MPI_Comm_set_name(MPI_Comm comm, char *name) {
|
||||
|
||||
lam_communicator_t* comp;
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
if ( lam_mpi_finalized )
|
||||
@ -37,9 +38,11 @@ int MPI_Comm_set_name(MPI_Comm comm, char *name) {
|
||||
/* -- Thread safety entrance -- */
|
||||
|
||||
/* Copy in the name */
|
||||
strncpy(comm->c_name, name, MPI_MAX_OBJECT_NAME);
|
||||
comm->c_name[MPI_MAX_OBJECT_NAME - 1] = 0;
|
||||
comm->c_flags |= LAM_COMM_NAMEISSET;
|
||||
comp = (lam_communicator_t*) comm;
|
||||
|
||||
strncpy(comp->c_name, name, MPI_MAX_OBJECT_NAME);
|
||||
comp->c_name[MPI_MAX_OBJECT_NAME - 1] = 0;
|
||||
comp->c_flags |= LAM_COMM_NAMEISSET;
|
||||
|
||||
/* -- Tracing information for new communicator name -- */
|
||||
#if 0
|
||||
|
@ -28,6 +28,6 @@ int MPI_Comm_size(MPI_Comm comm, int *size) {
|
||||
return LAM_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, "MPI_Comm_size");
|
||||
}
|
||||
|
||||
*size = lam_comm_size(comm);
|
||||
*size = lam_comm_size((lam_communicator_t*)comm);
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {
|
||||
"MPI_Comm_split");
|
||||
}
|
||||
|
||||
rc = lam_comm_split ( comm, color, key, newcomm );
|
||||
rc = lam_comm_split ( (lam_communicator_t*)comm, color, key,
|
||||
(lam_communicator_t**)newcomm );
|
||||
LAM_ERRHANDLER_RETURN ( rc, comm, rc, "MPI_Comm_split");
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user