1
1

Remove stale code and API from the RML/OOB frameworks. Stopped using this code years ago.

This commit was SVN r24153.
Этот коммит содержится в:
Ralph Castain 2010-12-05 15:58:21 +00:00
родитель b4355408f5
Коммит 2dc5cbb483
11 изменённых файлов: 0 добавлений и 217 удалений

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

@ -64,7 +64,6 @@ typedef int (*mca_oob_base_module_set_addr_fn_t)(const orte_process_name_t* peer
const char* uri);
typedef int (*mca_oob_base_module_get_new_name_fn_t)(orte_process_name_t*);
/**
* Implementation of mca_oob_ping().
@ -166,7 +165,6 @@ struct mca_oob_1_0_0_t {
mca_oob_base_module_get_addr_fn_t oob_get_addr;
mca_oob_base_module_set_addr_fn_t oob_set_addr;
mca_oob_base_module_get_new_name_fn_t oob_get_new_name;
mca_oob_base_module_ping_fn_t oob_ping;
mca_oob_base_module_send_nb_fn_t oob_send_nb;

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

@ -142,7 +142,6 @@ mca_oob_t mca_oob_tcp = {
mca_oob_tcp_get_addr,
mca_oob_tcp_set_addr,
mca_oob_tcp_get_new_name,
mca_oob_tcp_ping,
mca_oob_tcp_send_nb,
@ -2038,55 +2037,3 @@ int mca_oob_tcp_ft_event(int state) {
return exit_status;
}
#endif
int
mca_oob_tcp_get_new_name(orte_process_name_t* name)
{
mca_oob_tcp_peer_t* peer = mca_oob_tcp_peer_lookup(ORTE_PROC_MY_HNP);
mca_oob_tcp_msg_t* msg;
int rc;
if(NULL == peer)
return ORTE_ERR_UNREACH;
MCA_OOB_TCP_MSG_ALLOC(msg, rc);
if(NULL == msg) {
return rc;
}
if(mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_ALL) {
opal_output(0, "%s-%s mca_oob_tcp_get_new_name: starting\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(&(peer->peer_name)));
}
/* turn the size to network byte order so there will be no problems */
msg->msg_hdr.msg_type = MCA_OOB_TCP_PING;
msg->msg_hdr.msg_size = 0;
msg->msg_hdr.msg_tag = 0;
msg->msg_hdr.msg_src = *ORTE_NAME_INVALID;
msg->msg_hdr.msg_dst = *ORTE_PROC_MY_HNP;
MCA_OOB_TCP_HDR_HTON(&msg->msg_hdr);
rc = mca_oob_tcp_peer_send(peer, msg);
if(rc != ORTE_SUCCESS) {
if (OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_ADDRESSEE_UNKNOWN) {
MCA_OOB_TCP_MSG_RETURN(msg);
}
return rc;
}
mca_oob_tcp_msg_wait(msg, &rc);
if (ORTE_SUCCESS == rc) {
*name = *ORTE_PROC_MY_NAME;
if(mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_ALL) {
opal_output(0, "%s mca_oob_tcp_get_new_name: done\n",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
}
}
return rc;
}

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

@ -68,114 +68,6 @@ static void mca_oob_tcp_msg_destruct(mca_oob_tcp_msg_t* msg)
}
/*
* Wait for a msg to complete.
* @param msg (IN) Message to wait on.
* @param rc (OUT) Return code (number of bytes read on success or error code on failure).
* @retval ORTE_SUCCESS or error code on failure.
*/
int mca_oob_tcp_msg_wait(mca_oob_tcp_msg_t* msg, int* rc)
{
#if ORTE_ENABLE_PROGRESS_THREADS
OPAL_THREAD_LOCK(&msg->msg_lock);
while(msg->msg_complete == false) {
if(opal_event_progress_thread()) {
int rc;
OPAL_THREAD_UNLOCK(&msg->msg_lock);
rc = opal_event_loop(opal_event_base, OPAL_EVLOOP_ONCE);
assert(rc >= 0);
OPAL_THREAD_LOCK(&msg->msg_lock);
} else {
opal_condition_wait(&msg->msg_condition, &msg->msg_lock);
}
}
OPAL_THREAD_UNLOCK(&msg->msg_lock);
#else
/* wait for message to complete */
while(msg->msg_complete == false) {
/* msg_wait() is used in the "barrier" at the completion of
MPI_FINALIZE, during which time BTLs may still need to
progress pending outgoing communication, so we need to
call opal_progress() here to make sure that communication
gets pushed out so others can enter finalize (and send us
the message we're here waiting for). However, if we're
in a callback from the event library that was triggered
from a call to opal_progress(), opal_progress() will
think another thread is already progressing the event
engine (in the case of mpi threads enabled) and not
progress the engine, meaning we'll never receive our
message. So we also need to progress the event library
expicitly. We use EVLOOP_NONBLOCK so that we can
progress both the registered callbacks and the event
library, as EVLOOP_ONCE may block for a short period of
time. */
opal_progress();
opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK);
OPAL_CR_TEST_CHECKPOINT_READY();
}
#endif
/* return status */
if(NULL != rc) {
*rc = msg->msg_rc;
}
return ORTE_SUCCESS;
}
/*
* Wait up to a timeout for the message to complete.
* @param msg (IN) Message to wait on.
* @param rc (OUT) Return code (number of bytes read on success or error code on failure).
* @retval ORTE_SUCCESS or error code on failure.
*/
int mca_oob_tcp_msg_timedwait(mca_oob_tcp_msg_t* msg, int* rc, struct timespec* abstime)
{
struct timeval tv;
uint32_t secs = abstime->tv_sec;
uint32_t usecs = abstime->tv_nsec * 1000;
gettimeofday(&tv,NULL);
#if ORTE_ENABLE_PROGRESS_THREADS
OPAL_THREAD_LOCK(&msg->msg_lock);
while(msg->msg_complete == false &&
((uint32_t)tv.tv_sec <= secs ||
((uint32_t)tv.tv_sec == secs && (uint32_t)tv.tv_usec < usecs))) {
if(opal_event_progress_thread()) {
int rc;
OPAL_THREAD_UNLOCK(&msg->msg_lock);
rc = opal_event_loop(opal_event_base, OPAL_EVLOOP_ONCE);
assert(rc >= 0);
OPAL_THREAD_LOCK(&msg->msg_lock);
} else {
opal_condition_timedwait(&msg->msg_condition, &msg->msg_lock, abstime);
}
gettimeofday(&tv,NULL);
}
OPAL_THREAD_UNLOCK(&msg->msg_lock);
#else
/* wait for message to complete */
while(msg->msg_complete == false &&
((uint32_t)tv.tv_sec <= secs ||
((uint32_t)tv.tv_sec == secs && (uint32_t)tv.tv_usec < usecs))) {
/* see comment in tcp_msg_wait, above */
opal_progress();
opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK);
gettimeofday(&tv,NULL);
}
#endif
/* return status */
if(NULL != rc) {
*rc = msg->msg_rc;
}
if(msg->msg_rc < 0)
return msg->msg_rc;
return (msg->msg_complete ? ORTE_SUCCESS : ORTE_ERR_TIMEOUT);
}
/*
* Signal that a message has completed.
* @param msg (IN) Message to wait on.

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

@ -36,7 +36,6 @@ orte_rml_module_t orte_rml = {
NULL,
NULL,
NULL,
NULL,
orte_rml_base_null_send,
orte_rml_base_null_send_nb,
orte_rml_base_null_send_buffer,

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

@ -65,8 +65,6 @@ BEGIN_C_DECLS
*/
int orte_rml_ftrm_set_contact_info(const char* uri);
int orte_rml_ftrm_get_new_name(orte_process_name_t *name);
/*
* Ping
*/

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

@ -64,7 +64,6 @@ orte_rml_module_t orte_rml_ftrm_module = {
orte_rml_ftrm_get_contact_info,
orte_rml_ftrm_set_contact_info,
orte_rml_ftrm_get_new_name,
orte_rml_ftrm_ping,
orte_rml_ftrm_send,

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

@ -74,23 +74,6 @@ int orte_rml_ftrm_module_finalize(void)
}
int orte_rml_ftrm_get_new_name(orte_process_name_t *name)
{
int ret;
opal_output_verbose(20, rml_ftrm_output_handle,
"orte_rml_ftrm: get_new_name()");
if( NULL != orte_rml_ftrm_wrapped_module.get_new_name ) {
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.get_new_name(name) ) ) {
return ret;
}
}
return ORTE_SUCCESS;
}
/*
* Get URI
*/

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

@ -171,7 +171,6 @@ int orte_rml_oob_ping(const char* uri,
char* orte_rml_oob_get_uri(void);
int orte_rml_oob_set_uri(const char*);
int orte_rml_oob_get_new_name(orte_process_name_t *name);
int orte_rml_oob_add_exception(orte_rml_exception_callback_t cbfunc);
int orte_rml_oob_del_exception(orte_rml_exception_callback_t cbfunc);

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

@ -85,7 +85,6 @@ orte_rml_oob_module_t orte_rml_oob_module = {
orte_rml_oob_get_uri,
orte_rml_oob_set_uri,
orte_rml_oob_get_new_name,
orte_rml_oob_ping,
orte_rml_oob_send,

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

@ -70,17 +70,6 @@ orte_rml_oob_set_uri(const char* uri)
}
int
orte_rml_oob_get_new_name(orte_process_name_t *name)
{
if (NULL != ORTE_PROC_MY_NAME) {
return ORTE_ERR_NOT_SUPPORTED;
}
return orte_rml_oob_module.active_oob->oob_get_new_name(name);
}
int
orte_rml_oob_purge(orte_process_name_t *peer)
{

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

@ -252,24 +252,6 @@ typedef char* (*orte_rml_module_get_contact_info_fn_t)(void);
typedef int (*orte_rml_module_set_contact_info_fn_t)(const char *contact_info);
/**
* Request a new name from the HNP, if one is not already assigned
*
* Request a new name from the HNP, if one is not already assigned.
* This function should be avoided at all costs, but is unavoidable in
* some instances (like when trying to get a name from a singleton or
* when trying to contact a persistent daemon from an orte tool.
*
* @param[out] name The new name of the process
*
* @retval ORTE_SUCCESS A name was successfully acquired
* @retcal ORTE_ERR_NOT_SUPPORTED A name is already assigned to the
* current process
* @retval ORTE_ERROR An unspecified error occurred
*/
typedef int (*orte_rml_module_get_new_name_fn_t)(orte_process_name_t *name);
/**
* "Ping" another process to determine availability
*
@ -603,8 +585,6 @@ struct orte_rml_module_t {
/** Set contact information for remote process */
orte_rml_module_set_contact_info_fn_t set_contact_info;
/** Get a name from the remote process */
orte_rml_module_get_new_name_fn_t get_new_name;
/** Ping process for connectivity check */
orte_rml_module_ping_fn_t ping;