diff --git a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c index 5484076e0f..7d5e480095 100644 --- a/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c +++ b/ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c @@ -8,6 +8,7 @@ * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,6 @@ #include "opal/util/opal_environ.h" #include "ompi/mca/mca.h" -#include "opal/mca/base/base.h" #include "opal/mca/pmix/pmix.h" #include "ompi/request/request.h" @@ -4440,7 +4440,7 @@ static int ft_event_exchange_bookmarks(void) /* Wait for all bookmarks to arrive */ START_TIMER(CRCP_TIMER_CKPT_EX_WAIT); while( total_recv_bookmarks > 0 ) { - opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK); + opal_event_loop(opal_sync_event_base, OPAL_EVLOOP_NONBLOCK); } total_recv_bookmarks = 0; END_TIMER(CRCP_TIMER_CKPT_EX_WAIT); @@ -5227,7 +5227,7 @@ static int wait_quiesce_drain_ack(void) } } - opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK); + opal_event_loop(opal_sync_event_base, OPAL_EVLOOP_NONBLOCK); } /* Clear the ack queue if it isn't already clear (it should already be) */ diff --git a/opal/mca/btl/openib/btl_openib_fd.c b/opal/mca/btl/openib/btl_openib_fd.c index c2a82d9e36..98a9e4799f 100644 --- a/opal/mca/btl/openib/btl_openib_fd.c +++ b/opal/mca/btl/openib/btl_openib_fd.c @@ -175,7 +175,7 @@ static int service_pipe_cmd_add_fd(bool use_libevent, cmd_t *cmd) if (use_libevent) { /* Make an event for this fd */ ri->ri_event_used = true; - opal_event_set(opal_event_base, &ri->ri_event, ri->ri_fd, + opal_event_set(opal_sync_event_base, &ri->ri_event, ri->ri_fd, ri->ri_flags | OPAL_EV_PERSIST, service_fd_callback, ri); opal_event_add(&ri->ri_event, 0); @@ -501,7 +501,7 @@ int opal_btl_openib_fd_init(void) /* Create a libevent event that is used in the main thread to watch its pipe */ - opal_event_set(opal_event_base, &main_thread_event, pipe_to_main_thread[0], + opal_event_set(opal_sync_event_base, &main_thread_event, pipe_to_main_thread[0], OPAL_EV_READ | OPAL_EV_PERSIST, main_thread_event_callback, NULL); opal_event_add(&main_thread_event, 0); diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c index d3a68bed2e..9b6034e9fd 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -2212,7 +2212,7 @@ static void udcm_sent_message_constructor (udcm_message_sent_t *message) { memset ((char *)message + sizeof (message->super), 0, sizeof (*message) - sizeof (message->super)); - opal_event_evtimer_set(opal_event_base, &message->event, udcm_send_timeout, message); + opal_event_evtimer_set(opal_sync_event_base, &message->event, udcm_send_timeout, message); } static void udcm_sent_message_destructor (udcm_message_sent_t *message) diff --git a/opal/mca/btl/tcp/btl_tcp_component.c b/opal/mca/btl/tcp/btl_tcp_component.c index beb2f95a2f..9275edf98b 100644 --- a/opal/mca/btl/tcp/btl_tcp_component.c +++ b/opal/mca/btl/tcp/btl_tcp_component.c @@ -818,7 +818,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family) /* register listen port */ #if OPAL_ENABLE_IPV6 if (AF_INET6 == af_family) { - opal_event_set(opal_event_base, &mca_btl_tcp_component.tcp6_recv_event, + opal_event_set(opal_sync_event_base, &mca_btl_tcp_component.tcp6_recv_event, mca_btl_tcp_component.tcp6_listen_sd, OPAL_EV_READ|OPAL_EV_PERSIST, mca_btl_tcp_component_accept_handler, @@ -827,7 +827,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family) } else #endif { - opal_event_set(opal_event_base, &mca_btl_tcp_component.tcp_recv_event, + opal_event_set(opal_sync_event_base, &mca_btl_tcp_component.tcp_recv_event, mca_btl_tcp_component.tcp_listen_sd, OPAL_EV_READ|OPAL_EV_PERSIST, mca_btl_tcp_component_accept_handler, @@ -1049,7 +1049,7 @@ static void mca_btl_tcp_component_accept_handler( int incoming_sd, /* wait for receipt of peers process identifier to complete this connection */ event = OBJ_NEW(mca_btl_tcp_event_t); - opal_event_set(opal_event_base, &event->event, sd, OPAL_EV_READ, mca_btl_tcp_component_recv_handler, event); + opal_event_set(opal_sync_event_base, &event->event, sd, OPAL_EV_READ, mca_btl_tcp_component_recv_handler, event); opal_event_add(&event->event, 0); } } diff --git a/opal/mca/btl/tcp/btl_tcp_endpoint.c b/opal/mca/btl/tcp/btl_tcp_endpoint.c index a6a284c3c1..2e29109240 100644 --- a/opal/mca/btl/tcp/btl_tcp_endpoint.c +++ b/opal/mca/btl/tcp/btl_tcp_endpoint.c @@ -309,7 +309,7 @@ static inline void mca_btl_tcp_endpoint_event_init(mca_btl_base_endpoint_t* btl_ btl_endpoint->endpoint_cache_pos = btl_endpoint->endpoint_cache; #endif /* MCA_BTL_TCP_ENDPOINT_CACHE */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_recv_event, + opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_recv_event, btl_endpoint->endpoint_sd, OPAL_EV_READ|OPAL_EV_PERSIST, mca_btl_tcp_endpoint_recv_handler, @@ -320,7 +320,7 @@ static inline void mca_btl_tcp_endpoint_event_init(mca_btl_base_endpoint_t* btl_ * will be fired only once, and when the endpoint is marked as * CONNECTED the event should be recreated with the correct flags. */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, + opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_send_event, btl_endpoint->endpoint_sd, OPAL_EV_WRITE, mca_btl_tcp_endpoint_send_handler, @@ -509,7 +509,7 @@ void mca_btl_tcp_endpoint_accept(mca_btl_base_endpoint_t* btl_endpoint, assert(btl_endpoint->endpoint_sd_next == -1); btl_endpoint->endpoint_sd_next = sd; - opal_event_evtimer_set(opal_event_base, &btl_endpoint->endpoint_accept_event, + opal_event_evtimer_set(opal_sync_event_base, &btl_endpoint->endpoint_accept_event, mca_btl_tcp_endpoint_complete_accept, btl_endpoint); opal_event_add(&btl_endpoint->endpoint_accept_event, &now); } @@ -570,7 +570,7 @@ static void mca_btl_tcp_endpoint_connected(mca_btl_base_endpoint_t* btl_endpoint MCA_BTL_TCP_ENDPOINT_DUMP(1, btl_endpoint, true, "READY [endpoint_connected]"); /* Create the send event in a persistent manner. */ - opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event, + opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_send_event, btl_endpoint->endpoint_sd, OPAL_EV_WRITE | OPAL_EV_PERSIST, mca_btl_tcp_endpoint_send_handler, diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index c2bd218e2b..100f5651f2 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -972,7 +972,7 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules, } /* start timer to guarantee synthetic clock advances */ - opal_event_set(opal_event_base, &usnic_clock_timer_event, + opal_event_set(opal_sync_event_base, &usnic_clock_timer_event, -1, 0, usnic_clock_callback, &usnic_clock_timeout); usnic_clock_timer_event_set = true; diff --git a/opal/mca/btl/usnic/btl_usnic_endpoint.c b/opal/mca/btl/usnic/btl_usnic_endpoint.c index 5891fc5568..40a1faee1b 100644 --- a/opal/mca/btl/usnic/btl_usnic_endpoint.c +++ b/opal/mca/btl/usnic/btl_usnic_endpoint.c @@ -87,7 +87,7 @@ static void endpoint_construct(mca_btl_base_endpoint_t* endpoint) OBJ_CONSTRUCT(&endpoint->endpoint_hotel, opal_hotel_t); opal_hotel_init(&endpoint->endpoint_hotel, WINDOW_SIZE, - opal_event_base, + opal_sync_event_base, mca_btl_usnic_component.retrans_timeout, 0, opal_btl_usnic_ack_timeout); diff --git a/opal/mca/btl/usnic/btl_usnic_module.c b/opal/mca/btl/usnic/btl_usnic_module.c index 2b36af126b..94a87bcf10 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.c +++ b/opal/mca/btl/usnic/btl_usnic_module.c @@ -2068,7 +2068,7 @@ static void init_async_event(opal_btl_usnic_module_t *module) } /* Get the fd to receive events on this device */ - opal_event_set(opal_event_base, &(module->device_async_event), fd, + opal_event_set(opal_sync_event_base, &(module->device_async_event), fd, OPAL_EV_READ | OPAL_EV_PERSIST, module_async_event_callback, module); opal_event_add(&(module->device_async_event), NULL); diff --git a/opal/mca/btl/usnic/btl_usnic_stats.c b/opal/mca/btl/usnic/btl_usnic_stats.c index 6e9051284e..1eca29e0bf 100644 --- a/opal/mca/btl/usnic/btl_usnic_stats.c +++ b/opal/mca/btl/usnic/btl_usnic_stats.c @@ -212,7 +212,7 @@ int opal_btl_usnic_stats_init(opal_btl_usnic_module_t *module) module->stats.timeout.tv_sec = mca_btl_usnic_component.stats_frequency; module->stats.timeout.tv_usec = 0; - opal_event_set(opal_event_base, &(module->stats.timer_event), + opal_event_set(opal_sync_event_base, &(module->stats.timer_event), -1, EV_TIMEOUT | EV_PERSIST, &usnic_stats_callback, module); opal_event_add(&(module->stats.timer_event), diff --git a/opal/mca/event/base/event_base_frame.c b/opal/mca/event/base/event_base_frame.c index c1713b1d09..3c1beb0fae 100644 --- a/opal/mca/event/base/event_base_frame.c +++ b/opal/mca/event/base/event_base_frame.c @@ -64,7 +64,7 @@ static int opal_event_base_close(void) /* * Globals */ -opal_event_base_t *opal_event_base=NULL; +opal_event_base_t *opal_sync_event_base=NULL; static int opal_event_base_open(mca_base_open_flag_t flags) { @@ -84,13 +84,13 @@ static int opal_event_base_open(mca_base_open_flag_t flags) opal_event_use_threads(); /* get our event base */ - if (NULL == (opal_event_base = opal_event_base_create())) { + if (NULL == (opal_sync_event_base = opal_event_base_create())) { return OPAL_ERROR; } /* set the number of priorities */ if (0 < OPAL_EVENT_NUM_PRI) { - opal_event_base_priority_init(opal_event_base, OPAL_EVENT_NUM_PRI); + opal_event_base_priority_init(opal_sync_event_base, OPAL_EVENT_NUM_PRI); } return rc; diff --git a/opal/mca/event/event.h b/opal/mca/event/event.h index cc81bb9506..b0958b64e0 100644 --- a/opal/mca/event/event.h +++ b/opal/mca/event/event.h @@ -2,7 +2,7 @@ /* * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * diff --git a/opal/mca/event/external/external.h b/opal/mca/event/external/external.h index 7ddb54645b..206fbbaa85 100644 --- a/opal/mca/event/external/external.h +++ b/opal/mca/event/external/external.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2015 Intel, Inc. All rights reserved. * * $COPYRIGHT$ * @@ -27,7 +28,7 @@ BEGIN_C_DECLS typedef struct event_base opal_event_base_t; typedef struct event opal_event_t; -OPAL_DECLSPEC extern opal_event_base_t *opal_event_base; +OPAL_DECLSPEC extern opal_event_base_t *opal_sync_event_base; #define OPAL_EV_TIMEOUT EV_TIMEOUT #define OPAL_EV_READ EV_READ diff --git a/opal/mca/event/libevent2022/libevent2022.h b/opal/mca/event/libevent2022/libevent2022.h index 7c6706323e..5ab9492ab7 100644 --- a/opal/mca/event/libevent2022/libevent2022.h +++ b/opal/mca/event/libevent2022/libevent2022.h @@ -67,7 +67,7 @@ BEGIN_C_DECLS typedef struct event_base opal_event_base_t; typedef struct event opal_event_t; -OPAL_DECLSPEC extern opal_event_base_t *opal_event_base; +OPAL_DECLSPEC extern opal_event_base_t *opal_sync_event_base; #define OPAL_EV_TIMEOUT EV_TIMEOUT #define OPAL_EV_READ EV_READ diff --git a/opal/runtime/opal_cr.c b/opal/runtime/opal_cr.c index 5fc619d607..bd75558e86 100644 --- a/opal/runtime/opal_cr.c +++ b/opal/runtime/opal_cr.c @@ -811,7 +811,7 @@ int opal_cr_coord(int state) * Otherwise it may/will use stale file descriptors which will disrupt * the intended users of the soon-to-be newly assigned file descriptors. */ - opal_event_reinit(opal_event_base); + opal_event_reinit(opal_sync_event_base); /* * Flush if() functionality, since it caches system specific info. diff --git a/opal/runtime/opal_progress.c b/opal/runtime/opal_progress.c index d7ecf086d7..d0fe0d71b3 100644 --- a/opal/runtime/opal_progress.c +++ b/opal/runtime/opal_progress.c @@ -168,7 +168,7 @@ opal_progress(void) event_progress_last_time = (num_event_users > 0) ? now - event_progress_delta : now; - events += opal_event_loop(opal_event_base, opal_progress_event_flag); + events += opal_event_loop(opal_sync_event_base, opal_progress_event_flag); } #else /* OPAL_PROGRESS_USE_TIMERS */ @@ -177,7 +177,7 @@ opal_progress(void) if (OPAL_THREAD_ADD32(&event_progress_counter, -1) <= 0 ) { event_progress_counter = (num_event_users > 0) ? 0 : event_progress_delta; - events += opal_event_loop(opal_event_base, opal_progress_event_flag); + events += opal_event_loop(opal_sync_event_base, opal_progress_event_flag); } #endif /* OPAL_PROGRESS_USE_TIMERS */ diff --git a/orte/runtime/orte_init.c b/orte/runtime/orte_init.c index aec3f428bf..bf6c6be6d6 100644 --- a/orte/runtime/orte_init.c +++ b/orte/runtime/orte_init.c @@ -226,7 +226,7 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags) * start their progress thread in ess_base_std_app.c * at the appropriate point */ - orte_event_base = opal_event_base; + orte_event_base = opal_sync_event_base; } /* initialize the RTE for this environment */ diff --git a/orte/tools/orte-server/orte-server.c b/orte/tools/orte-server/orte-server.c index 55c9328e18..46ef0b9046 100644 --- a/orte/tools/orte-server/orte-server.c +++ b/orte/tools/orte-server/orte-server.c @@ -238,10 +238,10 @@ int main(int argc, char *argv[]) /* Set signal handlers to catch kill signals so we can properly clean up * after ourselves. */ - opal_event_set(opal_event_base, &term_handler, SIGTERM, OPAL_EV_SIGNAL, + opal_event_set(orte_event_base, &term_handler, SIGTERM, OPAL_EV_SIGNAL, shutdown_callback, NULL); opal_event_add(&term_handler, NULL); - opal_event_set(opal_event_base, &int_handler, SIGINT, OPAL_EV_SIGNAL, + opal_event_set(orte_event_base, &int_handler, SIGINT, OPAL_EV_SIGNAL, shutdown_callback, NULL); opal_event_add(&int_handler, NULL);