1
1

* rename ompi_progress to opal_progress

This commit was SVN r6326.
Этот коммит содержится в:
Brian Barrett 2005-07-03 21:57:43 +00:00
родитель 9da0b4fe1d
Коммит ccd2624e3f
34 изменённых файлов: 105 добавлений и 105 удалений

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

@ -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 /* tell the progress engine to tick the event library more
often, to make sure that the OOB messages get sent */ 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))) { if (ORTE_SUCCESS != (rc = orte_dps.pack(nbuf, &size, 1, ORTE_INT))) {
goto exit; goto exit;
@ -218,8 +218,8 @@ int ompi_comm_connect_accept ( ompi_communicator_t *comm, int root,
exit: exit:
/* done with OOB and such - slow our tick rate again */ /* done with OOB and such - slow our tick rate again */
ompi_progress(); opal_progress();
ompi_progress_event_decrement(); opal_progress_event_decrement();
if ( NULL != rprocs ) { 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 */ /* 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 /* Convert the list of commands to an array of orte_app_context_t
pointers */ pointers */
@ -345,7 +345,7 @@ ompi_comm_start_processes(int count, char **array_of_commands,
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
/* rollback what was already done */ /* rollback what was already done */
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]); for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
ompi_progress_event_decrement(); opal_progress_event_decrement();
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
/* copy over the name of the executable */ /* 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); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
/* rollback what was already done */ /* rollback what was already done */
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]); for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
ompi_progress_event_decrement(); opal_progress_event_decrement();
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
/* record the number of procs to be generated */ /* 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++) { for (j=0; j < i; j++) {
OBJ_RELEASE(apps[j]); OBJ_RELEASE(apps[j]);
} }
ompi_progress_event_decrement(); opal_progress_event_decrement();
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
apps[i]->argv[0] = strdup(array_of_commands[i]); 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); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
/* rollback what was already done */ /* rollback what was already done */
for (j=0; j < i; j++) OBJ_RELEASE(apps[j]); for (j=0; j < i; j++) OBJ_RELEASE(apps[j]);
ompi_progress_event_decrement(); opal_progress_event_decrement();
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
asprintf(&(apps[i]->env[0]), "OMPI_PARENT_PORT=%s", port_name); 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, if (ORTE_SUCCESS != (rc = orte_rmgr.spawn(apps, count, &new_jobid,
NULL))) { NULL))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
ompi_progress_event_decrement(); opal_progress_event_decrement();
return MPI_ERR_SPAWN; return MPI_ERR_SPAWN;
} }
/* clean up */ /* clean up */
ompi_progress_event_decrement(); opal_progress_event_decrement();
for ( i=0; i<count; i++) { for ( i=0; i<count; i++) {
OBJ_RELEASE(apps[i]); OBJ_RELEASE(apps[i]);
} }

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

@ -199,7 +199,7 @@ extern "C" {
* the component is already in the list, its reference count will * the component is already in the list, its reference count will
* be increases. * 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 * mca_io_base_progress(), which will go down the list of active
* io components and call their progress() function. * io components and call their progress() function.
* *

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

@ -21,7 +21,7 @@
#include "mca/base/base.h" #include "mca/base/base.h"
#include "mca/io/io.h" #include "mca/io/io.h"
#include "mca/io/base/base.h" #include "mca/io/base/base.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
/* /*
* Private variables * Private variables
@ -51,7 +51,7 @@ int mca_io_base_component_init(void)
initialized = true; initialized = true;
ompi_progress_register(mca_io_base_component_run_progress); opal_progress_register(mca_io_base_component_run_progress);
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
@ -211,7 +211,7 @@ int mca_io_base_component_finalize(void)
{ {
initialized = false; 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); OBJ_DESTRUCT(&components_in_use);

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

@ -148,7 +148,7 @@ extern "C" {
void mca_io_base_request_progress_fini(void); 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) static inline int mca_io_base_request_progress(void)
{ {

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

@ -28,7 +28,7 @@
int mca_pml_base_close(void) int mca_pml_base_close(void)
{ {
/* turn off the progress code for the pml */ /* 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, /* Blatently ignore the return code (what would we do to recover,
anyway? This module is going away, so errors don't matter 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); component->pmlm_version.mca_component_name);
/* register the winner's callback */ /* register the winner's callback */
ompi_progress_register(mca_pml.pml_progress); opal_progress_register(mca_pml.pml_progress);
/* All done */ /* All done */

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

@ -41,7 +41,7 @@ int mca_pml_ob1_iprobe(int src,
*matched = 1; *matched = 1;
} else { } else {
*matched = 0; *matched = 0;
ompi_progress(); opal_progress();
} }
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
return rc; return rc;

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

@ -41,7 +41,7 @@ int mca_pml_teg_iprobe(int src,
*matched = 1; *matched = 1;
} else { } else {
/* we are supposed to progress ... */ /* we are supposed to progress ... */
ompi_progress(); opal_progress();
} }
} }
MCA_PML_BASE_RECV_REQUEST_FINI((&recvreq.req_recv)); MCA_PML_BASE_RECV_REQUEST_FINI((&recvreq.req_recv));

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

@ -41,7 +41,7 @@ int mca_pml_uniq_iprobe(int src,
*matched = 1; *matched = 1;
} else { } else {
/* we are supposed to progress ... */ /* we are supposed to progress ... */
ompi_progress(); opal_progress();
} }
} }
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); 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 /* we increase the count of MPI users of the event library
once per peer, so that we are used until we aren't once per peer, so that we are used until we aren't
connected to a peer */ connected to a peer */
ompi_progress_event_increment(); opal_progress_event_increment();
} }
return OMPI_SUCCESS; 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++) { for(i=0; i<nprocs; i++) {
opal_list_remove_item(&ptl_tcp->ptl_peers, (opal_list_item_t*)peers[i]); opal_list_remove_item(&ptl_tcp->ptl_peers, (opal_list_item_t*)peers[i]);
OBJ_RELEASE(peers[i]); OBJ_RELEASE(peers[i]);
ompi_progress_event_decrement(); opal_progress_event_decrement();
} }
return OMPI_SUCCESS; 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)) { item = opal_list_remove_first(&ptl_tcp->ptl_peers)) {
mca_ptl_tcp_peer_t *peer = (mca_ptl_tcp_peer_t*)item; mca_ptl_tcp_peer_t *peer = (mca_ptl_tcp_peer_t*)item;
OBJ_RELEASE(peer); OBJ_RELEASE(peer);
ompi_progress_event_decrement(); opal_progress_event_decrement();
} }
free(ptl); free(ptl);
return OMPI_SUCCESS; return OMPI_SUCCESS;

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

@ -539,7 +539,7 @@ int mca_ptl_tcp_component_control(int param, void* value, size_t size)
if(*(int*)value) { if(*(int*)value) {
ompi_event_add(&mca_ptl_tcp_component.tcp_recv_event, 0); ompi_event_add(&mca_ptl_tcp_component.tcp_recv_event, 0);
if(opal_hash_table_get_size(&mca_ptl_tcp_component.tcp_procs) > 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 { } else {
ompi_event_del(&mca_ptl_tcp_component.tcp_recv_event); 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; *flag = false;
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress(); opal_progress();
#endif #endif
return MPI_SUCCESS; return MPI_SUCCESS;
} }

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

@ -55,7 +55,7 @@ int ompi_request_test_any(
if(num_requests_null_inactive != count) { if(num_requests_null_inactive != count) {
*completed = false; *completed = false;
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress(); opal_progress();
#endif #endif
} else { } else {
*index = MPI_UNDEFINED; *index = MPI_UNDEFINED;
@ -93,7 +93,7 @@ int ompi_request_test_all(
if (num_completed != count) { if (num_completed != count) {
*completed = false; *completed = false;
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress(); opal_progress();
#endif #endif
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }

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

@ -26,7 +26,7 @@
#include "opal/class/opal_list.h" #include "opal/class/opal_list.h"
#include "class/ompi_pointer_array.h" #include "class/ompi_pointer_array.h"
#include "errhandler/errhandler.h" #include "errhandler/errhandler.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "threads/mutex.h" #include "threads/mutex.h"
#include "threads/condition.h" #include "threads/condition.h"
@ -226,7 +226,7 @@ static inline int ompi_request_test(
} else { } else {
*completed = false; *completed = false;
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress(); opal_progress();
#endif #endif
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }

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

@ -34,7 +34,7 @@
#include "util/sys_info.h" #include "util/sys_info.h"
#include "ompi/runtime/mpiruntime.h" #include "ompi/runtime/mpiruntime.h"
#include "orte/runtime/runtime.h" #include "orte/runtime/runtime.h"
#include "opal/runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "attribute/attribute.h" #include "attribute/attribute.h"
#include "mca/base/base.h" #include "mca/base/base.h"
@ -63,11 +63,11 @@ int ompi_mpi_finalize(void)
ompi_mpi_finalized = true; ompi_mpi_finalized = true;
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress_events(OMPI_EVLOOP_NONBLOCK); opal_progress_events(OMPI_EVLOOP_NONBLOCK);
#endif #endif
/* Change progress function priority back to RTE level stuff */ /* Change progress function priority back to RTE level stuff */
ompi_progress_mpi_disable(); opal_progress_mpi_disable();
/* begin recording compound command */ /* begin recording compound command */
/* if (OMPI_SUCCESS != (ret = orte_gpr.begin_compound_cmd())) { /* if (OMPI_SUCCESS != (ret = orte_gpr.begin_compound_cmd())) {

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

@ -20,7 +20,7 @@
#include "ompi/runtime/mpiruntime.h" #include "ompi/runtime/mpiruntime.h"
#include "ompi/runtime/params.h" #include "ompi/runtime/params.h"
#include "orte/runtime/runtime.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/sys_info.h"
#include "util/proc_info.h" #include "util/proc_info.h"
#include "util/session_dir.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 */ /* initialize the progress engine for MPI functionality */
if (OMPI_SUCCESS != ompi_progress_mpi_init()) { if (OMPI_SUCCESS != opal_progress_mpi_init()) {
error = "ompi_progress_mpi_init() failed"; error = "opal_progress_mpi_init() failed";
goto error; goto error;
} }
@ -404,7 +404,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
/* BWB - is this still needed? */ /* BWB - is this still needed? */
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
ompi_progress_events(OMPI_EVLOOP_NONBLOCK); opal_progress_events(OMPI_EVLOOP_NONBLOCK);
#endif #endif
/* Second barrier -- wait for message from /* 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" */ /* put the event library in "high performance MPI mode" */
if (OMPI_SUCCESS != ompi_progress_mpi_enable()) { if (OMPI_SUCCESS != opal_progress_mpi_enable()) {
error = "ompi_progress_mpi_enable() failed"; error = "opal_progress_mpi_enable() failed";
goto error; 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 * tick rate
*/ */
mca_base_param_register_int("mpi", NULL, "yield_when_idle", NULL, -1); mca_base_param_register_int("mpi", NULL, "yield_when_idle", NULL, -1);

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

@ -24,12 +24,12 @@ noinst_LTLIBRARIES = libruntime.la
# Source code files # Source code files
headers = \ headers = \
ompi_progress.h \ opal_progress.h \
opal.h opal.h
libruntime_la_SOURCES = \ libruntime_la_SOURCES = \
$(headers) \ $(headers) \
ompi_progress.c \ opal_progress.c \
opal_finalize.c \ opal_finalize.c \
opal_init.c opal_init.c

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

@ -20,7 +20,7 @@
#include <sched.h> #include <sched.h>
#endif #endif
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "event/event.h" #include "event/event.h"
#include "include/constants.h" #include "include/constants.h"
#include "mca/base/mca_base_param.h" #include "mca/base/mca_base_param.h"
@ -28,8 +28,8 @@
/* /*
* default parameters * default parameters
*/ */
static int ompi_progress_event_flag = OMPI_EVLOOP_ONCE; static int opal_progress_event_flag = OMPI_EVLOOP_ONCE;
static const int ompi_progress_default_tick_rate = 100; static const int opal_progress_default_tick_rate = 100;
/* /*
* Local variables * Local variables
@ -39,7 +39,7 @@ static opal_atomic_lock_t progress_lock;
#endif /* OMPI_HAVE_THREAD_SUPPORT */ #endif /* OMPI_HAVE_THREAD_SUPPORT */
/* callbacks to progress */ /* 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_len = 0;
static size_t callbacks_size = 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 */ /* init the progress engine - called from orte_init */
int int
ompi_progress_init(void) opal_progress_init(void)
{ {
/* reentrant issues */ /* reentrant issues */
#if OMPI_HAVE_THREAD_SUPPORT #if OMPI_HAVE_THREAD_SUPPORT
@ -74,7 +74,7 @@ ompi_progress_init(void)
int int
ompi_progress_mpi_init(void) opal_progress_mpi_init(void)
{ {
event_num_mpi_users = 0; event_num_mpi_users = 0;
@ -83,7 +83,7 @@ ompi_progress_mpi_init(void)
/* turn on MPI optimizations */ /* turn on MPI optimizations */
int int
ompi_progress_mpi_enable(void) opal_progress_mpi_enable(void)
{ {
int param, value; int param, value;
@ -104,7 +104,7 @@ ompi_progress_mpi_enable(void)
if (value < 0) { if (value < 0) {
/* user didn't specify - default tick rate */ /* 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) { } else if (value == 0) {
/* user specified as never tick - don't count often */ /* user specified as never tick - don't count often */
event_progress_counter_reset = INT_MAX; event_progress_counter_reset = INT_MAX;
@ -125,7 +125,7 @@ ompi_progress_mpi_enable(void)
int int
ompi_progress_mpi_disable(void) opal_progress_mpi_disable(void)
{ {
/* always call sched yield from here on... */ /* always call sched yield from here on... */
call_yield = 1; call_yield = 1;
@ -138,7 +138,7 @@ ompi_progress_mpi_disable(void)
int int
ompi_progress_finalize(void) opal_progress_finalize(void)
{ {
/* don't need to free the progess lock */ /* don't need to free the progess lock */
@ -164,9 +164,9 @@ ompi_progress_finalize(void)
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) * of the if checks (they were resulting in bad pipe stalling behabior)
*/ */
void void
ompi_progress(void) opal_progress(void)
{ {
size_t i; size_t i;
int events = 0; int events = 0;
@ -193,7 +193,7 @@ ompi_progress(void)
if the PTL progress functions are all reentrant or not. The I/O if the PTL progress functions are all reentrant or not. The I/O
code should all be reentrant. Because of the uncertainty, we are code should all be reentrant. Because of the uncertainty, we are
preventing more than one thread of execution from progressing the 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 no PROGRESS_THREADS running). This should be made more fine-grained
at some point in the future. */ at some point in the future. */
if (! opal_atomic_trylock(&progress_lock)) { if (! opal_atomic_trylock(&progress_lock)) {
@ -205,10 +205,10 @@ ompi_progress(void)
#if OMPI_ENABLE_PROGRESS_THREADS == 0 #if OMPI_ENABLE_PROGRESS_THREADS == 0
/* trip the event library if we've reached our tick rate and we are /* trip the event library if we've reached our tick rate and we are
enabled */ 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_progress_counter =
(event_num_mpi_users > 0) ? 1 : event_progress_counter_reset; (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 #endif
@ -246,7 +246,7 @@ ompi_progress(void)
int int
ompi_progress_register(ompi_progress_callback_t cb) opal_progress_register(opal_progress_callback_t cb)
{ {
int ret = OMPI_SUCCESS; int ret = OMPI_SUCCESS;
@ -256,8 +256,8 @@ ompi_progress_register(ompi_progress_callback_t cb)
/* see if we need to allocate more space */ /* see if we need to allocate more space */
if (callbacks_len + 1 > callbacks_size) { if (callbacks_len + 1 > callbacks_size) {
ompi_progress_callback_t *tmp; opal_progress_callback_t *tmp;
tmp = realloc(callbacks, sizeof(ompi_progress_callback_t) * (callbacks_size + 4)); tmp = realloc(callbacks, sizeof(opal_progress_callback_t) * (callbacks_size + 4));
if (tmp == NULL) { if (tmp == NULL) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE; ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup; goto cleanup;
@ -279,7 +279,7 @@ ompi_progress_register(ompi_progress_callback_t cb)
} }
int int
ompi_progress_unregister(ompi_progress_callback_t cb) opal_progress_unregister(opal_progress_callback_t cb)
{ {
size_t i; size_t i;
int ret = OMPI_ERR_NOT_FOUND; int ret = OMPI_ERR_NOT_FOUND;
@ -321,7 +321,7 @@ ompi_progress_unregister(ompi_progress_callback_t cb)
int int
ompi_progress_event_increment() opal_progress_event_increment()
{ {
int32_t val; int32_t val;
val = opal_atomic_add_32(&event_num_mpi_users, 1); val = opal_atomic_add_32(&event_num_mpi_users, 1);
@ -333,7 +333,7 @@ ompi_progress_event_increment()
int int
ompi_progress_event_decrement() opal_progress_event_decrement()
{ {
int32_t val; int32_t val;
val = opal_atomic_sub_32(&event_num_mpi_users, 1); 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 * functions. At this point, any function in the progress engine
* interface may be called. * 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 * 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 * Register to receive any needed information from the GPR and
* intialize any data structures required for MPI applications. * 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. * 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 * 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 * active use and possibly disabling the sched_yield call when the
* progress engine is idle * 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 * 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. * 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 * 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 * registered callbacks and freeing all resources. After finalize
* returns, no calls into the progress interface are allowed. * 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 * 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 * 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 * 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 * 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 * 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 * 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) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -29,7 +29,7 @@
#include "threads/condition.h" #include "threads/condition.h"
#include "threads/mutex.h" #include "threads/mutex.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
@ -63,13 +63,13 @@ static inline int ompi_condition_wait(ompi_condition_t *c, ompi_mutex_t *m)
#else #else
while (c->c_signaled == 0) { while (c->c_signaled == 0) {
ompi_mutex_unlock(m); ompi_mutex_unlock(m);
ompi_progress(); opal_progress();
ompi_mutex_lock(m); ompi_mutex_lock(m);
} }
#endif #endif
} else { } else {
while (c->c_signaled == 0) { while (c->c_signaled == 0) {
ompi_progress(); opal_progress();
} }
} }
c->c_signaled--; 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_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) { (tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
ompi_mutex_unlock(m); ompi_mutex_unlock(m);
ompi_progress(); opal_progress();
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
ompi_mutex_lock(m); ompi_mutex_lock(m);
} }
@ -109,7 +109,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
while (c->c_signaled == 0 && while (c->c_signaled == 0 &&
(tv.tv_sec <= abs.tv_sec || (tv.tv_sec <= abs.tv_sec ||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) { (tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
ompi_progress(); opal_progress();
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
} }
} }

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

@ -22,7 +22,7 @@
#endif #endif
#include "threads/condition.h" #include "threads/condition.h"
#include "threads/mutex.h" #include "threads/mutex.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
@ -45,12 +45,12 @@ static inline int ompi_condition_wait(ompi_condition_t *c, ompi_mutex_t *m)
if (ompi_using_threads()) { if (ompi_using_threads()) {
while (c->c_signaled == 0) { while (c->c_signaled == 0) {
ompi_mutex_unlock(m); ompi_mutex_unlock(m);
ompi_progress(); opal_progress();
ompi_mutex_lock(m); ompi_mutex_lock(m);
} }
} else { } else {
while (c->c_signaled == 0) { while (c->c_signaled == 0) {
ompi_progress(); opal_progress();
} }
} }
c->c_signaled--; 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_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) { (tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
ompi_mutex_unlock(m); ompi_mutex_unlock(m);
ompi_progress(); opal_progress();
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
ompi_mutex_lock(m); ompi_mutex_lock(m);
} }
@ -82,7 +82,7 @@ static inline int ompi_condition_timedwait(ompi_condition_t *c,
while (c->c_signaled == 0 && while (c->c_signaled == 0 &&
(tv.tv_sec <= abs.tv_sec || (tv.tv_sec <= abs.tv_sec ||
(tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) { (tv.tv_sec == abs.tv_sec && tv.tv_usec < abs.tv_usec))) {
ompi_progress(); opal_progress();
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
} }
} }

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

@ -17,7 +17,7 @@
#include "ompi_config.h" #include "ompi_config.h"
#include "util/proc_info.h" #include "util/proc_info.h"
#include "util/output.h" #include "util/output.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "mca/rml/rml.h" #include "mca/rml/rml.h"
#include "mca/base/base.h" #include "mca/base/base.h"
#include "mca/base/mca_base_param.h" #include "mca/base/mca_base_param.h"

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

@ -17,7 +17,7 @@
#include "ompi_config.h" #include "ompi_config.h"
#include "util/proc_info.h" #include "util/proc_info.h"
#include "util/output.h" #include "util/output.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "mca/rml/rml.h" #include "mca/rml/rml.h"
#include "mca/base/base.h" #include "mca/base/base.h"
#include "mca/base/mca_base_param.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 */ /* wait for any previously matched messages to be processed */
OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock); OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock);
#if OMPI_ENABLE_PROGRESS_THREADS #if OMPI_ENABLE_PROGRESS_THREADS
if(ompi_progress_thread() == false) { if(opal_progress_thread() == false) {
while(mca_oob_tcp_component.tcp_match_count) { while(mca_oob_tcp_component.tcp_match_count) {
ompi_condition_wait( ompi_condition_wait(
&mca_oob_tcp_component.tcp_match_cond, &mca_oob_tcp_component.tcp_match_cond,

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

@ -40,7 +40,7 @@
#include "util/os_create_dirpath.h" #include "util/os_create_dirpath.h"
#include "mca/oob/base/base.h" #include "mca/oob/base/base.h"
#include "util/os_path.h" #include "util/os_path.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "pls_bproc_orted.h" #include "pls_bproc_orted.h"
orte_pls_base_module_1_0_0_t orte_pls_bproc_orted_module = { 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]; actionMonitor = [job performDeleteAction];
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) { while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
ompi_progress(); opal_progress();
} }
/* we should have a result - find out if it worked */ /* 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]); "pls: xgrid: connection name: %s", [[connection name] cString]);
controller = [[XGController alloc] initWithConnection:connection]; controller = [[XGController alloc] initWithConnection:connection];
ompi_progress(); opal_progress();
grid = [controller defaultGrid]; grid = [controller defaultGrid];
#if 0 /* gives a warning - need to figure out "right way" */ #if 0 /* gives a warning - need to figure out "right way" */
ompi_output(orte_pls_base.pls_output, 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 */ /* wait until we have some idea if job succeeded or not */
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) { while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
ompi_progress(); opal_progress();
} }
/* we should have a result - find out if it worked */ /* we should have a result - find out if it worked */
@ -371,7 +371,7 @@ cleanup:
XGActionMonitor *actionMonitor = [job performStopAction]; XGActionMonitor *actionMonitor = [job performStopAction];
while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) { while (XGActionMonitorOutcomeNone == [actionMonitor outcome]) {
ompi_progress(); opal_progress();
} }
/* we should have a result - find out if it worked */ /* 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_base_param_lookup_int(param, &val);
[mca_pls_xgrid_component.client setCleanUp: 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"); 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.client release];
[mca_pls_xgrid_component.pool 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 */ /* cleanup any pending recvs */
orte_rml.recv_cancel(ORTE_RML_NAME_ANY, ORTE_RML_TAG_RMGR_CLNT); 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 * Intialize the general progress engine
*/ */
if (OMPI_SUCCESS != (ret = ompi_progress_init())) { if (OMPI_SUCCESS != (ret = opal_progress_init())) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
return ret; return ret;
} }

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

@ -65,7 +65,7 @@ int orte_system_finalize(void)
orte_rml_base_close(); orte_rml_base_close();
orte_dps_close(); orte_dps_close();
ompi_progress_finalize(); opal_progress_finalize();
ompi_event_fini(); ompi_event_fini();

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

@ -243,7 +243,7 @@ int main(int argc, char *argv[])
/* /*
* Intialize the general progress engine * Intialize the general progress engine
*/ */
if (OMPI_SUCCESS != (ret = ompi_progress_init())) { if (OMPI_SUCCESS != (ret = opal_progress_init())) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
return ret; return ret;
} }

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

@ -17,7 +17,7 @@
#include "ompi_config.h" #include "ompi_config.h"
#include "mpi.h" #include "mpi.h"
#include "runtime/orte_wait.h" #include "runtime/orte_wait.h"
#include "runtime/ompi_progress.h" #include "opal/runtime/opal_progress.h"
#include "runtime/runtime.h" #include "runtime/runtime.h"
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
} }
while (count > 0) { while (count > 0) {
ompi_progress(); opal_progress();
} }
orte_finalize(); orte_finalize();

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

@ -2234,10 +2234,10 @@
RelativePath="..\..\src\runtime\ompi_init.c"> RelativePath="..\..\src\runtime\ompi_init.c">
</File> </File>
<File <File
RelativePath="..\..\src\runtime\ompi_progress.c"> RelativePath="..\..\src\runtime\opal_progress.c">
</File> </File>
<File <File
RelativePath="..\..\src\runtime\ompi_progress.h"> RelativePath="..\..\src\runtime\opal_progress.h">
</File> </File>
<File <File
RelativePath="..\..\src\runtime\ompi_rte_cmd_line_setup.c"> RelativePath="..\..\src\runtime\ompi_rte_cmd_line_setup.c">