1
1

rework argobots configury to be smarter

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
Этот коммит содержится в:
Howard Pritchard 2020-04-30 08:26:01 -06:00
родитель e21c31f54c
Коммит b9498ec31b
10 изменённых файлов: 106 добавлений и 17 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -674,3 +674,4 @@ test/util/bipartite_graph
opal/test/reachable/reachable_netlink
opal/test/reachable/reachable_weighted
opal/mca/threads/argobots/threads_argobots.h

Просмотреть файл

@ -18,9 +18,9 @@
# $HEADER$
#
noinst_LTLIBRARIES = libmca_threads_argobots.la
AM_CPPFLAGS = $(opal_argo_CPPFLAGS)
libmca_threads_argobots_la_SOURCES = \
sources = \
threads_argobots.h \
threads_argobots_component.c \
threads_argobots_condition.c \
@ -32,4 +32,27 @@ libmca_threads_argobots_la_SOURCES = \
threads_argobots_wait_sync.c \
threads_argobots_wait_sync.h
AM_LDFLAGS = -labt
#lib = libmca_threads_argobots.la
lib_sources = $(sources)
if MCA_BUILD_opal_threads_argobots_DSO
component_noinst =
component_install = mca_threads_argobots.la
else
component_noinst = libmca_threads_argobots.la
component_install =
endif
mcacomponentdir = $(opallibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_threads_argobots_la_SOURCES = $(sources)
mca_threads_argobots_la_LDFLAGS = -module -avoid-version
mca_threads_argobots_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \
$(opal_argo_LIBS)
noinst_LTLIBRARIES = $(component_noinst)
libmca_threads_argobots_la_SOURCES = $(sources)
libmca_threads_argobots_la_LDFLAGS = -module -avoid-version $(opal_argo_LDFLAGS)
libmca_threads_argobots_la_LIBADD = $(opal_argo_LIBS)

Просмотреть файл

@ -24,13 +24,68 @@
#
AC_DEFUN([OPAL_CONFIG_ARGOBOTS_THREADS],[
AC_CHECK_HEADERS([abt.h],
[AC_CHECK_LIB([abt],[ABT_init],
[threads_argobots_happy="yes"],
[threads_argobots_happy="no"])],
[threads_argobots_happy="no"])
AS_IF([test "$threads_argobots_happy" = "yes"],
AC_ARG_WITH([argobots],
[AC_HELP_STRING([--with-argobots=DIR],
[Specify location of argobots installation. Error if argobots support cannot be found.])])
AC_ARG_WITH([argobots-libdir],
[AC_HELP_STRING([--with-argobots-libdir=DIR],
[Search for argobots libraries in DIR])])
opal_check_argo_save_CPPFLAGS=$CPPFLAGS
opal_check_argo_save_LDFLAGS=$LDFLAGS
opal_check_argo_save_LIBS=$LIBS
opal_argo_happy=yes
AS_IF([test "$with_argo" = "no"],
[opal_argo_happy=no])
AS_IF([test $opal_argo_happy = yes],
[AC_MSG_CHECKING([looking for argobots in])
AS_IF([test "$with_argobots" != "yes"],
[opal_argo_dir=$with_argobots
AC_MSG_RESULT([($opal_argo_dir)])],
[AC_MSG_RESULT([(default search paths)])])
AS_IF([test ! -z "$with_argobots_libdir" && \
test "$with_argobots_libdir" != "yes"],
[opal_argo_libdir=$with_argobots_libdir])
])
AS_IF([test $opal_argo_happy = yes],
[OPAL_CHECK_PACKAGE([opal_argo],
[abt.h],
[abt],
[ABT_init],
[],
[$opal_argo_dir],
[$opal_argo_libdir],
[],
[opal_argo_happy=no])])
AS_IF([test $opal_argo_happy = yes && test -n "$opal_argo_dir"],
[OPAL_ARGO_INCLUDE_PATH="$opal_argo_dir/include/"],
[OPAL_ARGO_INCLUDE_PATH=""])
AS_IF([test $opal_argo_happy = yes],
[AC_CONFIG_FILES([opal/mca/threads/argobots/threads_argobots.h])
AC_SUBST([OPAL_ARGO_INCLUDE_PATH])
AC_SUBST([opal_argo_CPPFLAGS])
AC_SUBST([opal_argo_LDFLAGS])
AC_SUBST([opal_argo_LIBS])
TPKG_CFLAGS="$opal_argo_CPPFLAGS"
TPKG_FCFLAGS="$opal_argo_CPPFLAGS"
TPKG_CXXFLAGS="$opal_argo_CPPFLAGS"
TPKG_CPPFLAGS="$opal_argo_CPPFLAGS"
TPKG_CXXCPPFLAGS="$opal_argo_CPPFLAGS"
TPKG_LDFLAGS="$opal_argo_LDFLAGS"
TPKG_LIBS="$opal_argo_LIBS"])
CPPFLAGS=$opal_check_argo_save_CPPFLAGS
LDFLAGS=$opal_check_argo_save_LDFLAGS
LIBS=$opal_check_argo_save_LIBS
AS_IF([test "$opal_argo_happy" = "yes"],
[$1],
[$2])
])dnl
@ -44,6 +99,7 @@ AC_DEFUN([MCA_opal_threads_argobots_COMPILE_MODE], [
AC_MSG_RESULT([$$4])
])
# If component was selected, $1 will be 1 and we should set the base header
AC_DEFUN([MCA_opal_threads_argobots_POST_CONFIG],[
AS_IF([test "$1" = "1"],
@ -60,6 +116,21 @@ AC_DEFUN([MCA_opal_threads_argobots_POST_CONFIG],[
AC_DEFINE_UNQUOTED([MCA_threads_wait_sync_base_include_HEADER],
["opal/mca/threads/argobots/threads_argobots_wait_sync.h"],
[Header to include for wait_sync implementation])
THREAD_CFLAGS="$TPKG_CFLAGS"
THREAD_FCFLAGS="$TPKG_FCFLAGS"
THREAD_CXXFLAGS="$TPKG_CXXFLAGS"
THREAD_CPPFLAGS="$TPKG_CPPFLAGS"
THREAD_CXXCPPFLAGS="$TPKG_CXXCPPFLAGS"
THREAD_LDFLAGS="$TPKG_LDFLAGS"
THREAD_LIBS="$TPKG_LIBS"
AC_SUBST(THREAD_CFLAGS)
AC_SUBST(THREAD_FCFLAGS)
AC_SUBST(THREAD_CXXFLAGS)
AC_SUBST(THREAD_CPPFLAGS)
AC_SUBST(THREAD_LDFLAGS)
AC_SUBST(THREAD_LIBS)
LIBS="$LIBS $THREAD_LIBS"
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
])
])dnl

Просмотреть файл

@ -26,7 +26,7 @@
#ifndef OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_H
#define OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_H
#include <abt.h>
#include "@OPAL_ARGO_INCLUDE_PATH@abt.h"
static inline void opal_threads_argobots_ensure_init(void)
{

Просмотреть файл

@ -27,7 +27,6 @@
#include "opal/mca/threads/thread.h"
#include "opal/mca/threads/threads.h"
#include "opal/constants.h"
#include <abt.h>
static int opal_threads_argobots_open(void);

Просмотреть файл

@ -32,8 +32,6 @@
#include "opal/mca/threads/threads.h"
#include "opal/mca/threads/tsd.h"
#include <abt.h>
struct opal_tsd_key_value {
opal_tsd_key_t key;
opal_tsd_destructor_t destructor;

Просмотреть файл

@ -40,7 +40,6 @@
#include "opal/sys/atomic.h"
#include "opal/util/output.h"
#include <abt.h>
BEGIN_C_DECLS

Просмотреть файл

@ -26,8 +26,8 @@
#ifndef OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_THREADS_H
#define OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_THREADS_H
#include <abt.h>
#include <signal.h>
#include "opal/mca/threads/argobots/threads_argobots.h"
struct opal_thread_t {
opal_object_t super;

Просмотреть файл

@ -28,7 +28,6 @@
#define OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_TSD_H
#include "opal/mca/threads/argobots/threads_argobots.h"
#include <abt.h>
typedef ABT_key opal_tsd_key_t;

Просмотреть файл

@ -27,7 +27,6 @@
#define OPAL_MCA_THREADS_ARGOBOTS_THREADS_ARGOBOTS_WAIT_SYNC_H
#include "opal/mca/threads/argobots/threads_argobots.h"
#include <abt.h>
typedef struct ompi_wait_sync_t {
opal_atomic_int32_t count;