sys-cluster/nanox: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-08-18 04:20:47 +02:00
parent 083107b154
commit dc85dbdf65
5 changed files with 242 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST nanox-0.15_p20210222.tar.gz 1185393 BLAKE2B 8837221120cd2fd61ef3f02c6e382f3ca5533e64054447b57e11878f31310e556f28c440e22a9cbb031ee4f67ee6bca7715e6faa45c18c1943391933802f6564 SHA512 1155c9ff0885014900fddfd3d410bed2b8551c90b44aaf90e8bf3c0c866b9b41e2a812bed27592f8f55b728c65f1d091d211574f1186109c787eab3f94a9789a

View File

@@ -0,0 +1,11 @@
--- a/m4/ax_config_cc.m4
+++ b/m4/ax_config_cc.m4
@@ -71,7 +71,7 @@
# Default: use -include flag
cc_dep_CPPFLAGS="-include \"config.h\" -include \"nanox-config.h\""
cc_dep_CXXFLAGS="-include \"new_decl.hpp\""
- AX_APPEND_FLAG([-Wall -Wextra -Wshadow -Wmissing-declarations -Wno-unused-parameter -Wno-missing-field-initializers -Werror],[cc_dep_CXXFLAGS])
+ AX_APPEND_FLAG([-Wall -Wextra -Wshadow -Wmissing-declarations -Wno-unused-parameter -Wno-missing-field-initializers],[cc_dep_CXXFLAGS])
no_inline_flag=-fno-inline
])

View File

@@ -0,0 +1,61 @@
--- a/m4/ax_check_memkind.m4
+++ b/m4/ax_check_memkind.m4
@@ -25,17 +25,10 @@
# DESCRIPTION
#
# Check whether Memkind path to the headers and libraries are correctly specified.
-# Also checks Jemalloc library availability (required by libmemkind).
#
AC_DEFUN([AX_CHECK_MEMKIND],[
-AC_ARG_WITH(jemalloc,
-[AS_HELP_STRING([--with-jemalloc,--with-jemalloc=PATH],
- [search in system directories or specify prefix directory for installed jemalloc package.])],
-[],
-[with_jemalloc=no])
-
AC_ARG_WITH(memkind,
[AS_HELP_STRING([--with-memkind,--with-memkind=PATH],
[search in system directories or specify prefix directory for installed memkind package.])],
@@ -45,7 +38,7 @@
AS_IF([test "$with_memkind" != no],[
memkindinc=-I$with_memkind/include
- memkindlib="-L$with_jemalloc/lib -Wl,-rpath,$with_jemalloc/lib -L$with_memkind/lib -Wl,-rpath,$with_memkind/lib"
+ memkindlib="-L$with_memkind/lib -Wl,-rpath,$with_memkind/lib"
AC_LANG_PUSH([C++])
@@ -54,16 +47,6 @@
AX_VAR_PUSHVALUE([LDFLAGS],[$LDFLAGS $memkindlib])
AX_VAR_PUSHVALUE([LIBS],[])
- AC_SEARCH_LIBS([je_malloc], [jemalloc], [
- jemalloc=yes
- ],[
- AC_SEARCH_LIBS([jemk_malloc], [jemalloc],
- [jemalloc=yes],
- [jemalloc=no])
- ])
-
- AS_IF([test "$jemalloc" = yes],[
-
AC_CHECK_HEADERS([memkind.h],
[memkind=yes],
[memkind=no])
@@ -74,14 +57,6 @@
[memkind=no])
])dnl
- ],[
- AC_MSG_ERROR([
-------------------------------
-Could not find libjemalloc (required by memkind)
-Please, check that the provided directories are correct.
-------------------------------])
- ])dnl
-
AS_IF([test "$memkind" = yes],[
AC_DEFINE([MEMKIND_SUPPORT],[],[Enables memkind support])
],[

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<longdescription lang="en">
Nanos++ is a parallel runtime library aimed at fast prototyping developed by the Programming Models group at the Barcelona Supercomputing Center.
Nanos++ is mainly used together with the Mercurium compiler to implement the OmpSs programming model (an extension to the OpenMP programming model based only in tasks). Both tools also implement OpenMP 3.1 features and include some additional extensions (some of them also introduced in following OpenMP releases).
The runtime provides several services to support task parallelism using a synchronization mechanism based on data-dependencies. Data parallelism is also supported by means of services mapped on top of its task support. Task are implemented as user-level threads when possible (currently x86, x86-64, ia64, arm, aarch64, ppc32 and ppc64 are supported). It also provides support for maintaining coherence across different address spaces (such as with GPUs or cluster nodes) by means of a directory/cache mechanism.
The main purpose of Nanos++ RTL is to be used in research of parallel programming environments. Our aim has been to enable easy development of different parts of the runtime so researchers have a platform that allows them to try different mechanisms. As such it is designed to be extensible by means of plugins. The scheduling policy, the throttling policy, the dependence approach, the barrier implementations, slicers and worksharing mechanisms, the instrumentation layer and the architectural dependant level are examples of plugins that developers may easily implement using Nanos++. This extensibility does not come for free. The runtime overheads are slightly increased, but there should be low enough for results to be meaningful except for cases of extreme-fine grain applications.
</longdescription>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/bsc-pm/nanox/issues</bugs-to>
<remote-id type="github">bsc-pm/nanox</remote-id>
</upstream>
<use>
<flag name="allocator">Enables Allocator module</flag>
<flag name="ayudame">Enables ayudame support from <pkg>sys-cluster/temanejo</pkg></flag>
<!--<flag name="cuda">enable CUDA</flag>-->
<flag name="debug">Enable generation of debug version</flag>
<flag name="dlb">build with <pkg>sys-cluster/dlb</pkg> library support</flag>
<flag name="extrae">build with <pkg>sys-cluster/extrae</pkg> support</flag>
<flag name="gasnet">Enable <pkg>sys-cluster/gasnet</pkg> support</flag>
<flag name="hwloc">Enable <pkg>sys-apps/hwloc</pkg> support</flag>
<flag name="instrumentation">Enable generation of instrumentation version</flag>
<flag name="memkind">Enables <pkg>dev-libs/memkind</pkg> support</flag>
<flag name="memtracker">Enables Memtracker module</flag>
<flag name="opencl">Enables openCL support</flag>
<flag name="papi">enable <pkg>dev-libs/papi</pkg> support</flag>
<flag name="resiliency">Enables task-level resiliency</flag>
<flag name="task-callback">Enables task callback feature</flag>
<flag name="sqlite">enable <pkg>dev-db/sqlite</pkg> support</flag>
<flag name="threads">Enable user level threads</flag>
</use>
</pkgmetadata>

View File

@@ -0,0 +1,132 @@
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
COMMIT="2220ba975b0d4173512749141498083dd3999bd0"
DOCS_BUILDER="doxygen"
DOCS_CONFIG_NAME="doxy-nanox"
DOCS_DIR="doc"
inherit autotools docs
DESCRIPTION="Nanos++ is a runtime designed to serve as runtime support in parallel environments"
HOMEPAGE="
https://pm.bsc.es/nanox
https://github.com/bsc-pm/nanox
"
SRC_URI="https://github.com/bsc-pm/nanox/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="allocator ayudame debug dlb +extrae gasnet +instrumentation hwloc memkind memtracker mpi opencl papi sqlite resiliency task-callback +threads"
CDEPEND="
ayudame? ( sys-cluster/temanejo )
dlb? ( sys-cluster/dlb )
extrae? ( sys-cluster/extrae[nanos] )
gasnet? ( sys-cluster/gasnet )
hwloc? ( sys-apps/hwloc )
memkind? ( dev-libs/memkind )
mpi? ( virtual/mpi )
papi? ( dev-libs/papi )
sqlite? ( dev-db/sqlite )
"
RDEPEND="
${CDEPEND}
opencl? ( virtual/opencl )
"
DEPEND="
${CDEPEND}
opencl? ( dev-util/opencl-headers )
"
PATCHES=(
"${FILESDIR}/${PN}-no-jemalloc.patch"
"${FILESDIR}/${PN}-no-Werror.patch"
)
REQUIRED_USE="instrumentation? ( extrae )"
src_prepare() {
default
eautoreconf
}
src_configure() {
use opencl && addwrite /dev/dri/
use opencl && addwrite /var/lib/portage/home/.cache #mesa shader cache
local myconf=(
--disable-static
--enable-gcc-new-atomic-builtins
--enable-performance
--enable-shared
--without-cellsdk
--without-cuda
--without-mcc
--without-xdma
$(use_enable allocator)
$(use_enable debug)
$(use_enable instrumentation)
$(use_enable memtracker)
$(use_enable resiliency)
$(use_enable task-callback)
$(use_enable threads ult)
$(use_with dlb)
$(use_with opencl)
)
use ayudame && myconf+=( "--with-ayudame=${EPREFIX}/usr" )
use hwloc && myconf+=( "--with-hwloc=${EPREFIX}/usr" )
use debug && use instrumentation && myconf+=( "--enable-instrumentation-debug" )
if use extrae; then
myconf+=( "--with-extrae=${EPREFIX}/usr" )
else
myconf+=( "--without-extrae" )
fi
if use gasnet; then
myconf+=( "--with-gasnet=${EPREFIX}/usr" )
else
myconf+=( "--without-gasnet" )
fi
if use memkind; then
myconf+=( "--with-memkind=${EPREFIX}/usr" )
else
myconf+=( "--without-memkind" )
fi
if use mpi; then
myconf+=( "--with-mpi=${EPREFIX}/usr" )
else
myconf+=( "--without-mpi" )
fi
if use papi; then
myconf+=( "--with-papi=${EPREFIX}/usr" )
else
myconf+=( "--without-papi" )
fi
if use sqlite; then
myconf+=( "--with-sqlite3=${EPREFIX}/usr" )
else
myconf+=( "--without-sqlite3" )
fi
econf "${myconf[@]}"
}
# --without-chapel
# --without-nextsim
src_compile() {
default
docs_compile
}
src_install() {
default
einstalldocs
find "${ED}" -name '*.la' -delete || die
}