* move ompi_event_fini() from mpirun/MPI_Finalize to ompi_rte_finalize to
match where ompi_event_init() lived * initialize and shutdown the code to allow child process wait callbacks * add comment about few() ussage in rte-enabled jobs (short answer: don't). This commit was SVN r2864.
Этот коммит содержится в:
родитель
8bef16d214
Коммит
57ca18ce88
@ -135,13 +135,6 @@ int ompi_mpi_finalize(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* shutdown event library - note that this needs to
|
|
||||||
* occur after everything that uses the event library
|
|
||||||
*/
|
|
||||||
if (OMPI_SUCCESS != (ret = ompi_event_fini())) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
if (OMPI_SUCCESS != (ret = mca_ptl_base_close())) {
|
if (OMPI_SUCCESS != (ret = mca_ptl_base_close())) {
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "include/constants.h"
|
#include "include/constants.h"
|
||||||
#include "runtime/runtime.h"
|
#include "runtime/runtime.h"
|
||||||
#include "runtime/runtime_internal.h"
|
#include "runtime/runtime_internal.h"
|
||||||
|
#include "runtime/ompi_rte_wait.h"
|
||||||
#include "event/event.h"
|
#include "event/event.h"
|
||||||
#include "util/output.h"
|
#include "util/output.h"
|
||||||
#include "util/proc_info.h"
|
#include "util/proc_info.h"
|
||||||
@ -41,6 +42,10 @@ int ompi_rte_finalize(void)
|
|||||||
ompi_rte_internal_fini_spawn();
|
ompi_rte_internal_fini_spawn();
|
||||||
ompi_session_dir_finalize();
|
ompi_session_dir_finalize();
|
||||||
|
|
||||||
|
ompi_rte_wait_finalize();
|
||||||
|
|
||||||
|
ompi_event_fini();
|
||||||
|
|
||||||
/* All done */
|
/* All done */
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "runtime/runtime.h"
|
#include "runtime/runtime.h"
|
||||||
#include "runtime/runtime_internal.h"
|
#include "runtime/runtime_internal.h"
|
||||||
|
#include "runtime/ompi_rte_wait.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialze and setup a process in the OMPI RTE.
|
* Initialze and setup a process in the OMPI RTE.
|
||||||
@ -138,6 +139,11 @@ int ompi_rte_init_stage1(bool *allow_multi_user_threads, bool *have_hidden_threa
|
|||||||
printf("show_help: ompi_rte_init failed in ompi_rte_internal_init_spawn\n");
|
printf("show_help: ompi_rte_init failed in ompi_rte_internal_init_spawn\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
if (OMPI_SUCCESS != (ret = ompi_rte_wait_init())) {
|
||||||
|
/* JMS show_help */
|
||||||
|
printf("show_help: ompi_rte_init failed in ompi_rte_wait_init\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "include/constants.h"
|
#include "include/constants.h"
|
||||||
#include "threads/mutex.h"
|
#include "threads/mutex.h"
|
||||||
#include "threads/condition.h"
|
#include "threads/condition.h"
|
||||||
#include "runtime/ompi_progress.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
@ -215,7 +214,7 @@ ompi_rte_waitpid(pid_t wpid, int *status, int options)
|
|||||||
ompi_condition_timedwait(data->cond,
|
ompi_condition_timedwait(data->cond,
|
||||||
cond_mutex,
|
cond_mutex,
|
||||||
&spintime);
|
&spintime);
|
||||||
ompi_progress();
|
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
|
||||||
}
|
}
|
||||||
ompi_mutex_unlock(cond_mutex);
|
ompi_mutex_unlock(cond_mutex);
|
||||||
|
|
||||||
@ -428,7 +427,7 @@ register_sig_event(void)
|
|||||||
/* it seems that the event is only added to the queue at the next
|
/* it seems that the event is only added to the queue at the next
|
||||||
progress call. So push the event library (might as well push
|
progress call. So push the event library (might as well push
|
||||||
the pml/ptl at the same time) */
|
the pml/ptl at the same time) */
|
||||||
ompi_progress();
|
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
OMPI_THREAD_UNLOCK(&ev_reg_mutex);
|
OMPI_THREAD_UNLOCK(&ev_reg_mutex);
|
||||||
|
@ -403,7 +403,6 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* finalize the system */
|
/* finalize the system */
|
||||||
ompi_event_fini();
|
|
||||||
ompi_rte_finalize();
|
ompi_rte_finalize();
|
||||||
mca_base_close();
|
mca_base_close();
|
||||||
ompi_finalize();
|
ompi_finalize();
|
||||||
|
@ -32,6 +32,11 @@ extern "C" {
|
|||||||
* process exited successfully -- it simply indicates that the child
|
* process exited successfully -- it simply indicates that the child
|
||||||
* process exited. The WIF* macros (see waitpid(2)) should be used to
|
* process exited. The WIF* macros (see waitpid(2)) should be used to
|
||||||
* examine the status to see hold the child exited.
|
* examine the status to see hold the child exited.
|
||||||
|
*
|
||||||
|
* \warning This function should not be called if \c ompi_rte_init()
|
||||||
|
* or \c MPI_Init() have been called. This function is not
|
||||||
|
* safe in a multi-threaded environment in which a handler
|
||||||
|
* for \c SIGCHLD has been registered.
|
||||||
*/
|
*/
|
||||||
int ompi_few(char *argv[], int *status);
|
int ompi_few(char *argv[], int *status);
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user