1
1

Remove IOF related utilities from tool communication lib - IOF has now been updated to include tool support directly.

This commit was SVN r20160.
Этот коммит содержится в:
Ralph Castain 2008-12-20 23:25:56 +00:00
родитель caa5771908
Коммит aff3d1df21
2 изменённых файлов: 0 добавлений и 199 удалений

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

@ -232,193 +232,6 @@ int orte_util_comm_query_proc_info(const orte_process_name_t *hnp, orte_jobid_t
return ORTE_SUCCESS;
}
int orte_util_comm_attach_stdout(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid, int fd)
{
opal_buffer_t buf;
orte_daemon_cmd_flag_t command;
orte_std_cntr_t count;
int rc, ret=ORTE_ERROR;
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stdout: requesting HNP %s attach stdio for job %s vpid %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(hnp),
ORTE_JOBID_PRINT(job),
ORTE_VPID_PRINT(vpid)));
/* setup the buffer */
OBJ_CONSTRUCT(&buf, opal_buffer_t);
/* tell the HNP we are requesting attach stdout */
command = ORTE_DAEMON_ATTACH_STDOUT_CMD;
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &command, 1, ORTE_DAEMON_CMD))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the jobid */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &job, 1, ORTE_JOBID))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the vpid */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &vpid, 1, ORTE_VPID))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the file descriptor */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &fd, 1, OPAL_INT))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stdout: sending request to HNP %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(hnp)));
/* tell the target HNP to launch the job */
if (0 > (rc = orte_rml.send_buffer((orte_process_name_t*)hnp, &buf, ORTE_RML_TAG_DAEMON, 0))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
OBJ_DESTRUCT(&buf);
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stdout: waiting for response",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
/* wait for the target's response */
OBJ_CONSTRUCT(&buf, opal_buffer_t);
if (0 > (rc = orte_rml.recv_buffer(ORTE_NAME_WILDCARD, &buf, ORTE_RML_TAG_TOOL, 0))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* get the status code */
count = 1;
if (ORTE_SUCCESS != (rc = opal_dss.unpack(&buf, &ret, &count, OPAL_INT))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
CLEANUP:
OBJ_DESTRUCT(&buf);
return rc;
}
int orte_util_comm_attach_stderr(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid, int fd)
{
opal_buffer_t buf;
orte_daemon_cmd_flag_t command;
orte_std_cntr_t count;
int rc, ret=ORTE_ERROR;
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stderr: requesting HNP %s attach stderr for job %s vpid %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(hnp),
ORTE_JOBID_PRINT(job),
ORTE_VPID_PRINT(vpid)));
/* setup the buffer */
OBJ_CONSTRUCT(&buf, opal_buffer_t);
/* tell the HNP we are requesting attach stdout */
command = ORTE_DAEMON_ATTACH_STDERR_CMD;
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &command, 1, ORTE_DAEMON_CMD))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the jobid */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &job, 1, ORTE_JOBID))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the vpid */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &vpid, 1, ORTE_VPID))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* pack the file descriptor */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &fd, 1, OPAL_INT))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stderr: sending request to HNP %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(hnp)));
/* tell the target HNP to launch the job */
if (0 > (rc = orte_rml.send_buffer((orte_process_name_t*)hnp, &buf, ORTE_RML_TAG_DAEMON, 0))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
OBJ_DESTRUCT(&buf);
OPAL_OUTPUT_VERBOSE((5, orte_debug_output,
"%s util_comm_attach_stderr: waiting for response",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
/* wait for the target's response */
OBJ_CONSTRUCT(&buf, opal_buffer_t);
if (0 > (rc = orte_rml.recv_buffer(ORTE_NAME_WILDCARD, &buf, ORTE_RML_TAG_TOOL, 0))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
/* get the status code */
count = 1;
if (ORTE_SUCCESS != (rc = opal_dss.unpack(&buf, &ret, &count, OPAL_INT))) {
ORTE_ERROR_LOG(rc);
ret = rc;
goto CLEANUP;
}
CLEANUP:
OBJ_DESTRUCT(&buf);
return rc;
}
int orte_util_comm_detach_stdout(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_util_comm_detach_stderr(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid)
{
return ORTE_ERR_NOT_SUPPORTED;
}
/* The spawn function cannot just call the plm.proxy since that won't
* necessarily be open. Likewise, we can't just send the launch request
* to the HNP's plm_receive as that function would return the response

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

@ -43,18 +43,6 @@ ORTE_DECLSPEC int orte_util_comm_query_node_info(const orte_process_name_t *hnp,
ORTE_DECLSPEC int orte_util_comm_query_proc_info(const orte_process_name_t *hnp, orte_jobid_t job, orte_vpid_t vpid,
int *num_procs, orte_proc_t ***proc_info_array);
ORTE_DECLSPEC int orte_util_comm_attach_stdout(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid, int fd);
ORTE_DECLSPEC int orte_util_comm_attach_stderr(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid, int fd);
ORTE_DECLSPEC int orte_util_comm_detach_stdout(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid);
ORTE_DECLSPEC int orte_util_comm_detach_stderr(const orte_process_name_t *hnp,
orte_jobid_t job, orte_vpid_t vpid);
ORTE_DECLSPEC int orte_util_comm_spawn_job(const orte_process_name_t *hnp, orte_job_t *jdata);
ORTE_DECLSPEC int orte_util_comm_terminate_job(const orte_process_name_t *hnp, orte_jobid_t job);