Remove a hard-coded limit of 64 independent jobs that could connect/accept together
This commit was SVN r23378.
Этот коммит содержится в:
родитель
8de5654bf9
Коммит
84d63a46cd
@ -227,13 +227,17 @@ void ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj *
|
|||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
#define OMPI_DPM_BASE_MAXJOBIDS 64
|
/* All we want to do in this function is determine if the number of
|
||||||
|
* jobids in the local and/or remote group is > 1. This tells us to
|
||||||
|
* set the disconnect flag. We don't actually care what the true
|
||||||
|
* number -is-, only that it is > 1
|
||||||
|
*/
|
||||||
void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm)
|
void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm)
|
||||||
{
|
{
|
||||||
int i, j, numjobids=0;
|
int i;
|
||||||
int size, rsize;
|
int size, rsize;
|
||||||
int found;
|
bool found=false;
|
||||||
orte_jobid_t jobids[OMPI_DPM_BASE_MAXJOBIDS], thisjobid;
|
orte_jobid_t thisjobid;
|
||||||
ompi_group_t *grp=NULL;
|
ompi_group_t *grp=NULL;
|
||||||
ompi_proc_t *proc = NULL;
|
ompi_proc_t *proc = NULL;
|
||||||
|
|
||||||
@ -245,44 +249,38 @@ void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm)
|
|||||||
size = ompi_comm_size (comm);
|
size = ompi_comm_size (comm);
|
||||||
rsize = ompi_comm_remote_size(comm);
|
rsize = ompi_comm_remote_size(comm);
|
||||||
|
|
||||||
/* loop over all processes in local group and count number
|
/* loop over all processes in local group and check for
|
||||||
of different jobids. */
|
* a different jobid
|
||||||
|
*/
|
||||||
grp = comm->c_local_group;
|
grp = comm->c_local_group;
|
||||||
for (i=0; i< size; i++) {
|
proc = ompi_group_peer_lookup(grp,0);
|
||||||
|
thisjobid = proc->proc_name.jobid;
|
||||||
|
|
||||||
|
for (i=1; i< size; i++) {
|
||||||
proc = ompi_group_peer_lookup(grp,i);
|
proc = ompi_group_peer_lookup(grp,i);
|
||||||
thisjobid = proc->proc_name.jobid;
|
if (thisjobid != proc->proc_name.jobid) {
|
||||||
found = 0;
|
found = true;
|
||||||
for ( j=0; j<numjobids; j++) {
|
goto complete;
|
||||||
if (thisjobid == jobids[j]) {
|
|
||||||
found = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found ) {
|
|
||||||
jobids[numjobids++] = thisjobid;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if inter-comm, loop over all processes in remote_group
|
/* if inter-comm, loop over all processes in remote_group
|
||||||
and count number of different jobids */
|
* and perform the same check
|
||||||
|
*/
|
||||||
grp = comm->c_remote_group;
|
grp = comm->c_remote_group;
|
||||||
for (i=0; i< rsize; i++) {
|
proc = ompi_group_peer_lookup(grp,0);
|
||||||
|
thisjobid = proc->proc_name.jobid;
|
||||||
|
for (i=1; i< rsize; i++) {
|
||||||
proc = ompi_group_peer_lookup(grp,i);
|
proc = ompi_group_peer_lookup(grp,i);
|
||||||
thisjobid = proc->proc_name.jobid;
|
if (thisjobid != proc->proc_name.jobid) {
|
||||||
found = 0;
|
found = true;
|
||||||
for ( j=0; j<numjobids; j++) {
|
break;
|
||||||
if ( thisjobid == jobids[j]) {
|
|
||||||
found = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found ) {
|
|
||||||
jobids[numjobids++] = thisjobid;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if number of joibds larger than one, set the disconnect flag*/
|
complete:
|
||||||
if ( numjobids > 1 ) {
|
/* if a different jobid was found, set the disconnect flag*/
|
||||||
|
if (found) {
|
||||||
ompi_comm_num_dyncomm++;
|
ompi_comm_num_dyncomm++;
|
||||||
OMPI_COMM_SET_DYNAMIC(comm);
|
OMPI_COMM_SET_DYNAMIC(comm);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user