aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-08-18 04:20:47 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-08-18 04:22:47 +0200
commitdc85dbdf657f419324895f8f080c83251eacc531 (patch)
treed003a77bee17d5733b05509d53320f7f31d3127f /sys-cluster/nanox
parentsys-cluster/paraver-kernel: initial import (diff)
downloadguru-dc85dbdf657f419324895f8f080c83251eacc531.tar.gz
guru-dc85dbdf657f419324895f8f080c83251eacc531.tar.bz2
guru-dc85dbdf657f419324895f8f080c83251eacc531.zip
sys-cluster/nanox: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sys-cluster/nanox')
-rw-r--r--sys-cluster/nanox/Manifest1
-rw-r--r--sys-cluster/nanox/files/nanox-no-Werror.patch11
-rw-r--r--sys-cluster/nanox/files/nanox-no-jemalloc.patch61
-rw-r--r--sys-cluster/nanox/metadata.xml37
-rw-r--r--sys-cluster/nanox/nanox-0.15_p20210222.ebuild132
5 files changed, 242 insertions, 0 deletions
diff --git a/sys-cluster/nanox/Manifest b/sys-cluster/nanox/Manifest
new file mode 100644
index 000000000..c23f35be7
--- /dev/null
+++ b/sys-cluster/nanox/Manifest
@@ -0,0 +1 @@
+DIST nanox-0.15_p20210222.tar.gz 1185393 BLAKE2B 8837221120cd2fd61ef3f02c6e382f3ca5533e64054447b57e11878f31310e556f28c440e22a9cbb031ee4f67ee6bca7715e6faa45c18c1943391933802f6564 SHA512 1155c9ff0885014900fddfd3d410bed2b8551c90b44aaf90e8bf3c0c866b9b41e2a812bed27592f8f55b728c65f1d091d211574f1186109c787eab3f94a9789a
diff --git a/sys-cluster/nanox/files/nanox-no-Werror.patch b/sys-cluster/nanox/files/nanox-no-Werror.patch
new file mode 100644
index 000000000..e9ec847c4
--- /dev/null
+++ b/sys-cluster/nanox/files/nanox-no-Werror.patch
@@ -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
+ ])
+
diff --git a/sys-cluster/nanox/files/nanox-no-jemalloc.patch b/sys-cluster/nanox/files/nanox-no-jemalloc.patch
new file mode 100644
index 000000000..f7a4b1c2a
--- /dev/null
+++ b/sys-cluster/nanox/files/nanox-no-jemalloc.patch
@@ -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])
+ ],[
diff --git a/sys-cluster/nanox/metadata.xml b/sys-cluster/nanox/metadata.xml
new file mode 100644
index 000000000..94aba7304
--- /dev/null
+++ b/sys-cluster/nanox/metadata.xml
@@ -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>
diff --git a/sys-cluster/nanox/nanox-0.15_p20210222.ebuild b/sys-cluster/nanox/nanox-0.15_p20210222.ebuild
new file mode 100644
index 000000000..023bc14c9
--- /dev/null
+++ b/sys-cluster/nanox/nanox-0.15_p20210222.ebuild
@@ -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
+}