Update the proc system to compute and store the number of local procs and my local relative rank during the callback at STG1. This info will be used to locally compute and set the processor affinity and sched_yield (for oversubscribed conditions).
Over to Jeff now for modifying mpi_init accordingly. Until Jeff makes his changes, nobody should see anything different as the new info just isn't used by anything! This commit was SVN r13351.
Этот коммит содержится в:
родитель
94590366f5
Коммит
a338b7e533
@ -79,6 +79,12 @@ void ompi_proc_construct(ompi_proc_t* proc)
|
||||
OPAL_THREAD_LOCK(&ompi_proc_lock);
|
||||
opal_list_append(&ompi_proc_list, (opal_list_item_t*)proc);
|
||||
OPAL_THREAD_UNLOCK(&ompi_proc_lock);
|
||||
|
||||
/* init the number of local procs */
|
||||
proc->num_local_procs = 0;
|
||||
|
||||
/* init my local rank */
|
||||
proc->local_rank = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -599,6 +605,12 @@ static void callback(orte_gpr_notify_data_t *data, void *cbdata)
|
||||
proc->proc_arch = arch;
|
||||
if (0 == strcmp(str, orte_system_info.nodename)) {
|
||||
proc->proc_flags |= OMPI_PROC_FLAG_LOCAL;
|
||||
/* increment the number of procs on my node */
|
||||
ompi_proc_local_proc->num_local_procs++;
|
||||
/* is this vpid < mine? if so, bump my local rank */
|
||||
if (name.vpid < ORTE_PROC_MY_NAME->vpid) {
|
||||
ompi_proc_local_proc->local_rank++;
|
||||
}
|
||||
}
|
||||
|
||||
/* if arch is different than mine, create a
|
||||
|
@ -53,6 +53,10 @@ struct ompi_proc_t {
|
||||
char *proc_hostname;
|
||||
/** flags for this proc */
|
||||
uint8_t proc_flags;
|
||||
/** number of local procs sharing this node */
|
||||
uint8_t num_local_procs;
|
||||
/** my local rank */
|
||||
orte_vpid_t local_rank;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user