Коммит
e964608b90
@ -612,6 +612,7 @@ ompi_proc_pack(ompi_proc_t **proclist, int proclistsize,
|
||||
opal_buffer_t* buf)
|
||||
{
|
||||
int rc;
|
||||
char *nspace;
|
||||
|
||||
OPAL_THREAD_LOCK(&ompi_proc_lock);
|
||||
|
||||
@ -628,18 +629,30 @@ ompi_proc_pack(ompi_proc_t **proclist, int proclistsize,
|
||||
* can be sent.
|
||||
*/
|
||||
for (int i = 0 ; i < proclistsize ; ++i) {
|
||||
/* send proc name */
|
||||
rc = opal_dss.pack(buf, &(proclist[i]->super.proc_name), 1, OMPI_NAME);
|
||||
if(rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&ompi_proc_lock);
|
||||
return rc;
|
||||
}
|
||||
/* retrieve and send the corresponding nspace for this job
|
||||
* as the remote side may not know the translation */
|
||||
nspace = (char*)opal_pmix.get_nspace(proclist[i]->super.proc_name.jobid);
|
||||
rc = opal_dss.pack(buf, &nspace, 1, OPAL_STRING);
|
||||
if(rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&ompi_proc_lock);
|
||||
return rc;
|
||||
}
|
||||
/* pack architecture flag */
|
||||
rc = opal_dss.pack(buf, &(proclist[i]->super.proc_arch), 1, OPAL_UINT32);
|
||||
if(rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&ompi_proc_lock);
|
||||
return rc;
|
||||
}
|
||||
/* pass the name of the host this proc is on */
|
||||
rc = opal_dss.pack(buf, &(proclist[i]->super.proc_hostname), 1, OPAL_STRING);
|
||||
if(rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
@ -719,6 +732,7 @@ ompi_proc_unpack(opal_buffer_t* buf,
|
||||
char *new_hostname;
|
||||
bool isnew = false;
|
||||
int rc;
|
||||
char *nspace;
|
||||
|
||||
rc = opal_dss.unpack(buf, &new_name, &count, OMPI_NAME);
|
||||
if (rc != OPAL_SUCCESS) {
|
||||
@ -727,6 +741,15 @@ ompi_proc_unpack(opal_buffer_t* buf,
|
||||
free(newprocs);
|
||||
return rc;
|
||||
}
|
||||
rc = opal_dss.unpack(buf, &nspace, &count, OPAL_STRING);
|
||||
if (rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
free(plist);
|
||||
free(newprocs);
|
||||
return rc;
|
||||
}
|
||||
opal_pmix.register_jobid(new_name.jobid, nspace);
|
||||
free(nspace);
|
||||
rc = opal_dss.unpack(buf, &new_arch, &count, OPAL_UINT32);
|
||||
if (rc != OPAL_SUCCESS) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
|
@ -821,7 +821,7 @@ static int cray_store_local(const opal_process_name_t *proc,
|
||||
|
||||
static const char *cray_get_nspace(opal_jobid_t jobid)
|
||||
{
|
||||
return NULL;
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
static void cray_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||
|
@ -650,7 +650,7 @@ static int s1_store_local(const opal_process_name_t *proc,
|
||||
|
||||
static const char *s1_get_nspace(opal_jobid_t jobid)
|
||||
{
|
||||
return NULL;
|
||||
return "N/A";
|
||||
}
|
||||
static void s1_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||
{
|
||||
|
@ -669,7 +669,7 @@ static int s2_store_local(const opal_process_name_t *proc,
|
||||
|
||||
static const char *s2_get_nspace(opal_jobid_t jobid)
|
||||
{
|
||||
return NULL;
|
||||
return "N/A";
|
||||
}
|
||||
static void s2_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||
{
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user