1
1

per conversation with Ralph and Jeff take out the opal_init_only logic.

This commit moves the initalization/finalization of opal_event and opal_progress
to opal_init/finalize. These were previously init/final in ORTE which is an
abstraction violation. After talking about it we concluded that there are no
ordering issues that require these to be init/final in ORTE instead of OPAL.

I ran the IBM test suite against this commit and it didn't turn up any new
failures so I think it is good to go.

Let us know if this causes problems.

This commit was SVN r14773.
Этот коммит содержится в:
Josh Hursey 2007-05-24 21:54:58 +00:00
родитель d627918678
Коммит 1e678c3f55
9 изменённых файлов: 50 добавлений и 84 удалений

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

@ -226,12 +226,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
int num_processors;
#endif
/*
* ORTE takes the responsibility of starting the progress and event
* (and other) engines.
*/
opal_init_only = false;
/* Join the run-time environment - do the things that don't hit
the registry */

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

@ -27,17 +27,6 @@
extern "C" {
#endif
/**
* Determine if this is an OPAL level applicaiton or something else.
* If something else (e.g., ORTE) then we don't want to start the
* event and progress engines since ORTE does that during it's init.
*
* So if we are only doing opal_init, and not someone elses as well.
* See the opal_init() function for the components that needed to be
* called if you are going to set this value to 'false'.
*/
OPAL_DECLSPEC extern bool opal_init_only;
/**
* Initialize the OPAL layer, including the MCA system.
*

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

@ -130,6 +130,8 @@ int opal_cr_set_enabled(bool en)
return OPAL_SUCCESS;
}
int opal_cr_initalized = 0;
int opal_cr_init(void )
{
int ret, exit_status = OPAL_SUCCESS;
@ -137,6 +139,13 @@ int opal_cr_init(void )
opal_cr_coord_callback_fn_t prev_coord_func;
int val;
if( ++opal_cr_initalized != 1 ) {
if( opal_cr_initalized < 1 ) {
return OPAL_ERROR;
}
return OPAL_SUCCESS;
}
/*
* Some startup MCA parameters
*/
@ -298,6 +307,13 @@ int opal_cr_finalize(void)
{
int exit_status = OPAL_SUCCESS;
if( --opal_cr_initalized != 0 ) {
if( opal_cr_initalized < 0 ) {
return OPAL_ERROR;
}
return OPAL_SUCCESS;
}
if( !opal_cr_is_tool ) {
#if OPAL_ENABLE_FT_THREAD == 1
/*

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

@ -88,14 +88,12 @@ opal_finalize(void)
return OPAL_SUCCESS;
}
if( opal_init_only ) {
/* close the checkpoint and restart service */
opal_cr_finalize();
/* close the checkpoint and restart service */
opal_cr_finalize();
opal_progress_finalize();
opal_progress_finalize();
opal_event_fini();
}
opal_event_fini();
/* close high resolution timers */
opal_timer_base_close();

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

@ -48,7 +48,6 @@
#include "opal/util/sys_limits.h"
bool opal_init_only = true;
int opal_initialized = 0;
static const char *
@ -260,40 +259,38 @@ opal_init(void)
goto return_error;
}
if( opal_init_only ) {
/*
* Need to start the event and progress engines if noone else is.
* opal_cr_init uses the progress engine, so it is lumped together
* into this set as well.
*/
/*
* Initialize the event library
*/
if (OPAL_SUCCESS != (ret = opal_event_init())) {
error = "opal_event_init";
goto return_error;
}
/*
* Need to start the event and progress engines if noone else is.
* opal_cr_init uses the progress engine, so it is lumped together
* into this set as well.
*/
/*
* Initialize the event library
*/
if (OPAL_SUCCESS != (ret = opal_event_init())) {
error = "opal_event_init";
goto return_error;
}
/*
* Intialize the general progress engine
*/
if (OPAL_SUCCESS != (ret = opal_progress_init())) {
error = "opal_progress_init";
goto return_error;
}
/* we want to tick the event library whenever possible */
opal_progress_event_users_increment();
/*
* Intialize the general progress engine
*/
if (OPAL_SUCCESS != (ret = opal_progress_init())) {
error = "opal_progress_init";
goto return_error;
}
/* we want to tick the event library whenever possible */
opal_progress_event_users_increment();
/*
* Initalize the checkpoint/restart functionality
* Note: Always do this so we can detect if the user
* attempts to checkpoint a non checkpointable job,
* otherwise the tools may hang or not clean up properly.
*/
if (OPAL_SUCCESS != (ret = opal_cr_init() ) ) {
error = "opal_cr_init() failed";
goto return_error;
}
/*
* Initalize the checkpoint/restart functionality
* Note: Always do this so we can detect if the user
* attempts to checkpoint a non checkpointable job,
* otherwise the tools may hang or not clean up properly.
*/
if (OPAL_SUCCESS != (ret = opal_cr_init() ) ) {
error = "opal_cr_init() failed";
goto return_error;
}
return OPAL_SUCCESS;

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

@ -39,12 +39,6 @@ int orte_init(bool infrastructure, bool barrier)
{
int rc;
/*
* ORTE takes the responsibility of starting the progress and event
* (and other) engines.
*/
opal_init_only = false;
if (orte_initialized) {
return ORTE_SUCCESS;
}

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

@ -145,23 +145,6 @@ int orte_init_stage1(bool infrastructure)
/***** ERROR LOGGING NOW AVAILABLE *****/
/*
* Initialize the event library
*/
if (ORTE_SUCCESS != (ret = opal_event_init())) {
ORTE_ERROR_LOG(ret);
error = "opal_event_init";
goto error;
}
/*
* Intialize the general progress engine
*/
if (ORTE_SUCCESS != (ret = opal_progress_init())) {
ORTE_ERROR_LOG(ret);
error = "opal_progress_init";
goto error;
}
/* we want to tick the event library whenever possible */
opal_progress_event_users_increment();

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

@ -107,10 +107,6 @@ int orte_system_finalize(void)
orte_rml_base_close();
orte_dss_close();
opal_progress_finalize();
opal_event_fini();
orte_session_dir_finalize(orte_process_info.my_name);
/* clean out the global structures */

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

@ -534,7 +534,6 @@ static int ckpt_init(int argc, char *argv[]) {
* Note: This must happen before opal_init().
*/
opal_cr_set_enabled(false);
opal_init_only = false;
/* Select the none component, since we don't actually use a checkpointer */
opal_setenv(mca_base_param_env_var("crs"),