1
1

Allow an arbitrary list of procs to be passed to the resolve function,

instead of just the procs for MCW (in MCW order).  Should make resolving
ptl_process_id_t structures for arbitrary communicators easier for
applications that need it.

This commit was SVN r15393.
Этот коммит содержится в:
Brian Barrett 2007-07-12 20:55:44 +00:00
родитель 73273397f5
Коммит d4950c6aa1

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

@ -92,24 +92,23 @@ ompi_common_portals_get_procs(size_t nprocs,
int i; int i;
/* /*
* FIXME - XXX - FIXME * assumption that the vpid of the process name is the rank in the
* BWB - implicit assumption that cnos procs list will match our * nidpid map. THis will not be true if someone changes the sds
* procs list. Don't know what to do about that... * component...
*/ */
nptl_procs = cnos_get_nidpid_map(&map); nptl_procs = cnos_get_nidpid_map(&map);
if (nptl_procs <= 0) { if (nptl_procs <= 0) {
opal_output(0, "%5d: cnos_get_nidpid_map() returned %d", opal_output(0, "%5d: cnos_get_nidpid_map() returned %d",
cnos_get_rank(), nptl_procs); cnos_get_rank(), nptl_procs);
return OMPI_ERR_FATAL; return OMPI_ERR_FATAL;
} else if (nptl_procs != nprocs) {
opal_output(0, "%5d: nptl_procs != nprocs (%d, %d)", nptl_procs,
cnos_get_rank(), nprocs);
return OMPI_ERR_FATAL;
} }
for (i = 0 ; i < nprocs ; ++i) { for (i = 0 ; i < nprocs ; ++i) {
portals_procs[i].nid = map[i].nid; size_t idx = (size_t) procs[i]->proc_name.vpid;
portals_procs[i].pid = map[i].pid; if (idx >= nptl_procs) return OMPI_ERR_NOT_FOUND;
portals_procs[i].nid = map[idx].nid;
portals_procs[i].pid = map[idx].pid;
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;