diff --git a/configure.ac b/configure.ac index de30f0611e9c7ee5e514e3851e0bff256eb5de43..722c7a0364b105d28b1bcb34c981fa2b1d47ff55 100644 --- a/configure.ac +++ b/configure.ac @@ -98,7 +98,7 @@ AS_IF([ test "x$DOXYGEN" == x ], AM_CONDITIONAL([WITH_VERBOSE_DOXYGEN], [ test x$enable_verbose_doxygen != xno ]) dnl propagate the doxygen verbose level to distribution AS_IF([ test x$enable_verbose_doxygen == xyes ], - [AC_SUBST([GYRE_CONF_DOXY_VERBOSE], [--enable-verbose-doxygen])]) + [AC_SUBST([MSTRO_CONF_DOXY_VERBOSE], [--enable-verbose-doxygen])]) AC_CHECK_PROGS([DOT], [dot], [no]) AS_IF([ test "x$DOT" == xno ], [AC_MSG_WARN([Doxygen needs dot to generate graphs. Your documentation may be incomplete.]) @@ -142,14 +142,19 @@ AC_CHECK_HEADER([netinet/in.h], dnl libdrc on cray? -PKG_CHECK_MODULES( - [DRC], - [cray-drc], - [AC_DEFINE_UNQUOTED([HAVE_DRC], 1, [Define if DRC support is included]) - AC_SUBST(DRC_CFLAGS) - AC_SUBST(DRC_LIBS) - ], - [AC_MSG_NOTICE([no libdrc support])]) +dnl PKG_CHECK_MODULES is not robust, so we do it directly +AC_MSG_CHECKING([for DRC on Cray]) +if pkg-config cray-drc; then + AC_MSG_NOTICE([found cray-drc]) + AC_DEFINE_UNQUOTED([HAVE_DRC], 1, [Define if DRC support is included]) + DRC_CFLAGS=`pkg-config --cflags cray-drc` + DRC_LIBS=`pkg-config --libs cray-drc` +else + AC_MSG_NOTICE([no libdrc support]) + AC_MSG_WARN([If you are running on a Cray system consider loading module rdma-credentials]) +fi +AC_SUBST(DRC_CFLAGS) +AC_SUBST(DRC_LIBS) LIBS="$DRC_LIBS $LIBS" diff --git a/include/maestro/cdo.h b/include/maestro/cdo.h index 94e9cbeacf3475fe9d66d7910ceeb4cf5258e689..11dbc058c3332d754ee8dc0373bfa23860ac9cc2 100644 --- a/include/maestro/cdo.h +++ b/include/maestro/cdo.h @@ -82,6 +82,14 @@ mstro_cdo_declare(const unsigned char *name, mstro_status mstro_cdo_attribute_set(mstro_cdo cdo, const char*key, void* val); +/** + ** @brief Add (@arg key, @arg val_in_yaml) pair to attribute set of @arg cdo + ** + ** @returns { a status code, ::MSTRO_OK on success } + **/ +mstro_status +mstro_cdo_attribute_set_yaml(mstro_cdo cdo, const char*key, const char *val_in_yaml); + /** ** @brief Mark CDO declaration as complete ** diff --git a/include/maestro/i_cdo.h b/include/maestro/i_cdo.h index 2c3386dee6468bab10b56e38f3a489facb920c96..aec297cdc3c67f7daf9534195c5cd75c38ebb563 100644 --- a/include/maestro/i_cdo.h +++ b/include/maestro/i_cdo.h @@ -45,6 +45,8 @@ #include <stdbool.h> #include <string.h> +#include <yaml.h> + /** CDO state bitfield */ typedef uint32_t mstro_cdo_state; @@ -152,16 +154,41 @@ mstro_cdo_id_from_name(const unsigned char *name, +struct mstro_cdo_attr_table_entry { + char *attr_name; + void *value; + yaml_document_t yaml_value; /* can be NULL */ +}; +#define MSTRO_CDO_DEFAULT_ATTR_COUNT 10 /** the structure describing a CDO */ struct mstro_cdo_ { - /* attributes */ - struct mstro_cdo_id id; /**< the locally unique ID */ - struct mstro_cdo_id gid; /**< the globally unique ID */ mstro_cdo_state state; /**< current state of the CDO */ unsigned char *name; - /* scope object */ - /* ... */ + /* direct attributes */ + struct mstro_cdo_id id; /**< the locally unique ID */ + struct mstro_cdo_id gid; /**< the globally unique ID */ + /* all other attributes are stored in the following table */ + size_t num_attributes; + size_t num_attr_table_entries_free; + struct mstro_cdo_attr_table_entry attributes[MSTRO_CDO_DEFAULT_ATTR_COUNT]; /* self-extending structure, be sure to use mstro_cdo_create and mstro_cdo_extend function */ }; +typedef struct mstro_cdo_ * mstro_cdo; + +/* create a CDO handle +* +* will yield a type 0 CDO already. +*/ +mstro_status +mstro_cdo_create(const char* name, mstro_cdo *result); + +/* destroy a CDO handle */ +mstro_status +mstro_cdo_destroy(mstro_cdo cdo); + +/* extend CDO data structure to fit more attributes in */ +mstro_status +mstro_cdo_extend(mstro_cdo cdo); + #endif /* MAESTRO_I_CDO_H_ */ diff --git a/maestro/conductor_dummy.c b/maestro/conductor_dummy.c new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/maestro/ofi.c b/maestro/ofi.c index cf6aada7ad6bf277b1b348f57d2f2f363e8cd43e..96ec97099d73d4992e92fd8af27364e2216b2ea2 100644 --- a/maestro/ofi.c +++ b/maestro/ofi.c @@ -1160,14 +1160,15 @@ mstro_ofi_init(void) /* create one entry in our global EP list per entry */ size_t i=0; LL_FOREACH(fi,tmp) { - ERR("index %zu\n", i++); + NOISE("index %zu\n", i); + i++; retstat = mstro_ep_build_from_ofi(&(g_endpoints->eps[g_endpoints->size]), tmp); if(retstat!=MSTRO_OK) { - ERR("Failed to build EP, trying others\n"); + WARN("Failed to build EP %zu, trying others\n", i); } else { - ERR("%zu. possible endpoint interface %s\n", + INFO("%zu. possible endpoint interface %s\n", g_endpoints->size, mstro_endpoint_describe(&g_endpoints->eps[g_endpoints->size])); g_endpoints->eps[g_endpoints->size].next