diff --git a/config/mca_configure.ac b/config/mca_configure.ac index e8ab475346..5f0cbf141d 100644 --- a/config/mca_configure.ac +++ b/config/mca_configure.ac @@ -295,7 +295,7 @@ if test -z "$with_openmpi"; then top_ompi_srcdir='$(top_srcdir)/../../../..' top_ompi_builddir='$(top_builddir)/../../../..' - INCFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src -I$(top_ompi_builddir)/include' + INCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CPPFLAGS" found_ompi_headers=1 AC_MSG_RESULT([already in Open MPI source tree]) fi diff --git a/configure.ac b/configure.ac index c91c34eb1c..2f8b8ad313 100644 --- a/configure.ac +++ b/configure.ac @@ -1328,8 +1328,8 @@ ompi_show_subtitle "Wrapper compiler flags" # purely aesthetic. # -CPPFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CPPFLAGS" -CXXCPPFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CXXCPPFLAGS" +CPPFLAGS='-I$(top_srcdir)/include -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CPPFLAGS" +CXXCPPFLAGS='-I$(top_srcdir)/include -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CXXCPPFLAGS" # # Adding WRAPPER_* flags so that extra flags needed for wrappper compilers diff --git a/ompi/class/Makefile.am b/ompi/class/Makefile.am index efd9b3026d..852a4b9d7f 100644 --- a/ompi/class/Makefile.am +++ b/ompi/class/Makefile.am @@ -26,13 +26,15 @@ headers = \ ompi_fifo.h \ ompi_free_list.h \ ompi_bitmap.h \ - ompi_pointer_array.h + ompi_pointer_array.h \ + ompi_rb_tree.h libclass_la_SOURCES = \ $(headers) \ ompi_bitmap.c \ ompi_free_list.c \ - ompi_pointer_array.c + ompi_pointer_array.c \ + ompi_rb_tree.h # Conditionally install the header files diff --git a/opal/class/ompi_rb_tree.c b/ompi/class/ompi_rb_tree.c similarity index 100% rename from opal/class/ompi_rb_tree.c rename to ompi/class/ompi_rb_tree.c diff --git a/opal/class/ompi_rb_tree.h b/ompi/class/ompi_rb_tree.h similarity index 100% rename from opal/class/ompi_rb_tree.h rename to ompi/class/ompi_rb_tree.h diff --git a/opal/class/Makefile.am b/opal/class/Makefile.am index 56b313088f..c203862990 100644 --- a/opal/class/Makefile.am +++ b/opal/class/Makefile.am @@ -26,7 +26,6 @@ headers = \ ompi_hash_table.h \ ompi_list.h \ ompi_object.h \ - ompi_rb_tree.h \ ompi_value_array.h libclass_la_SOURCES = \ @@ -35,7 +34,6 @@ libclass_la_SOURCES = \ ompi_hash_table.c \ ompi_list.c \ ompi_object.c \ - ompi_rb_tree.c \ ompi_value_array.c # Conditionally install the header files diff --git a/opal/class/opal_free_list.c b/opal/class/opal_free_list.c index f9044b531d..2ca5656715 100644 --- a/opal/class/opal_free_list.c +++ b/opal/class/opal_free_list.c @@ -16,8 +16,8 @@ #include "ompi_config.h" -#include "class/opal_free_list.h" -#include "include/sys/cache.h" +#include "opal/class/opal_free_list.h" +#include "opal/include/sys/cache.h" static void opal_free_list_construct(opal_free_list_t* fl); diff --git a/opal/class/opal_free_list.h b/opal/class/opal_free_list.h index 40e6ad3b5b..18cdaff310 100644 --- a/opal/class/opal_free_list.h +++ b/opal/class/opal_free_list.h @@ -18,9 +18,10 @@ #define OMPI_FREE_LIST_H #include "ompi_config.h" -#include "class/ompi_list.h" -#include "threads/thread.h" -#include "threads/condition.h" + +#include "opal/class/ompi_list.h" +#include "opal/threads/thread.h" +#include "opal/threads/condition.h" #include "include/constants.h" #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/mca/iof/base/base.h b/orte/mca/iof/base/base.h index 6a261d50df..79e8ff278a 100644 --- a/orte/mca/iof/base/base.h +++ b/orte/mca/iof/base/base.h @@ -33,7 +33,7 @@ #include #endif -#include "class/ompi_free_list.h" +#include "opal/class/opal_free_list.h" #include "threads/condition.h" #include "mca/mca.h" #include "mca/iof/iof.h" @@ -51,7 +51,7 @@ struct orte_iof_base_t { ompi_mutex_t iof_lock; ompi_condition_t iof_condition; size_t iof_waiting; - ompi_free_list_t iof_fragments; + opal_free_list_t iof_fragments; size_t iof_window_size; orte_process_name_t* iof_service; }; diff --git a/orte/mca/iof/base/iof_base_fragment.h b/orte/mca/iof/base/iof_base_fragment.h index 447f82ef59..980c47462a 100644 --- a/orte/mca/iof/base/iof_base_fragment.h +++ b/orte/mca/iof/base/iof_base_fragment.h @@ -3,7 +3,7 @@ #include "ompi_config.h" #include "class/ompi_list.h" -#include "class/ompi_free_list.h" +#include "opal/class/opal_free_list.h" #include "event/event.h" #include "mca/iof/iof.h" #include "mca/iof/base/base.h" @@ -35,14 +35,14 @@ OBJ_CLASS_DECLARATION(orte_iof_base_frag_t); #define ORTE_IOF_BASE_FRAG_ALLOC(frag,rc) { \ ompi_list_item_t* item; \ - OMPI_FREE_LIST_GET(&orte_iof_base.iof_fragments, item,rc); \ + OPAL_FREE_LIST_GET(&orte_iof_base.iof_fragments, item,rc); \ if((frag = (orte_iof_base_frag_t*)item) == NULL) { \ ompi_output(0, "ORTE_IOF_BASE_FRAG_ALLOC failed with status=%d\n", rc); \ } \ } #define ORTE_IOF_BASE_FRAG_RETURN(frag) \ - OMPI_FREE_LIST_RETURN(&orte_iof_base.iof_fragments, (ompi_list_item_t*)frag) + OPAL_FREE_LIST_RETURN(&orte_iof_base.iof_fragments, (ompi_list_item_t*)frag) /** diff --git a/orte/mca/iof/base/iof_base_open.c b/orte/mca/iof/base/iof_base_open.c index 91cce7dbdb..b85cc5b653 100644 --- a/orte/mca/iof/base/iof_base_open.c +++ b/orte/mca/iof/base/iof_base_open.c @@ -58,7 +58,7 @@ int orte_iof_base_open(void) OBJ_CONSTRUCT(&orte_iof_base.iof_endpoints, ompi_list_t); OBJ_CONSTRUCT(&orte_iof_base.iof_lock, ompi_mutex_t); OBJ_CONSTRUCT(&orte_iof_base.iof_condition, ompi_condition_t); - OBJ_CONSTRUCT(&orte_iof_base.iof_fragments, ompi_free_list_t); + OBJ_CONSTRUCT(&orte_iof_base.iof_fragments, opal_free_list_t); orte_iof_base.iof_waiting = 0; orte_iof_base.iof_flush = false; @@ -82,15 +82,13 @@ int orte_iof_base_open(void) } /* initialize free list */ - ompi_free_list_init( + opal_free_list_init( &orte_iof_base.iof_fragments, sizeof(orte_iof_base_frag_t), OBJ_CLASS(orte_iof_base_frag_t), 0, /* number to initially allocate */ -1, /* maximum elements to allocate */ - 32, /* number per allocation */ - NULL); /* optional memory pool */ - + 32); /* number per allocation */ /* Open up all available components */ if (OMPI_SUCCESS != diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index e56567b398..b9c6bd24e4 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -179,8 +179,8 @@ int mca_oob_tcp_component_open(void) OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_list, ompi_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peers, ompi_hash_table_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_names, ompi_hash_table_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_free, ompi_free_list_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msgs, ompi_free_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_free, opal_free_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msgs, opal_free_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_lock, ompi_mutex_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_events, ompi_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msg_post, ompi_list_t); @@ -499,21 +499,19 @@ mca_oob_t* mca_oob_tcp_component_init(int* priority) ompi_hash_table_init(&mca_oob_tcp_component.tcp_peers, 128); ompi_hash_table_init(&mca_oob_tcp_component.tcp_peer_names, 128); - ompi_free_list_init(&mca_oob_tcp_component.tcp_peer_free, + opal_free_list_init(&mca_oob_tcp_component.tcp_peer_free, sizeof(mca_oob_tcp_peer_t), OBJ_CLASS(mca_oob_tcp_peer_t), 8, /* initial number */ mca_oob_tcp_component.tcp_peer_limit, /* maximum number */ - 8, /* increment to grow by */ - NULL); /* use default allocator */ + 8); /* increment to grow by */ - ompi_free_list_init(&mca_oob_tcp_component.tcp_msgs, + opal_free_list_init(&mca_oob_tcp_component.tcp_msgs, sizeof(mca_oob_tcp_msg_t), OBJ_CLASS(mca_oob_tcp_msg_t), 8, /* initial number */ -1, /* maximum number */ - 8, /* increment to grow by */ - NULL); /* use default allocator */ + 8); /* increment to grow by */ /* intialize event library */ memset(&mca_oob_tcp_component.tcp_recv_event, 0, sizeof(ompi_event_t)); diff --git a/orte/mca/oob/tcp/oob_tcp.h b/orte/mca/oob/tcp/oob_tcp.h index 2cd76ffe0f..05e29442b2 100644 --- a/orte/mca/oob/tcp/oob_tcp.h +++ b/orte/mca/oob/tcp/oob_tcp.h @@ -25,7 +25,7 @@ #include "mca/oob/base/base.h" #include "mca/base/base.h" #include "mca/ns/ns_types.h" -#include "class/ompi_free_list.h" +#include "opal/class/opal_free_list.h" #include "class/ompi_hash_table.h" #include "event/event.h" #include "threads/mutex.h" @@ -251,10 +251,10 @@ struct mca_oob_tcp_component_t { ompi_list_t tcp_peer_list; /**< list of peers sorted in mru order */ ompi_hash_table_t tcp_peers; /**< peers sorted by name */ ompi_hash_table_t tcp_peer_names; /**< cache of peer contact info sorted by name */ - ompi_free_list_t tcp_peer_free; /**< free list of peers */ + opal_free_list_t tcp_peer_free; /**< free list of peers */ int tcp_peer_limit; /**< max size of tcp peer cache */ int tcp_peer_retries; /**< max number of retries before declaring peer gone */ - ompi_free_list_t tcp_msgs; /**< free list of messages */ + opal_free_list_t tcp_msgs; /**< free list of messages */ ompi_event_t tcp_send_event; /**< event structure for sends */ ompi_event_t tcp_recv_event; /**< event structure for recvs */ ompi_mutex_t tcp_lock; /**< lock for accessing module state */ diff --git a/orte/mca/oob/tcp/oob_tcp_msg.h b/orte/mca/oob/tcp/oob_tcp_msg.h index dfbfa3caeb..b552255d84 100644 --- a/orte/mca/oob/tcp/oob_tcp_msg.h +++ b/orte/mca/oob/tcp/oob_tcp_msg.h @@ -77,7 +77,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_msg_t); #define MCA_OOB_TCP_MSG_ALLOC(msg, rc) \ { \ ompi_list_item_t* item; \ - OMPI_FREE_LIST_GET(&mca_oob_tcp_component.tcp_msgs, item, rc); \ + OPAL_FREE_LIST_GET(&mca_oob_tcp_component.tcp_msgs, item, rc); \ msg = (mca_oob_tcp_msg_t*)item; \ } @@ -91,7 +91,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_msg_t); mca_oob_tcp_msg_iov_return(msg,msg->msg_rwiov); \ if(NULL != msg->msg_rwbuf) \ free(msg->msg_rwbuf); \ - OMPI_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_msgs, (ompi_list_item_t*)msg); \ + OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_msgs, (ompi_list_item_t*)msg); \ } /** diff --git a/orte/mca/oob/tcp/oob_tcp_peer.h b/orte/mca/oob/tcp/oob_tcp_peer.h index 20d9078ca9..79b654617c 100644 --- a/orte/mca/oob/tcp/oob_tcp_peer.h +++ b/orte/mca/oob/tcp/oob_tcp_peer.h @@ -81,7 +81,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t); #define MCA_OOB_TCP_PEER_ALLOC(peer, rc) \ { \ ompi_list_item_t* item; \ - OMPI_FREE_LIST_GET(&mca_oob_tcp_component.tcp_peer_free, item, rc); \ + OPAL_FREE_LIST_GET(&mca_oob_tcp_component.tcp_peer_free, item, rc); \ peer = (mca_oob_tcp_peer_t*)item; \ } @@ -92,7 +92,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t); { \ mca_oob_tcp_peer_shutdown(peer); \ ompi_hash_table_remove_proc(&mca_oob_tcp_component.tcp_peers, &peer->peer_name); \ - OMPI_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_peer_free, (ompi_list_item_t*)peer); \ + OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_peer_free, (ompi_list_item_t*)peer); \ } #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index a4b8905afe..f98ec4fec1 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -33,7 +33,7 @@ #include "include/orte_constants.h" #include "event/event.h" -#include "class/ompi_pointer_array.h" +#include "class/orte_pointer_array.h" #include "util/proc_info.h" #include "util/argv.h" #include "util/ompi_environ.h" @@ -68,7 +68,7 @@ extern char** environ; static struct ompi_event term_handler; static struct ompi_event int_handler; static orte_jobid_t jobid = ORTE_JOBID_MAX; -static ompi_pointer_array_t apps_pa; +static orte_pointer_array_t apps_pa; static bool wait_for_job_completion = true; static char *abort_msg = NULL; static size_t abort_msg_len = -1; @@ -246,7 +246,7 @@ int main(int argc, char *argv[]) /* Convert the list of apps to an array of orte_app_context_t pointers */ - num_apps = ompi_pointer_array_get_size(&apps_pa); + num_apps = orte_pointer_array_get_size(&apps_pa); if (0 == num_apps) { /* This should never happen -- this case should be caught in create_app(), but let's just double check... */ @@ -262,7 +262,7 @@ int main(int argc, char *argv[]) } for (j = i = 0; i < num_apps; ++i) { apps[i] = (orte_app_context_t *) - ompi_pointer_array_get_item(&apps_pa, i); + orte_pointer_array_get_item(&apps_pa, i); j += apps[i]->num_procs; } proc_infos = malloc(sizeof(struct proc_info_t) * j); @@ -691,7 +691,7 @@ static int parse_locals(int argc, char* argv[]) temp_argc = 0; temp_argv = NULL; ompi_argv_append(&temp_argc, &temp_argv, argv[0]); - OBJ_CONSTRUCT(&apps_pa, ompi_pointer_array_t); + OBJ_CONSTRUCT(&apps_pa, orte_pointer_array_t); env = NULL; for (app_num = 0, i = 1; i < argc; ++i) { @@ -714,7 +714,8 @@ static int parse_locals(int argc, char* argv[]) exit(1); } if (made_app) { - ompi_pointer_array_add(&apps_pa, app); + size_t dummy; + orte_pointer_array_add(&dummy, &apps_pa, app); } else { OBJ_RELEASE(app); } @@ -739,7 +740,8 @@ static int parse_locals(int argc, char* argv[]) exit(1); } if (made_app) { - ompi_pointer_array_add(&apps_pa, app); + size_t dummy; + orte_pointer_array_add(&dummy, &apps_pa, app); } else { OBJ_RELEASE(app); } @@ -1121,7 +1123,8 @@ static int parse_appfile(char *filename, char ***env) ompi_argv_free(tmp_env); } if (made_app) { - ompi_pointer_array_add(&apps_pa, app); + size_t dummy; + orte_pointer_array_add(&dummy, &apps_pa, app); } } } while (!feof(fp));