diff --git a/ompi/include/ompi/memchecker.h b/ompi/include/ompi/memchecker.h index d591c0591b..e51f3ffeea 100644 --- a/ompi/include/ompi/memchecker.h +++ b/ompi/include/ompi/memchecker.h @@ -99,7 +99,7 @@ static inline int memchecker_call (int (*f)(void *, size_t), void * addr, uint32_t stack_disp = 0, elem_pos = 0, i; dt_elem_desc_t* description = datatype->opt_desc.desc; dt_elem_desc_t* pElem = &(description[elem_pos]); - unsigned char *source_base = addr; + unsigned char *source_base = (unsigned char *) addr; if ( NULL != datatype ) stack_disp = datatype->ub - datatype->lb; diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 58eb38b0ff..763b8ce1ac 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -685,7 +685,9 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } /* Do we need to wait for a debugger? */ +#ifndef __WINDOWS__ ompi_wait_for_debugger(); +#endif /* check for timing request - get stop time and report elapsed time if so, then start the clock again */ diff --git a/opal/event/event.c b/opal/event/event.c index 77255f4cf1..dcca688497 100644 --- a/opal/event/event.c +++ b/opal/event/event.c @@ -310,7 +310,11 @@ opal_event_init(void) #ifdef __APPLE__ "select", #else +# ifdef __WINDOWS__ + "win32", +# else "poll", +# endif #endif &event_module_include); free(help_msg); /* release the help message */ diff --git a/orte/runtime/orte_wait.c b/orte/runtime/orte_wait.c index 7b342e7e92..9f615181ac 100644 --- a/orte/runtime/orte_wait.c +++ b/orte/runtime/orte_wait.c @@ -903,8 +903,8 @@ void orte_trigger_event(orte_trigger_event_t *trig) return; } - send(trig->channel, (const char *) &data, sizeof(int), 0); - closesocket(trig->channel); + send(trig->channel, (const char*)&data, sizeof(int), 0); + closesocket(trig->channel); opal_progress(); } @@ -1118,6 +1118,9 @@ int orte_wait_event(opal_event_t **event, orte_trigger_event_t *trig, /* create the event */ *event = (opal_event_t*)malloc(sizeof(opal_event_t)); + /* setup the trigger and its associated lock */ + OBJ_CONSTRUCT(trig, orte_trigger_event_t); + /* pass back the write end of the pipe */ trig->channel = p[1]; diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index c150d889af..e4986ae142 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -782,8 +782,15 @@ static void job_completed(int trigpipe, short event, void *arg) orte_max_timeout, timeout_callback); } +#ifndef __WINDOWS__ /* now wait to hear it has been done */ opal_event_dispatch(); +#else + /* We are using WT_EXECUTEINWAITTHREAD mode of threading pool, + the other callbacks won't be triggerred until this thread finishes, + so just return to main thread and process the rest events there. */ + return; +#endif /* if we cannot order the daemons to terminate, then * all we can do is cleanly exit ourselves diff --git a/orte/util/hnp_contact.c b/orte/util/hnp_contact.c index 8b4ce77e5e..224f80dc1e 100644 --- a/orte/util/hnp_contact.c +++ b/orte/util/hnp_contact.c @@ -257,7 +257,7 @@ int orte_list_local_hnps(opal_list_t *hnps, bool connect) * See if a contact file exists in this directory and read it */ contact_filename = opal_os_path( false, headdir, - dir_entry->d_name, "contact.txt", NULL ); + file_data, "contact.txt", NULL ); hnp = OBJ_NEW(orte_hnp_contact_t); if (ORTE_SUCCESS == (ret = orte_read_hnp_contact_file(contact_filename, hnp, connect))) {