* move ompi_rb_tree from opal to ompi since it's only used in ompi, and should
have the ompi_free_list instead of the opal_free_list * Change orte to use opal_free_list instead of ompi_free_list This commit was SVN r6307.
Этот коммит содержится в:
родитель
0cc4308417
Коммит
8077da277b
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <unistd.h>
|
||||
#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;
|
||||
};
|
||||
|
@ -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)
|
||||
|
||||
|
||||
/**
|
||||
|
@ -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 !=
|
||||
|
@ -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));
|
||||
|
@ -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 */
|
||||
|
@ -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); \
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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));
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user