1
1

Adding a simple hook for TotalView that is activated if a particular MCA

parameter is set.

orterun/MPI integration still not quite working.

This commit was SVN r7097.
Этот коммит содержится в:
David Daniel 2005-08-30 17:34:23 +00:00
родитель ced11250e4
Коммит a5d9199e7f

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

@ -81,6 +81,13 @@ opal_thread_t *ompi_mpi_main_thread = NULL;
bool ompi_mpi_maffinity_setup = false;
/*
* Variables for TotalView-like debuggers
*/
int MPIR_being_debugged = 0;
volatile int MPIR_debug_gate = 0;
volatile int MPIR_debug_state = 0;
int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
{
@ -89,7 +96,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
size_t nprocs;
char *error = NULL;
bool compound_cmd = false;
int wait_for_totalview;
/* Join the run-time environment - do the things that don't hit
the registry */
@ -140,6 +148,21 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
goto error;
}
/* Do we need to wait for a TotalView-like debugger? */
mca_base_param_reg_int_name("orte", "mpi_wait_for_totalview",
"Whether the MPI application should wait for a debugger or not",
false, false, (int)false, &wait_for_totalview);
if (wait_for_totalview) {
while (MPIR_debug_gate == 0) {
#if defined(WIN32)
sleep(100); /* milliseconds */
#else
usleep(100000); /* microseconds */
#endif
}
}
/* Setup process affinity */
if (ompi_mpi_paffinity_alone) {