* rename ompi_progress to opal_progress
This commit was SVN r6326.
This commit is contained in:
parent
9da0b4fe1d
commit
ccd2624e3f
@ -89,7 +89,7 @@ int ompi_comm_connect_accept ( ompi_communicator_t *comm, int root,
|
||||
|
||||
/* tell the progress engine to tick the event library more
|
||||
often, to make sure that the OOB messages get sent */
|
||||
ompi_progress_event_increment();
|
||||
opal_progress_event_increment();
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.pack(nbuf, &size, 1, ORTE_INT))) {
|
||||
goto exit;
|
||||
@ -218,8 +218,8 @@ int ompi_comm_connect_accept ( ompi_communicator_t *comm, int root,
|
||||
|
||||
exit:
|
||||
/* done with OOB and such - slow our tick rate again */
|
||||
ompi_progress();
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress();
|
||||
opal_progress_event_decrement();
|
||||
|
||||
|
||||
if ( NULL != rprocs ) {
|
||||
@ -330,7 +330,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
*/
|
||||
|
||||
/* make sure the progress engine properly trips the event library */
|
||||
ompi_progress_event_increment();
|
||||
opal_progress_event_increment();
|
||||
|
||||
/* Convert the list of commands to an array of orte_app_context_t
|
||||
pointers */
|
||||
@ -345,7 +345,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
/* rollback what was already done */
|
||||
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
/* copy over the name of the executable */
|
||||
@ -354,7 +354,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
/* rollback what was already done */
|
||||
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
/* record the number of procs to be generated */
|
||||
@ -381,7 +381,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
for (j=0; j < i; j++) {
|
||||
OBJ_RELEASE(apps[j]);
|
||||
}
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
apps[i]->argv[0] = strdup(array_of_commands[i]);
|
||||
@ -404,7 +404,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
/* rollback what was already done */
|
||||
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
asprintf(&(apps[i]->env[0]), "OMPI_PARENT_PORT=%s", port_name);
|
||||
@ -436,12 +436,12 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
||||
if (ORTE_SUCCESS != (rc = orte_rmgr.spawn(apps, count, &new_jobid,
|
||||
NULL))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
return MPI_ERR_SPAWN;
|
||||
}
|
||||
|
||||
/* clean up */
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
for ( i=0; i<count; i++) {
|
||||
OBJ_RELEASE(apps[i]);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ extern "C" {
|
||||
* the component is already in the list, its reference count will
|
||||
* be increases.
|
||||
*
|
||||
* For asynchronous progress, ompi_progress() will call
|
||||
* For asynchronous progress, opal_progress() will call
|
||||
* mca_io_base_progress(), which will go down the list of active
|
||||
* io components and call their progress() function.
|
||||
*
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/io/io.h"
|
||||
#include "mca/io/base/base.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
|
||||
/*
|
||||
* Private variables
|
||||
@ -51,7 +51,7 @@ int mca_io_base_component_init(void)
|
||||
|
||||
initialized = true;
|
||||
|
||||
ompi_progress_register(mca_io_base_component_run_progress);
|
||||
opal_progress_register(mca_io_base_component_run_progress);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -211,7 +211,7 @@ int mca_io_base_component_finalize(void)
|
||||
{
|
||||
initialized = false;
|
||||
|
||||
ompi_progress_unregister(mca_io_base_component_run_progress);
|
||||
opal_progress_unregister(mca_io_base_component_run_progress);
|
||||
|
||||
|
||||
OBJ_DESTRUCT(&components_in_use);
|
||||
|
@ -148,7 +148,7 @@ extern "C" {
|
||||
void mca_io_base_request_progress_fini(void);
|
||||
|
||||
/**
|
||||
* External progress function; invoked from ompi_progress()
|
||||
* External progress function; invoked from opal_progress()
|
||||
*/
|
||||
static inline int mca_io_base_request_progress(void)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
int mca_pml_base_close(void)
|
||||
{
|
||||
/* turn off the progress code for the pml */
|
||||
ompi_progress_unregister(mca_pml.pml_progress);
|
||||
opal_progress_unregister(mca_pml.pml_progress);
|
||||
|
||||
/* Blatently ignore the return code (what would we do to recover,
|
||||
anyway? This module is going away, so errors don't matter
|
||||
|
@ -151,7 +151,7 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
component->pmlm_version.mca_component_name);
|
||||
|
||||
/* register the winner's callback */
|
||||
ompi_progress_register(mca_pml.pml_progress);
|
||||
opal_progress_register(mca_pml.pml_progress);
|
||||
|
||||
/* All done */
|
||||
|
||||
|
@ -41,7 +41,7 @@ int mca_pml_ob1_iprobe(int src,
|
||||
*matched = 1;
|
||||
} else {
|
||||
*matched = 0;
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
return rc;
|
||||
|
@ -41,7 +41,7 @@ int mca_pml_teg_iprobe(int src,
|
||||
*matched = 1;
|
||||
} else {
|
||||
/* we are supposed to progress ... */
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
}
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI((&recvreq.req_recv));
|
||||
|
@ -41,7 +41,7 @@ int mca_pml_uniq_iprobe(int src,
|
||||
*matched = 1;
|
||||
} else {
|
||||
/* we are supposed to progress ... */
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
}
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
|
@ -131,7 +131,7 @@ int mca_ptl_tcp_add_procs(
|
||||
/* we increase the count of MPI users of the event library
|
||||
once per peer, so that we are used until we aren't
|
||||
connected to a peer */
|
||||
ompi_progress_event_increment();
|
||||
opal_progress_event_increment();
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -149,7 +149,7 @@ int mca_ptl_tcp_del_procs(struct mca_ptl_base_module_t* ptl, size_t nprocs, stru
|
||||
for(i=0; i<nprocs; i++) {
|
||||
opal_list_remove_item(&ptl_tcp->ptl_peers, (opal_list_item_t*)peers[i]);
|
||||
OBJ_RELEASE(peers[i]);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -167,7 +167,7 @@ int mca_ptl_tcp_finalize(struct mca_ptl_base_module_t* ptl)
|
||||
item = opal_list_remove_first(&ptl_tcp->ptl_peers)) {
|
||||
mca_ptl_tcp_peer_t *peer = (mca_ptl_tcp_peer_t*)item;
|
||||
OBJ_RELEASE(peer);
|
||||
ompi_progress_event_decrement();
|
||||
opal_progress_event_decrement();
|
||||
}
|
||||
free(ptl);
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -539,7 +539,7 @@ int mca_ptl_tcp_component_control(int param, void* value, size_t size)
|
||||
if(*(int*)value) {
|
||||
ompi_event_add(&mca_ptl_tcp_component.tcp_recv_event, 0);
|
||||
if(opal_hash_table_get_size(&mca_ptl_tcp_component.tcp_procs) > 0) {
|
||||
ompi_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
opal_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
}
|
||||
} else {
|
||||
ompi_event_del(&mca_ptl_tcp_component.tcp_recv_event);
|
||||
|
@ -63,7 +63,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag,
|
||||
}
|
||||
*flag = false;
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
#endif
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ int ompi_request_test_any(
|
||||
if(num_requests_null_inactive != count) {
|
||||
*completed = false;
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
#endif
|
||||
} else {
|
||||
*index = MPI_UNDEFINED;
|
||||
@ -93,7 +93,7 @@ int ompi_request_test_all(
|
||||
if (num_completed != count) {
|
||||
*completed = false;
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
#endif
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "class/ompi_pointer_array.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "threads/condition.h"
|
||||
|
||||
@ -226,7 +226,7 @@ static inline int ompi_request_test(
|
||||
} else {
|
||||
*completed = false;
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
#endif
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "util/sys_info.h"
|
||||
#include "ompi/runtime/mpiruntime.h"
|
||||
#include "orte/runtime/runtime.h"
|
||||
#include "opal/runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "attribute/attribute.h"
|
||||
|
||||
#include "mca/base/base.h"
|
||||
@ -63,11 +63,11 @@ int ompi_mpi_finalize(void)
|
||||
|
||||
ompi_mpi_finalized = true;
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
opal_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* Change progress function priority back to RTE level stuff */
|
||||
ompi_progress_mpi_disable();
|
||||
opal_progress_mpi_disable();
|
||||
|
||||
/* begin recording compound command */
|
||||
/* if (OMPI_SUCCESS != (ret = orte_gpr.begin_compound_cmd())) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi/runtime/mpiruntime.h"
|
||||
#include "ompi/runtime/params.h"
|
||||
#include "orte/runtime/runtime.h"
|
||||
#include "opal/runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "util/sys_info.h"
|
||||
#include "util/proc_info.h"
|
||||
#include "util/session_dir.h"
|
||||
@ -147,8 +147,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
}
|
||||
|
||||
/* initialize the progress engine for MPI functionality */
|
||||
if (OMPI_SUCCESS != ompi_progress_mpi_init()) {
|
||||
error = "ompi_progress_mpi_init() failed";
|
||||
if (OMPI_SUCCESS != opal_progress_mpi_init()) {
|
||||
error = "opal_progress_mpi_init() failed";
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
|
||||
/* BWB - is this still needed? */
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
ompi_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
opal_progress_events(OMPI_EVLOOP_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* Second barrier -- wait for message from
|
||||
@ -434,8 +434,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
}
|
||||
|
||||
/* put the event library in "high performance MPI mode" */
|
||||
if (OMPI_SUCCESS != ompi_progress_mpi_enable()) {
|
||||
error = "ompi_progress_mpi_enable() failed";
|
||||
if (OMPI_SUCCESS != opal_progress_mpi_enable()) {
|
||||
error = "opal_progress_mpi_enable() failed";
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ int ompi_mpi_register_params(void)
|
||||
|
||||
|
||||
/*
|
||||
* ompi_progress: decide whether to yield and the event library
|
||||
* opal_progress: decide whether to yield and the event library
|
||||
* tick rate
|
||||
*/
|
||||
mca_base_param_register_int("mpi", NULL, "yield_when_idle", NULL, -1);
|
||||
|
@ -24,12 +24,12 @@ noinst_LTLIBRARIES = libruntime.la
|
||||
# Source code files
|
||||
|
||||
headers = \
|
||||
ompi_progress.h \
|
||||
opal_progress.h \
|
||||
opal.h
|
||||
|
||||
libruntime_la_SOURCES = \
|
||||
$(headers) \
|
||||
ompi_progress.c \
|
||||
opal_progress.c \
|
||||
opal_finalize.c \
|
||||
opal_init.c
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "event/event.h"
|
||||
#include "include/constants.h"
|
||||
#include "mca/base/mca_base_param.h"
|
||||
@ -28,8 +28,8 @@
|
||||
/*
|
||||
* default parameters
|
||||
*/
|
||||
static int ompi_progress_event_flag = OMPI_EVLOOP_ONCE;
|
||||
static const int ompi_progress_default_tick_rate = 100;
|
||||
static int opal_progress_event_flag = OMPI_EVLOOP_ONCE;
|
||||
static const int opal_progress_default_tick_rate = 100;
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
@ -39,7 +39,7 @@ static opal_atomic_lock_t progress_lock;
|
||||
#endif /* OMPI_HAVE_THREAD_SUPPORT */
|
||||
|
||||
/* callbacks to progress */
|
||||
static ompi_progress_callback_t *callbacks = NULL;
|
||||
static opal_progress_callback_t *callbacks = NULL;
|
||||
static size_t callbacks_len = 0;
|
||||
static size_t callbacks_size = 0;
|
||||
|
||||
@ -57,7 +57,7 @@ static int32_t event_num_mpi_users = 0;
|
||||
|
||||
/* init the progress engine - called from orte_init */
|
||||
int
|
||||
ompi_progress_init(void)
|
||||
opal_progress_init(void)
|
||||
{
|
||||
/* reentrant issues */
|
||||
#if OMPI_HAVE_THREAD_SUPPORT
|
||||
@ -74,7 +74,7 @@ ompi_progress_init(void)
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_mpi_init(void)
|
||||
opal_progress_mpi_init(void)
|
||||
{
|
||||
event_num_mpi_users = 0;
|
||||
|
||||
@ -83,7 +83,7 @@ ompi_progress_mpi_init(void)
|
||||
|
||||
/* turn on MPI optimizations */
|
||||
int
|
||||
ompi_progress_mpi_enable(void)
|
||||
opal_progress_mpi_enable(void)
|
||||
{
|
||||
int param, value;
|
||||
|
||||
@ -104,7 +104,7 @@ ompi_progress_mpi_enable(void)
|
||||
|
||||
if (value < 0) {
|
||||
/* user didn't specify - default tick rate */
|
||||
event_progress_counter_reset = ompi_progress_default_tick_rate;
|
||||
event_progress_counter_reset = opal_progress_default_tick_rate;
|
||||
} else if (value == 0) {
|
||||
/* user specified as never tick - don't count often */
|
||||
event_progress_counter_reset = INT_MAX;
|
||||
@ -125,7 +125,7 @@ ompi_progress_mpi_enable(void)
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_mpi_disable(void)
|
||||
opal_progress_mpi_disable(void)
|
||||
{
|
||||
/* always call sched yield from here on... */
|
||||
call_yield = 1;
|
||||
@ -138,7 +138,7 @@ ompi_progress_mpi_disable(void)
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_finalize(void)
|
||||
opal_progress_finalize(void)
|
||||
{
|
||||
/* don't need to free the progess lock */
|
||||
|
||||
@ -164,9 +164,9 @@ ompi_progress_finalize(void)
|
||||
|
||||
|
||||
void
|
||||
ompi_progress_events(int flag)
|
||||
opal_progress_events(int flag)
|
||||
{
|
||||
ompi_progress_event_flag = flag;
|
||||
opal_progress_event_flag = flag;
|
||||
}
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ ompi_progress_events(int flag)
|
||||
* of the if checks (they were resulting in bad pipe stalling behabior)
|
||||
*/
|
||||
void
|
||||
ompi_progress(void)
|
||||
opal_progress(void)
|
||||
{
|
||||
size_t i;
|
||||
int events = 0;
|
||||
@ -193,7 +193,7 @@ ompi_progress(void)
|
||||
if the PTL progress functions are all reentrant or not. The I/O
|
||||
code should all be reentrant. Because of the uncertainty, we are
|
||||
preventing more than one thread of execution from progressing the
|
||||
via ompi_progress (which is usually only called when there are
|
||||
via opal_progress (which is usually only called when there are
|
||||
no PROGRESS_THREADS running). This should be made more fine-grained
|
||||
at some point in the future. */
|
||||
if (! opal_atomic_trylock(&progress_lock)) {
|
||||
@ -205,10 +205,10 @@ ompi_progress(void)
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
/* trip the event library if we've reached our tick rate and we are
|
||||
enabled */
|
||||
if (event_progress_counter-- <= 0 && ompi_progress_event_flag != 0) {
|
||||
if (event_progress_counter-- <= 0 && opal_progress_event_flag != 0) {
|
||||
event_progress_counter =
|
||||
(event_num_mpi_users > 0) ? 1 : event_progress_counter_reset;
|
||||
events += ompi_event_loop(ompi_progress_event_flag);
|
||||
events += ompi_event_loop(opal_progress_event_flag);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -246,7 +246,7 @@ ompi_progress(void)
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_register(ompi_progress_callback_t cb)
|
||||
opal_progress_register(opal_progress_callback_t cb)
|
||||
{
|
||||
int ret = OMPI_SUCCESS;
|
||||
|
||||
@ -256,8 +256,8 @@ ompi_progress_register(ompi_progress_callback_t cb)
|
||||
|
||||
/* see if we need to allocate more space */
|
||||
if (callbacks_len + 1 > callbacks_size) {
|
||||
ompi_progress_callback_t *tmp;
|
||||
tmp = realloc(callbacks, sizeof(ompi_progress_callback_t) * (callbacks_size + 4));
|
||||
opal_progress_callback_t *tmp;
|
||||
tmp = realloc(callbacks, sizeof(opal_progress_callback_t) * (callbacks_size + 4));
|
||||
if (tmp == NULL) {
|
||||
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
goto cleanup;
|
||||
@ -279,7 +279,7 @@ ompi_progress_register(ompi_progress_callback_t cb)
|
||||
}
|
||||
|
||||
int
|
||||
ompi_progress_unregister(ompi_progress_callback_t cb)
|
||||
opal_progress_unregister(opal_progress_callback_t cb)
|
||||
{
|
||||
size_t i;
|
||||
int ret = OMPI_ERR_NOT_FOUND;
|
||||
@ -321,7 +321,7 @@ ompi_progress_unregister(ompi_progress_callback_t cb)
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_event_increment()
|
||||
opal_progress_event_increment()
|
||||
{
|
||||
int32_t val;
|
||||
val = opal_atomic_add_32(&event_num_mpi_users, 1);
|
||||
@ -333,7 +333,7 @@ ompi_progress_event_increment()
|
||||
|
||||
|
||||
int
|
||||
ompi_progress_event_decrement()
|
||||
opal_progress_event_decrement()
|
||||
{
|
||||
int32_t val;
|
||||
val = opal_atomic_sub_32(&event_num_mpi_users, 1);
|
@ -34,7 +34,7 @@ extern "C" {
|
||||
* functions. At this point, any function in the progress engine
|
||||
* interface may be called.
|
||||
*/
|
||||
OMPI_DECLSPEC extern int ompi_progress_init(void);
|
||||
OMPI_DECLSPEC extern int opal_progress_init(void);
|
||||
|
||||
/**
|
||||
* Configure the progress engine for executing MPI applications
|
||||
@ -42,10 +42,10 @@ OMPI_DECLSPEC extern int ompi_progress_init(void);
|
||||
* Register to receive any needed information from the GPR and
|
||||
* intialize any data structures required for MPI applications.
|
||||
*
|
||||
* \note ompi_progress_init() must be called before calling
|
||||
* \note opal_progress_init() must be called before calling
|
||||
* this function. Failure to do so is an error.
|
||||
*/
|
||||
OMPI_DECLSPEC extern int ompi_progress_mpi_init(void);
|
||||
OMPI_DECLSPEC extern int opal_progress_mpi_init(void);
|
||||
|
||||
/**
|
||||
* Turn on optimizations for MPI progress
|
||||
@ -55,16 +55,16 @@ OMPI_DECLSPEC extern int ompi_progress_mpi_init(void);
|
||||
* active use and possibly disabling the sched_yield call when the
|
||||
* progress engine is idle
|
||||
*/
|
||||
OMPI_DECLSPEC extern int ompi_progress_mpi_enable(void);
|
||||
OMPI_DECLSPEC extern int opal_progress_mpi_enable(void);
|
||||
|
||||
/**
|
||||
* Turn off all optimizations enabled by ompi_progress_mpi_enable().
|
||||
* Turn off all optimizations enabled by opal_progress_mpi_enable().
|
||||
*
|
||||
* Completely reverses all optimizations enabled by
|
||||
* ompi_progress_mpi_enable(). The event library resumes constant
|
||||
* opal_progress_mpi_enable(). The event library resumes constant
|
||||
* ticking and the progress engine yields the CPU when idle.
|
||||
*/
|
||||
OMPI_DECLSPEC extern int ompi_progress_mpi_disable(void);
|
||||
OMPI_DECLSPEC extern int opal_progress_mpi_disable(void);
|
||||
|
||||
/**
|
||||
* Shut down the progress engine
|
||||
@ -73,42 +73,42 @@ OMPI_DECLSPEC extern int ompi_progress_mpi_disable(void);
|
||||
* registered callbacks and freeing all resources. After finalize
|
||||
* returns, no calls into the progress interface are allowed.
|
||||
*/
|
||||
OMPI_DECLSPEC extern int ompi_progress_finalize(void);
|
||||
OMPI_DECLSPEC extern int opal_progress_finalize(void);
|
||||
|
||||
/**
|
||||
* Control how the event library is called
|
||||
*/
|
||||
OMPI_DECLSPEC extern void ompi_progress_events(int);
|
||||
OMPI_DECLSPEC extern void opal_progress_events(int);
|
||||
|
||||
/**
|
||||
* Progress all pending events
|
||||
*/
|
||||
OMPI_DECLSPEC extern void ompi_progress(void);
|
||||
OMPI_DECLSPEC extern void opal_progress(void);
|
||||
|
||||
typedef int (*ompi_progress_callback_t)(void);
|
||||
typedef int (*opal_progress_callback_t)(void);
|
||||
|
||||
|
||||
/**
|
||||
* Register an event to be progressed
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_progress_register(ompi_progress_callback_t cb);
|
||||
OMPI_DECLSPEC int opal_progress_register(opal_progress_callback_t cb);
|
||||
|
||||
|
||||
/**
|
||||
* Unregister previously registered event
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_progress_unregister(ompi_progress_callback_t cb);
|
||||
OMPI_DECLSPEC int opal_progress_unregister(opal_progress_callback_t cb);
|
||||
|
||||
|
||||
/**
|
||||
* Increase count of MPI users of the event library
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_progress_event_increment(void);
|
||||
OMPI_DECLSPEC int opal_progress_event_increment(void);
|
||||
|
||||
/**
|
||||
* Decrease count of MPI users of the event library
|
||||
*/
|
||||
OMPI_DECLSPEC int ompi_progress_event_decrement(void);
|
||||
OMPI_DECLSPEC int opal_progress_event_decrement(void);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "threads/condition.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
@ -63,13 +63,13 @@ static inline int ompi_condition_wait(ompi_condition_t *c, ompi_mutex_t *m)
|
||||
#else
|
||||
while (c->c_signaled == 0) {
|
||||
ompi_mutex_unlock(m);
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
ompi_mutex_lock(m);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
while (c->c_signaled == 0) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
}
|
||||
c->c_signaled--;
|
||||
@ -97,7 +97,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
|
||||
(tv.tv_sec <= abs.tv_sec ||
|
||||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
|
||||
ompi_mutex_unlock(m);
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
gettimeofday(&tv,NULL);
|
||||
ompi_mutex_lock(m);
|
||||
}
|
||||
@ -109,7 +109,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
|
||||
while (c->c_signaled == 0 &&
|
||||
(tv.tv_sec <= abs.tv_sec ||
|
||||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
gettimeofday(&tv,NULL);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
#include "threads/condition.h"
|
||||
#include "threads/mutex.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
@ -45,12 +45,12 @@ static inline int ompi_condition_wait(ompi_condition_t *c, ompi_mutex_t *m)
|
||||
if (ompi_using_threads()) {
|
||||
while (c->c_signaled == 0) {
|
||||
ompi_mutex_unlock(m);
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
ompi_mutex_lock(m);
|
||||
}
|
||||
} else {
|
||||
while (c->c_signaled == 0) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
}
|
||||
c->c_signaled--;
|
||||
@ -74,7 +74,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
|
||||
(tv.tv_sec <= abs.tv_sec ||
|
||||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
|
||||
ompi_mutex_unlock(m);
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
gettimeofday(&tv,NULL);
|
||||
ompi_mutex_lock(m);
|
||||
}
|
||||
@ -82,7 +82,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
|
||||
while (c->c_signaled == 0 &&
|
||||
(tv.tv_sec <= abs.tv_sec ||
|
||||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
gettimeofday(&tv,NULL);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "ompi_config.h"
|
||||
#include "util/proc_info.h"
|
||||
#include "util/output.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "mca/rml/rml.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/base/mca_base_param.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "ompi_config.h"
|
||||
#include "util/proc_info.h"
|
||||
#include "util/output.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "mca/rml/rml.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/base/mca_base_param.h"
|
||||
|
@ -260,7 +260,7 @@ int mca_oob_tcp_recv_cancel(
|
||||
/* wait for any previously matched messages to be processed */
|
||||
OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock);
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS
|
||||
if(ompi_progress_thread() == false) {
|
||||
if(opal_progress_thread() == false) {
|
||||
while(mca_oob_tcp_component.tcp_match_count) {
|
||||
ompi_condition_wait(
|
||||
&mca_oob_tcp_component.tcp_match_cond,
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "util/os_create_dirpath.h"
|
||||
#include "mca/oob/base/base.h"
|
||||
#include "util/os_path.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "pls_bproc_orted.h"
|
||||
|
||||
orte_pls_base_module_1_0_0_t orte_pls_bproc_orted_module = {
|
||||
|
@ -146,7 +146,7 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node,
|
||||
|
||||
actionMonitor = [job performDeleteAction];
|
||||
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
|
||||
/* we should have a result - find out if it worked */
|
||||
@ -225,7 +225,7 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node,
|
||||
"pls: xgrid: connection name: %s", [[connection name] cString]);
|
||||
|
||||
controller = [[XGController alloc] initWithConnection:connection];
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
grid = [controller defaultGrid];
|
||||
#if 0 /* gives a warning - need to figure out "right way" */
|
||||
ompi_output(orte_pls_base.pls_output,
|
||||
@ -335,7 +335,7 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node,
|
||||
|
||||
/* wait until we have some idea if job succeeded or not */
|
||||
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
|
||||
/* we should have a result - find out if it worked */
|
||||
@ -371,7 +371,7 @@ cleanup:
|
||||
|
||||
XGActionMonitor *actionMonitor = [job performStopAction];
|
||||
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
|
||||
/* we should have a result - find out if it worked */
|
||||
|
@ -151,7 +151,7 @@ orte_pls_xgrid_component_init(int *priority)
|
||||
mca_base_param_lookup_int(param, &val);
|
||||
[mca_pls_xgrid_component.client setCleanUp: val];
|
||||
|
||||
ompi_progress_register(orte_pls_xgrid_progress);
|
||||
opal_progress_register(orte_pls_xgrid_progress);
|
||||
|
||||
ompi_output(orte_pls_base.pls_output, "orte:pls:xgrid: initialized");
|
||||
|
||||
|
@ -229,7 +229,7 @@ orte_pls_xgrid_finalize(void)
|
||||
[mca_pls_xgrid_component.client release];
|
||||
[mca_pls_xgrid_component.pool release];
|
||||
|
||||
ompi_progress_unregister(orte_pls_xgrid_progress);
|
||||
opal_progress_unregister(orte_pls_xgrid_progress);
|
||||
|
||||
/* cleanup any pending recvs */
|
||||
orte_rml.recv_cancel(ORTE_RML_NAME_ANY, ORTE_RML_TAG_RMGR_CLNT);
|
||||
|
@ -124,7 +124,7 @@ int orte_init_stage1(void)
|
||||
/*
|
||||
* Intialize the general progress engine
|
||||
*/
|
||||
if (OMPI_SUCCESS != (ret = ompi_progress_init())) {
|
||||
if (OMPI_SUCCESS != (ret = opal_progress_init())) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ int orte_system_finalize(void)
|
||||
orte_rml_base_close();
|
||||
orte_dps_close();
|
||||
|
||||
ompi_progress_finalize();
|
||||
opal_progress_finalize();
|
||||
|
||||
ompi_event_fini();
|
||||
|
||||
|
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
||||
/*
|
||||
* Intialize the general progress engine
|
||||
*/
|
||||
if (OMPI_SUCCESS != (ret = ompi_progress_init())) {
|
||||
if (OMPI_SUCCESS != (ret = opal_progress_init())) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "ompi_config.h"
|
||||
#include "mpi.h"
|
||||
#include "runtime/orte_wait.h"
|
||||
#include "runtime/ompi_progress.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
#include "runtime/runtime.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
while (count > 0) {
|
||||
ompi_progress();
|
||||
opal_progress();
|
||||
}
|
||||
|
||||
orte_finalize();
|
||||
|
@ -2234,10 +2234,10 @@
|
||||
RelativePath="..\..\src\runtime\ompi_init.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\runtime\ompi_progress.c">
|
||||
RelativePath="..\..\src\runtime\opal_progress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\runtime\ompi_progress.h">
|
||||
RelativePath="..\..\src\runtime\opal_progress.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\runtime\ompi_rte_cmd_line_setup.c">
|
||||
|
Loading…
x
Reference in New Issue
Block a user