Skip to content

Commit f6a9dc2

Browse files
authored
Merge pull request #12995 from rhc54/topic/dpm
Remove unnecessary qsort operation
2 parents 69dc361 + a4e0016 commit f6a9dc2

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

ompi/dpm/dpm.c

-16
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,6 @@ int ompi_dpm_init(void)
100100
return OMPI_SUCCESS;
101101
}
102102

103-
static int compare_pmix_proc(const void *a, const void *b)
104-
{
105-
const pmix_proc_t *proc_a = (pmix_proc_t *)a;
106-
const pmix_proc_t *proc_b = (pmix_proc_t *)b;
107-
108-
int nspace_dif = strncmp(proc_a->nspace, proc_b->nspace, PMIX_MAX_NSLEN);
109-
if (nspace_dif != 0)
110-
return nspace_dif;
111-
112-
return proc_a->rank - proc_b->rank;
113-
}
114-
115103
int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
116104
const char *port_string, bool send_first,
117105
ompi_communicator_t **newcomm)
@@ -395,10 +383,6 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
395383
PMIX_INFO_CONSTRUCT(&tinfo);
396384
PMIX_INFO_LOAD(&tinfo, PMIX_TIMEOUT, &ompi_pmix_connect_timeout, PMIX_UINT32);
397385

398-
/*
399-
* sort procs so that all ranks call PMIx_Connect() with the processes in same order
400-
*/
401-
qsort(procs, nprocs, sizeof(pmix_proc_t), compare_pmix_proc);
402386
pret = PMIx_Connect(procs, nprocs, &tinfo, 1);
403387
PMIX_INFO_DESTRUCT(&tinfo);
404388
PMIX_PROC_FREE(procs, nprocs);

0 commit comments

Comments
 (0)