forked from open-mpi/ompi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First complete implementation of the SICM support
- Loading branch information
1 parent
b6a06ca
commit 37f9fe0
Showing
5 changed files
with
558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- indent-tabs-mode:nil -*- | ||
# | ||
# Copyright (c) 2018 UT-Battelle, LLC | ||
# All rights reserved. | ||
# | ||
# Additional copyrights may follow | ||
# | ||
# $HEADERS$ | ||
# | ||
|
||
|
||
AM_CPPFLAGS = $(mpool_sicm_CPPFLAGS) | ||
AM_LDFLAGS = $(mpool_sicm_LDFLAGS) | ||
|
||
if MCA_BUILD_opal_mpool_sicm_DSO | ||
component_noinst = | ||
component_install = mca_mpool_sicm.la | ||
else | ||
component_noinst = libmca_mpool_sicm.la | ||
component_install = | ||
endif | ||
|
||
sicm_SOURCES = mpool_sicm.h \ | ||
mpool_sicm_component.c \ | ||
mpool_sicm_module.c | ||
|
||
mcacomponentdir = $(opallibdir) | ||
mcacomponent_LTLIBRARIES = $(component_install) | ||
mca_mpool_sicm_la_SOURCES = $(sicm_SOURCES) | ||
nodist_mca_mpool_sicm_la_SOURCES = $(sicm_nodist_SOURCES) | ||
mca_mpool_sicm_la_LIBASS = $(top_builddir)/opal/lib@[email protected] \ | ||
$(mpool_sicm_LIBS) | ||
mca_mpool_sicm_la_LDFLAGS = -module -avoid-version $(mpool_sicm_LDFLAGS) | ||
|
||
noinst_LTLIBRARIES = $(component_noinst) | ||
libmca_mpool_sicm_la_SOURCES = $(sicm_SOURCES) | ||
nodist_libmca_mpool_sicm_la_SOURCES = $(sicm_nodist_SOURCES) | ||
libmca_mpool_sicm_la_LIBADD = $(mpool_sicm_LIBS) | ||
libmca_mpool_sicm_la_LDFLAGS = -module -avoid-version $(mpool_sicm_LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- shell-script -*- | ||
# | ||
# Copyright (c) 2018 UT-Battelle, LLC | ||
# All rights reserved. | ||
# $COPYRIGHT$ | ||
# | ||
# Additional copyrights may follow | ||
# | ||
# $HEADER$ | ||
# | ||
|
||
# check if SICM support can be found. | ||
AC_DEFUN([MCA_opal_mpool_sicm_CONFIG], | ||
[OPAL_VAR_SCOPE_PUSH([opal_mpool_sicm_happy]) | ||
AC_CONFIG_FILES([opal/mca/mpool/sicm/Makefile]) | ||
|
||
_sicm_cppflags="" | ||
_sicm_ldflags="" | ||
_sicm_libs="" | ||
|
||
AC_ARG_WITH([sicm], | ||
[AC_HELP_STRING([--with-sicm(=DIR)], | ||
[Build with Simple Interface Complex Memory library support]) | ||
] | ||
) | ||
OPAL_CHECK_WITHDIR([sicm], [$with_sicm], [include/sicm_low.h]) | ||
|
||
AS_IF([test "$with_sicm" != "no"], | ||
[# At the moment, we always assume that users will use their own installation of SICM | ||
|
||
AS_IF([test ! -d "$with_sicm"], | ||
[AC_MSG_RESULT([not found]) | ||
AC_MSG_WARN([Directory $with_sicm not found]) | ||
AC_MSG_ERROR([Cannot continue]) | ||
], | ||
[AC_MSG_RESULT([found]) | ||
_sicm_cppflags="-I$with_sicm/include" | ||
_sicm_ldflags="-L$with_sicm/lib" | ||
_sicm_libs="-lsicm" | ||
opal_mpool_sicm_happy="yes" | ||
] | ||
) | ||
|
||
],[opal_mpool_sicm_happy=no] | ||
) | ||
|
||
AC_SUBST([mpool_sicm_CPPFLAGS],"$_sicm_cppflags") | ||
AC_SUBST([mpool_sicm_LDFLAGS],"$_sicm_ldflags -lsicm") | ||
AC_SUBST([mpool_sicm_LIBS],"$_sicm_libs") | ||
OPAL_VAR_SCOPE_POP | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | ||
/* | ||
* Copyright (c) 2018 UT-Battelle, LLC | ||
* All rights reserved | ||
* | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADERS$ | ||
*/ | ||
|
||
#ifndef MCA_MPOOL_SICM_H | ||
#define MCA_MPOOL_SICM_H | ||
|
||
#include "opal_config.h" | ||
#include "opal/threads/mutex_unix.h" | ||
|
||
#include "opal/mca/event/event.h" | ||
#include "opal/mca/mpool/mpool.h" | ||
|
||
#include "sicm_low.h" | ||
|
||
BEGIN_C_DECLS | ||
|
||
struct mca_mpool_sicm_module_t { | ||
mca_mpool_base_module_t super; | ||
bool sicm_is_initialized; | ||
sicm_device_tag target_device_type; | ||
opal_mutex_t lock; | ||
}; | ||
typedef struct mca_mpool_sicm_module_t mca_mpool_sicm_module_t; | ||
|
||
#if 0 | ||
struct mca_mpool_sicm_module_le_t { | ||
opal_list_item_t super; | ||
mca_mpool_sicm_module_t module; | ||
}; | ||
typedef struct mca_mpool_sicm_module_le_t mca_mpool_sicm_module_le_t; | ||
OBJ_CLASS_DECLARATION(mca_mpool_sicm_module_le_t); | ||
#endif | ||
|
||
struct mca_mpool_sicm_component_t { | ||
mca_mpool_base_component_t super; | ||
int module_count; | ||
mca_mpool_sicm_module_t **modules; | ||
int priority; | ||
int output; | ||
sicm_device_list devices; | ||
}; | ||
typedef struct mca_mpool_sicm_component_t mca_mpool_sicm_component_t; | ||
OPAL_MODULE_DECLSPEC extern mca_mpool_sicm_component_t mca_mpool_sicm_component; | ||
|
||
int mpool_sicm_module_init (mca_mpool_sicm_module_t *module); | ||
|
||
void mpool_sicm_finalize (mca_mpool_base_module_t *module); | ||
|
||
#if 0 | ||
static void* mpool_sicm_alloc (mca_mpool_base_module_t *module, size_t size, size_t align, uint32_t flags); | ||
|
||
static void* mpool_sicm_realloc (mca_mpool_base_module_t *module, void *addr, size_t size); | ||
|
||
static void mpool_sicm_free (mca_mpool_base_module_t *module, void *addr); | ||
#endif | ||
|
||
END_C_DECLS | ||
|
||
#endif /* MCA_MPOOL_SICM_H */ |
Oops, something went wrong.