Skip to content
Commits on Source (59)
......@@ -41,3 +41,4 @@ m4/ltversion.m4
m4/lt~obsolete.m4
nbproject
ar-lib
nanox-config.h
language: cpp
script:
- ./bootstrap
- ./configure --disable-instrumentation --disable-debug
- make
- make check BETS_OPTIONS="-only-fails"
......@@ -23,10 +23,14 @@ EXTRA_DIST = ChangeLog
ACLOCAL_AMFLAGS=-I m4
devincludedir = $(prefix)/include/nanox-dev
nodist_devinclude_HEADERS = nanox-config.h
# We use an install hook to remove old deprecated libraries, which are not tracked
# anymore by Automake so they need to be removed manually
REMOVE_LIBS = \
libnanox-ss\
libnanox-ss \
libnanox-sched-affinity-smartpriority \
$(END)
remove-old-libraries:
......
Nanos++ Runtime Library
=======================
# Nanos++ Runtime Library
Nanos++ is a runtime library designed to serve as runtime support in parallel
environments. It is mainly used to support **OmpSs** (an extension to the
OpenMP programming model based only in tasks). The runtime is developed at the
**Barcelona Supercomputing Center** within the **Programming Models** group.
Appart from OmpSs Nanos++ also supports most of the **OpenMP** 3.1 features
and includes some additional extensions (some of them also introduced in
Nanos++ is a parallel runtime library aimed at fast
prototyping developed by the [*Programming Models group*](https://pm.bsc.es/)
at the [**Barcelona Supercomputing Center**](http://www.bsc.es/).
Nanos++ is mainly used together with the [Mercurium compiler](https://github.com/bsc-pm/mcxx)
to implement the [**OmpSs programming model**](https://pm.bsc.es/ompss)
(an extension to the OpenMP programming model based only in tasks).
Both tools also implement [**OpenMP 3.1**](https://pm.bsc.es/openmp) 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
......@@ -24,7 +26,7 @@ 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 implements using Nanos++. This extensibility
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.
......@@ -34,8 +36,7 @@ You can find further information about the Nanos++ RTL usage in our
and about Nanos++ RTL development in our
[developers guide](doc/developers_guide.md).
Reporting New Issues
-------------------
## Reporting New Issues
Should you find a bug or want to make a feature request you can create a new
ticket. As Nanos++ is a medium-sized piece of software so, in order to make bug
......@@ -58,11 +59,9 @@ application is built.
e-mail there to track a bug and receive all the notifications due the different
actions taken in this ticket.
If you have any questions or suggestions you can contact the programming model
group at BSC by sending an e-mail to **pm-tools**\*. You can also join our
**pm-tools-users** mailing list by sending an e-mail to **pm-tools-users-join**\*.
***
## Contact Information
(\*) All our email accounts are hosted at **bsc.es** (i.e. \<account-name\>@bsc.es).
For questions, suggestions and bug reports, you can contact us through the pm-tools@bsc.es.
You can also join our pm-tools-users@bsc.es mailing list by sending an e-mail to
pm-tools-users-join@bsc.es.
\ No newline at end of file
#!/usr/bin/env bash
cd $(dirname $(readlink -f $0))
autoreconf -fiv
# Patch ltmain.sh
......
AC_INIT([nanox], [0.12a], [pm-tools@bsc.es])
AC_INIT([nanox], [0.14a], [pm-tools@bsc.es])
AC_LANG([C++])
AC_CONFIG_SRCDIR([src/core/system.cpp])
AC_DEFINE_UNQUOTED([NANOX_CONFIGURE_ARGS], ["$0 $@"], [Configure line])
......@@ -55,22 +55,6 @@ AC_DEFINE_UNQUOTED([NANOX_BUILD_VERSION], [$build_version], [Build version])
AC_CHECK_PROG([DEB_RELEASE], [lsb_release], [$(lsb_release -sc)], [])
AC_SUBST([DEB_RELEASE])
# Allocator support
AC_MSG_CHECKING([if Nanos++ Allocator has been enabled])
AC_ARG_ENABLE([allocator], [AS_HELP_STRING([--enable-allocator], [Enables Allocator module])])
AC_MSG_RESULT([$enable_allocator])
AS_IF([test "$enable_allocator" = yes],[
AC_DEFINE([NANOS_USE_ALLOCATOR],[1],[Specifies whether Nanos++ allocator has been enabled or not])
])
# Memtracker support
AC_MSG_CHECKING([if Nanos++ Memtracker has been enabled])
AC_ARG_ENABLE([memtracker],[AS_HELP_STRING([--enable-memtracker], [Enables Memtracker module])])
AC_MSG_RESULT([$enable_memtracker])
AS_IF([test "$enable_memtracker" = xyes],[
AC_DEFINE([NANOS_MEMTRACKER_ENABLED],[1],[Specifies whether Nanos++ memtracker module has been enabled or not])
])
# Set compiler default flags
: ${CFLAGS=""}
: ${CXXFLAGS=""}
......@@ -160,42 +144,7 @@ AX_CHECK_XDMA
AX_ENABLE_TASK_CALLBACK
# Extrae check
MPITRACE_HOME=""
MPITRACE_INC=""
MPITRACE_LIB=""
MPITRACE_BIN=""
AC_ARG_WITH([extrae],
AS_HELP_STRING([--with-extrae=dir], [Directory of Extrae installation]),
[
extrae_version_h=$withval/include/extrae_version.h
AS_IF([test -e $extrae_version_h],[
extrae_version_string=$(sed -ne '/^\s*#\s*define\s\+EXTRAE_VERSION .*$/p' $extrae_version_h)
extrae_version=$(echo $extrae_version_string | sed -e 's/#define EXTRAE_VERSION EXTRAE_VERSION_NUMBER(\([0-9]*\),\([0-9]*\),\([0-9]*\).*$/\1\2\3/')
AS_IF([test "$extrae_version" -ge 240],[
MPITRACE_HOME="$withval"
MPITRACE_INC="$withval/include"
MPITRACE_LIB="$withval/lib"
AS_IF([test -d "$MPITRACE_HOME/lib64"],[
MPITRACE_LIB="$MPITRACE_HOME/lib64"
])
MPITRACE_BIN="$withval/bin"
AC_MSG_RESULT([checking if Extrae library is compatible... yes])
],[
AC_MSG_ERROR([checking if Extrae library is compatible... no (Extrae > 2.4 needed)])
])
],[
AC_MSG_ERROR([checking if Extrae library is compatible... no (Extrae > 2.4 needed)])
])
]
)
AC_SUBST([MPITRACE_HOME])
AC_SUBST([MPITRACE_INC])
AC_SUBST([MPITRACE_LIB])
AC_SUBST([MPITRACE_BIN])
AM_CONDITIONAL([instrumentation_EXTRAE], test x"$MPITRACE_HOME" != x)
AX_CHECK_EXTRAE
# Check NextSim support
AC_ARG_WITH([nextsim],
......@@ -272,6 +221,29 @@ AC_SUBST([MCXX])
# Build versions
AX_BUILD_VERSIONS
# Allocator support
AC_MSG_CHECKING([if Nanos++ Allocator has been enabled])
AC_ARG_ENABLE([allocator], [AS_HELP_STRING([--enable-allocator], [Enables Allocator module])],
[], dnl Implicit: enable_allocator=$enableval
[enable_allocator="no"])
AC_MSG_RESULT([$enable_allocator])
AS_IF([test "$enable_allocator" = yes],[
AC_DEFINE([NANOS_USE_ALLOCATOR],[1],[Specifies whether Nanos++ allocator has been enabled])
])
# Memtracker support
AC_MSG_CHECKING([if Nanos++ Memtracker has been enabled])
AC_ARG_ENABLE([memtracker], [AS_HELP_STRING([--enable-memtracker], [Enables Memtracker module])],
[], dnl Implicit: enable_memtracker=$enableval
[enable_memtracker="no"])
AC_MSG_RESULT([$enable_memtracker])
AS_IF([test "$enable_memtracker" = xyes],[
AC_DEFINE([NANOS_MEMTRACKER_ENABLED],[1],[Specifies whether Nanos++ memtracker module has been enabled])
AC_SUBST([NANOS_MEMTRACKER_ENABLED], [NANOS_MEMTRACKER_ENABLED])
], [
AC_SUBST([NANOS_MEMTRACKER_ENABLED], [NO_NANOS_MEMTRACKER_ENABLED])
])
# Task-level resiliency support
AC_MSG_CHECKING([if task resiliency is enabled])
AC_ARG_ENABLE([resiliency],[AS_HELP_STRING([--enable-resiliency], [Enables task-level resiliency])],
......@@ -284,7 +256,10 @@ AS_IF([test $enable_resiliency = yes],[
[-Werror])
AC_DEFINE([NANOS_RESILIENCY_ENABLED],[],[Indicates whether resiliency features should be used or not.])
AC_SUBST([NANOS_RESILIENCY_ENABLED],[NANOS_RESILIENCY_ENABLED])
resiliency_flags=-fnon-call-exceptions
], [
AC_SUBST([NANOS_RESILIENCY_ENABLED],[NO_NANOS_RESILIENCY_ENABLED])
])
AC_SUBST([enable_resiliency])
AC_SUBST([resiliency_flags])
......@@ -323,16 +298,17 @@ AC_CONFIG_FILES([
src/utils/Makefile
scripts/offload_slave_launch.sh
tests/Makefile
tests/gens/Makefile
tests/gens/api-generator
tests/gens/api-omp-generator
tests/gens/core-generator
tests/gens/mcc-openmp-generator
tests/gens/mcc-ompss-generator
tests/gens/opencl-generator
tests/gens/resiliency-generator
nanox-config.h
])
AC_CONFIG_FILES([tests/gens/api-generator], [chmod +x tests/gens/api-generator])
AC_CONFIG_FILES([tests/gens/api-omp-generator], [chmod +x tests/gens/api-omp-generator])
AC_CONFIG_FILES([tests/gens/core-generator], [chmod +x tests/gens/core-generator])
AC_CONFIG_FILES([tests/gens/mcc-openmp-generator], [chmod +x tests/gens/mcc-openmp-generator])
AC_CONFIG_FILES([tests/gens/mcc-ompss-generator], [chmod +x tests/gens/mcc-ompss-generator])
AC_CONFIG_FILES([tests/gens/opencl-generator], [chmod +x tests/gens/opencl-generator])
AC_CONFIG_FILES([tests/gens/resiliency-generator], [chmod +x tests/gens/resiliency-generator])
AC_OUTPUT
gcc_builtins_used="unknown"
......@@ -343,11 +319,11 @@ AS_IF([test "$new_gcc_builtins" = yes],[
])
AC_DEFUN([ax_check_enabled],[
AS_IF([test -n "$1"],[
AS_IF([test x$1 == xyes],[
echo -n "enabled"
],[
echo -n "disabled"
])
])
])
AS_ECHO(["
......@@ -360,9 +336,9 @@ Configured architectures: $ARCHITECTURES
Configured versions: $VERSIONS
Extra options: $OPTIONS
GCC atomics: $gcc_builtins_used
Memory tracker: $(ax_check_enabled $enable_memtracker)
Memory allocator: $(ax_check_enabled $enable_allocator)
Task resiliency: $(ax_check_enabled $resiliency)"])
Memory tracker: $(ax_check_enabled([$enable_memtracker]))
Memory allocator: $(ax_check_enabled([$enable_allocator]))
Task resiliency: $(ax_check_enabled([$enable_resiliency]))"])
AS_IF([test "$gasnet_available_conduits" != ""],[
AS_ECHO(["\
......
......@@ -261,7 +261,6 @@ paraver_config_files = \
paraver_configs/ompss/graph_and_scheduling/nb_tasks_in_graph.cfg\
paraver_configs/ompss/graph_and_scheduling/2dp_order.cfg\
paraver_configs/ompss/graph_and_scheduling/nb_ready_tasks.cfg\
paraver_configs/ompss/graph_and_scheduling/nb_concurrent_ready.cfg\
paraver_configs/ompss/graph_and_scheduling/creating_submitting_task.cfg\
paraver_configs/ompss/graph_and_scheduling/versioning_sched.cfg\
paraver_configs/ompss/opencl/opencl_runtime.cfg\
......
ConfigFile.Version: 3.4
ConfigFile.NumWindows: 1
################################################################################
< NEW DISPLAYING WINDOW # concurrent tasks in ready >
################################################################################
window_name # concurrent tasks in ready
window_type single
window_id 1
window_position_x 630
window_position_y 277
window_width 826
window_height 398
window_comm_lines_enabled false
window_flags_enabled false
window_noncolor_mode false
window_color_mode window_in_null_gradient_mode
window_logical_filtered true
window_physical_filtered false
window_comm_fromto true
window_comm_tagsize true
window_comm_typeval true
window_units Microseconds
window_maximum_y 158.000000000000
window_minimum_y 1.000000000000
window_compute_y_max true
window_level task
window_scale_relative 1.000000000000
window_end_time_relative 1.000000000000
window_object appl { 1, { All } }
window_begin_time_relative 0.000000000000
window_open true
window_drawmode 1
window_drawmode_rows 1
window_pixel_size 1
window_selected_functions { 14, { {cpu, Active Thd}, {appl, Adding}, {task, Changed value}, {thread, Next Evt Val}, {node, Adding}, {system, Adding}, {workload, Adding}, {from_obj, All}, {to_obj, All}, {tag_msg, All}, {size_msg, All}, {bw_msg, All}, {evt_type, =}, {evt_value, All} } }
window_compose_functions { 9, { {compose_cpu, As Is}, {compose_appl, As Is}, {compose_task, As Is}, {compose_thread, As Is}, {compose_node, As Is}, {compose_system, As Is}, {compose_workload, As Is}, {topcompose1, As Is}, {topcompose2, As Is} } }
window_filter_module evt_type 1 9200061
......@@ -40,7 +40,13 @@ AC_DEFUN([AC_CHECK_GXX_NEW_ATOMIC_BUILTINS], [
else
AC_MSG_RESULT([disabled])
fi
])
AS_IF([test "$new_gcc_builtins" = yes], [
AC_SUBST([HAVE_NEW_GCC_ATOMIC_OPS], [HAVE_NEW_GCC_ATOMIC_OPS])
], [
AC_SUBST([HAVE_NEW_GCC_ATOMIC_OPS], [NO_HAVE_NEW_GCC_ATOMIC_OPS])
])
])
AC_DEFUN([AC_CHECK_GXX_LEGACY_ATOMIC_BUILTINS], [
AC_MSG_CHECKING([for legacy atomic builtins in GCC])
......
......@@ -189,4 +189,10 @@ CUDA 5 or greater is required.
AC_SUBST([cudalibs])
AM_CONDITIONAL([GPU_SUPPORT],[test x$cuda = xyes])
AS_IF([test x$cuda = xyes], [
AC_SUBST([HAVE_CUDA], [GPU_DEV])
], [
AC_SUBST([HAVE_CUDA], [NO_GPU_DEV])
])
])dnl AX_CHECK_CUDA
#
# SYNOPSIS
#
# AX_CHECK_GASNET
# AX_CHECK_DLB
#
# DESCRIPTION
#
# Check whether Dynamic Load Balancing (DLB) path to the headers and libraries are correctly specified.
# Check Dynamic Load Balancing (DLB) support
#
# LICENSE
#
# Copyright (c) 2015 Jorge Bellon <jbellon@bsc.es>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
AC_DEFUN([AX_CHECK_DLB],
[
AC_REQUIRE([AX_PTHREAD])
# It is also possible to specify an MPI installation directory where header and library files should be placed
AC_ARG_WITH(dlb,
[AS_HELP_STRING([--with-dlb,--with-dlb=PATH],
[search in system directories or specify prefix directory for installed GASNet package.])],
[
# Check if the user provided a valid PATH
AS_IF([test -d "$withval"],[
dlb_check=yes
dlb_path_provided=yes
],[
dlb_check=$withval
dlb_path_provided=no
])dnl
],[
dlb_check=no
dlb_path_provided=no
])
AC_ARG_WITH(dlb-include,
[AS_HELP_STRING([--with-dlb-include=PATH],
[specify directory for installed GASNet include files])])
AC_ARG_WITH(dlb-lib,
[AS_HELP_STRING([--with-dlb-lib=PATH],
[specify directory for the installed GASNet library])])
# If the user specifies --with-dlb, $with_dlb value will be 'yes'
# --without-dlb, $with_dlb value will be 'no'
# --with-dlb=somevalue, $with_dlb value will be 'somevalue'
AS_IF([test x$dlb_path_provided = xyes],[
dlbinc="-I$with_dlb/include"
dlblib="-L$with_dlb/lib -Wl,-rpath,$with_dlb/lib"
])dnl
AS_IF([test "$with_dlb_include"],[
dlbinc="-I$with_dlb_include"
])dnl
AS_IF([test "$with_dlb_lib"],[
dlblib="-L$with_dlb_lib -Wl,-rpath,$with_dlb_lib"
])dnl
AS_IF([test "$dlb_check" = yes],[
AC_LANG_PUSH([C++])
AX_VAR_PUSHVALUE([CPPFLAGS])
AX_VAR_PUSHVALUE([CXXFLAGS])
AX_VAR_PUSHVALUE([LDLAGS])
AX_VAR_PUSHVALUE([LIBS],[])
AX_APPEND_FLAG([$dlbinc],[CPPFLAGS])
AX_APPEND_FLAG([$PTHREAD_CFLAGS],[CXXFLAGS])
AX_APPEND_FLAG([$dlblib],[LDFLAGS])
# Look for a valid header file
AC_CHECK_HEADERS([DLB_interface.h],
[dlb_check=yes],
[dlb_check=no])
# Check all DLB library versions: dlb dlb_dbg dlb_instr dlb_instr_dbg
m4_foreach([version],[[dlb],[dlb_dbg],[dlb_instr],[dlb_instr_dbg]],[
_AX_CHECK_DLB_LIB_VERSION(version)
])
AS_IF([test "$dlb_check" = no],
[
AC_MSG_ERROR([
------------------------------
DLB path was not correctly specified.
Please, check that the provided directories are correct.
------------------------------])
])dnl
AX_VAR_POPVALUE([CPPFLAGS])
AX_VAR_POPVALUE([CXXFLAGS])
AX_VAR_POPVALUE([LDLAGS])
AX_VAR_POPVALUE([LIBS])
AC_LANG_POP([C++])
# Enable support.
AC_DEFINE([DLB],[],[Enables DLB support.])
])dnl if dlb
AM_CONDITIONAL([DLB], [test "$dlb_check" = yes])
AC_SUBST([dlbinc])
AC_SUBST([dlblib])
AC_SUBST([dlb])
AC_SUBST([dlb_dbg])
AC_SUBST([dlb_instr])
AC_SUBST([dlb_instr_dbg])
])dnl AX_CHECK_DLB
# _AX_CHECK_DLB_LIB_VERSION(version)
# Helper function that checks for the availability of a single DLB library version
# Parameters:
# $1 - Version name: dlb dlb_dbg dlb_instr dlb_instr_dbg
AC_DEFUN([_AX_CHECK_DLB_LIB_VERSION],
[
AS_VAR_PUSHDEF([lib_name],[$1])
LIBS=
AS_IF([test "$dlb_check" = yes],[
AC_SEARCH_LIBS([DLB_Init],
[lib_name],
[dlb_check=yes],
[dlb_check=no])
])
unset ac_cv_search_DLB_Init
AS_VAR_SET([lib_name],[$LIBS])
AS_VAR_POPDEF([lib_name])dnl
])dnl _AX_CHECK_CONDUIT
AC_MSG_CHECKING([for DLB])
AC_ARG_WITH([dlb],
[AS_HELP_STRING([--with-dlb@<:@=DIR@:>@], [build with DLB library support])],
[], dnl Implicit: with_mpi=$withvalue
[with_dlb=no]
)
AC_MSG_RESULT([$with_dlb])
AS_IF([test "x$with_dlb" != xno], [
AS_IF([test -d "$with_dlb"], [
AS_IF([test -d "$with_dlb/include"], [dlbcppflags="-I$with_dlb/include"])
AS_IF([test -d "$with_dlb/lib"], [dlbldflags="-L$with_dlb/lib"])
])
### DLB INCLUDES
AC_LANG_PUSH([C++])
AX_VAR_PUSHVALUE([CPPFLAGS], [$dlbcppflags])
AC_CHECK_HEADERS([DLB_interface.h], [
# header found, do nothing
], [
AS_IF([test "x$with_dlb" != xcheck], [AC_MSG_ERROR([Cannot find DLB headers])])
with_dlb=no
])
AX_VAR_POPVALUE([CPPFLAGS])
AC_LANG_POP([C++])
])
AS_IF([test "x$with_dlb" != xno], [
### DLB LIBS
AC_LANG_PUSH([C++])
AX_VAR_PUSHVALUE([LIBS], [""])
AX_VAR_PUSHVALUE([LDFLAGS], [$dlbldflags])
AC_SEARCH_LIBS([DLB_Init], [dlb], [
dlblibs="$LIBS"
], [
AS_IF([test "x$with_dlb" != xcheck], [AC_MSG_ERROR([Cannot find DLB libraries])])
with_dlb=no
])
AX_VAR_POPVALUE([LDFLAGS])
AX_VAR_POPVALUE([LIBS])
AC_LANG_POP([C++])
])
AS_IF([test "x$with_dlb" != xno], [
AC_DEFINE([DLB],[],[Enables DLB support.])
AC_SUBST([HAVE_DLB], [DLB])
], [
AC_SUBST([HAVE_DLB], [NO_DLB])
])
AC_SUBST([dlbcppflags])
AC_SUBST([dlbldflags])
AC_SUBST([dlblibs])
])
#
# SYNOPSIS
#
# AX_CHECK_EXTRAE
#
# DESCRIPTION
#
# Check Extrae support
#
AC_DEFUN([AX_CHECK_EXTRAE],
[
MPITRACE_HOME=""
MPITRACE_INC=""
MPITRACE_LIB=""
MPITRACE_BIN=""
AC_MSG_CHECKING([for Extrae])
AC_ARG_WITH([extrae],
AS_HELP_STRING([--with-extrae=PATH], [build with Extrae support]),
[], dnl Implicit: with_extrae=$withvalue
[with_extrae=no]
)
AC_MSG_RESULT([$with_extrae])
AS_IF([test "x$with_extrae" != xno], [
# Extrae 2.4 or higher is needed
# Header extrae_version.h exists until Extrae 3.4
# API Extrae_get_version exists since Extrae 3.4
AC_MSG_CHECKING([for Extrae version])
extrae_version_h=$with_extrae/include/extrae_version.h
AS_IF([test -e $extrae_version_h], [
extrae_version_string=$(sed -ne '/^\s*#\s*define\s\+EXTRAE_VERSION .*$/p' $extrae_version_h)
extrae_version=$(echo $extrae_version_string | sed -e 's/#define EXTRAE_VERSION EXTRAE_VERSION_NUMBER(\([0-9]*\),\([0-9]*\),\([0-9]*\).*$/\1\2\3/')
], [
# Obtain version through Extrae API
AC_LANG_PUSH([C])
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[
#include <stdio.h>
void Extrae_get_version (unsigned *major, unsigned *minor, unsigned *revision);
int main()
{
unsigned major, minor, revision;
Extrae_get_version(&major, &minor, &revision);
printf("%1d%1d%1d\n", major, minor, revision);
return 0;
}
]])
])
AC_LANG_POP([C])
AS_IF([$CC conftest.c -o conftest \
-lnanostrace -L$with_extrae/lib -Wl,-rpath,$with_extrae/lib \
2>&AS_MESSAGE_LOG_FD 1>&2], [
extrae_version=$(./conftest)
])
rm -f conftest
])
AC_MSG_RESULT([$extrae_version])
AS_IF([test -z "$extrae_version"],[
AC_MSG_ERROR([could not find Extrae installation])
])
AC_MSG_CHECKING([if Extrae library is compatible])
AS_IF([test "$extrae_version" -ge 240],[
MPITRACE_HOME="$withval"
MPITRACE_INC="$withval/include"
MPITRACE_LIB="$withval/lib"
AS_IF([test -d "$MPITRACE_HOME/lib64"],[
MPITRACE_LIB="$MPITRACE_HOME/lib64"
])
MPITRACE_BIN="$withval/bin"
AC_MSG_RESULT([yes])
],[
AC_MSG_ERROR([no (Extrae >= 2.4 needed)])
])
])
AC_SUBST([MPITRACE_HOME])
AC_SUBST([MPITRACE_INC])
AC_SUBST([MPITRACE_LIB])
AC_SUBST([MPITRACE_BIN])
AM_CONDITIONAL([instrumentation_EXTRAE], test x"$MPITRACE_HOME" != x)
])
......@@ -168,6 +168,12 @@ GASNet is linked with.
])dnl if gasnet
AS_IF([test "x$gasnet_available_conduits" != x],[
AC_SUBST([HAVE_GASNET], [CLUSTER_DEV])
], [
AC_SUBST([HAVE_GASNET], [NO_CLUSTER_DEV])
])
m4_foreach_w([conduit_name],[smp udp mpi ibv mxm aries],[
_AX_CONDUIT_SUBST(conduit_name)
])
......
......@@ -44,8 +44,17 @@ AS_CASE([$host],
ARCHITECTURES="$ARCHITECTURES smp"
SMP_ARCH=ia64
],
[arm*-*-gnueabi*],
[arm*-*-gnueabihf],
[
# ARMv7 with hardware floating point support
OS=unix-os
ARCHITECTURES="$ARCHITECTURES smp"
SMP_ARCH=armv71_hf
],
[arm*-*-gnueabi],
[
# ARMv7 with software floating point operations
# Other ARMv7 will fail to unknown disabling the ULT
OS=unix-os
ARCHITECTURES="$ARCHITECTURES smp"
SMP_ARCH=armv71
......@@ -93,12 +102,12 @@ AS_CASE([$host],
AC_ARG_VAR([PPUEMBED],[SPU to PPU embedding tool])
AC_CHECK_PROG( [SPUCC], [spu-cc], spu-cc, no)
if test x$SPUCC = xno ; then
AC_MSG_WARN([spu-cc not found. Disabling SPU support])
AC_MSG_WARN([spu-cc not found. Disabling SPU support])
spu_valid=no
else
else
AC_CHECK_PROG( [PPUEMBED], [ppu-embedspu], ppu-embedspu, no)
if test x$PPUEMBED = xno ; then
AC_MSG_WARN([ppu-embedspu not found. Disabling SPU support])
AC_MSG_WARN([ppu-embedspu not found. Disabling SPU support])
spu_valid=no
else
AC_ARG_WITH([cellsdk],
......@@ -145,7 +154,9 @@ AS_IF([test "$ult_support" = yes dnl
-a "$enable_ult" = yes],[
ult_support=yes
AC_DEFINE([SMP_SUPPORTS_ULT],[],[Indicates support for user level threads])
AC_SUBST([SMP_SUPPORTS_ULT], [SMP_SUPPORTS_ULT])
],[
AC_SUBST([SMP_SUPPORTS_ULT], [NO_SMP_SUPPORTS_ULT])
ult_support=no
])
......@@ -154,4 +165,3 @@ AC_SUBST([SMP_ARCH])
AM_CONDITIONAL([SMP_SUPPORTS_ULT],[test "$ult_support" = yes])
]) dnl AX_CHECK_HOST_ARCH
......@@ -137,29 +137,28 @@ hwloc version test execution failed
])
])dnl hwloc
AS_IF([test "x$ac_cv_hwloc_version" != x],[
AS_IF([(("$ac_cv_hwloc_version" < 0x010200))],[
AC_MSG_ERROR([
AS_IF([test "$ac_cv_hwloc_version" = skip],[
AC_MSG_WARN([
------------------------------
Hwloc library version cannot be checked
because cross-compilation mode has been detected.
------------------------------])
], [
AS_IF([test "x$ac_cv_hwloc_version" != x],[
AS_IF([(("$ac_cv_hwloc_version" < 0x010200))],[
AC_MSG_ERROR([
------------------------------
Version of the provided hwloc package is too old ($ac_cv_hwloc_version).
hwloc 1.2.0 or greater is required.
------------------------------])
])dnl
])dnl
],[
AC_MSG_ERROR([
------------------------------
Could not find hwloc package version @{:@value: $ac_cv_hwloc_version@:}@.
Check config.log for details.
------------------------------])
])dnl
AS_IF([test "$ac_cv_hwloc_version" = skip],[
AC_MSG_WARN([
------------------------------
Hwloc library version cannot be checked
because cross-compilation mode has been detected.
------------------------------])
])dnl
])dnl
hwloclibs=$LIBS
......@@ -177,7 +176,9 @@ AS_IF([test "$hwloc" = yes],[
OPTIONS="$OPTIONS hwloc"
AC_DEFINE_UNQUOTED([NANOS_HWLOC_VERSION],[$hwloc_version],[Version of the hwloc package specified by the user])
AC_DEFINE([HWLOC],[],[Indicates the presence of hwloc library.])
AC_SUBST([HAVE_HWLOC], [HWLOC])
],[
AC_SUBST([HAVE_HWLOC], [NO_HWLOC])
hwlocinc=
hwloclib=
hwloclibs=
......
......@@ -80,14 +80,14 @@ AS_IF([test "x$with_opencl$with_opencl_include$with_opencl_lib" != x],[
# --without-opencl, $with_opencl value will be 'no'
# --with-opencl=somevalue, $with_opencl value will be 'somevalue'
AS_IF([test "$opencl_path_provided" = yes],[
openclinc="-isystem $with_opencl/include"
openclinc="-isystem $with_opencl/include -DCL_USE_DEPRECATED_OPENCL_1_2_APIS"
AS_IF([test -d $with_opencl/lib64],
[opencllib="-L$with_opencl/lib64 -Wl,-rpath,$with_opencl/lib64"],
[opencllib="-L$with_opencl/lib -Wl,-rpath,$with_opencl/lib"])dnl
])dnl
AS_IF([ test $with_opencl_include],[
openclinc="-isystem $with_opencl_include"
openclinc="-isystem $with_opencl_include -DCL_USE_DEPRECATED_OPENCL_1_2_APIS"
])dnl
AS_IF([test $with_opencl_lib],[
......@@ -176,14 +176,20 @@ AS_IF([test "x$with_opencl" != xno],[
ac_cv_opencl_device=$(cat conftest_device_version.out)
],
[
AS_IF([ $(cat conftest_device_version.out | grep -q Altera) ],[
ac_cv_opencl_version=$(cat conftest.out),
ac_cv_opencl_device=$(cat conftest_device_version.out)
],
[AC_MSG_FAILURE([
------------------------------
AS_IF([ $(cat conftest_device_version.out | grep -q Altera) ],[
ac_cv_opencl_version=$(cat conftest.out),
ac_cv_opencl_device=$(cat conftest_device_version.out)
],
[
AS_IF([test "x$user_requested" = xyes],
[
AC_MSG_FAILURE([
------------------------------------
OpenCL version test execution failed
------------------------------])
------------------------------------])
],[
opencl=no
])
])
],
[
......@@ -250,6 +256,9 @@ AS_IF([test $opencl = yes],[
AC_DEFINE([OpenCL_DEV],[],[Indicates the presence of the OpenCL arch plugin.])
AC_DEFINE([CL_USE_DEPRECATED_OPENCL_2_0_APIS],[],[Disables warnings when using functions deprecated in OpenCL 2.0])
AC_SUBST([HAVE_OPENCL], [OpenCL_DEV])
], [
AC_SUBST([HAVE_OPENCL], [NO_OpenCL_DEV])
])dnl
......
......@@ -107,5 +107,11 @@ AC_SUBST([xdmalib])
AC_SUBST([xdmalibs])
AM_CONDITIONAL([XDMA_SUPPORT],[test "$xdma" = yes])
AS_IF([test "$xdma" = yes], [
AC_SUBST([HAVE_XDMA], [FPGA_DEV])
], [
AC_SUBST([HAVE_XDMA], [NO_FPGA_DEV])
])
])dnl AX_CHECK_XDMA
......@@ -61,7 +61,7 @@ C++ compiler: $ax_cv_cxx_compiler_vendor
AS_CASE([$ax_cv_cxx_compiler_vendor],
[ibm],
[
cc_dep_CPPFLAGS="-qinclude=\"config.h\""
cc_dep_CPPFLAGS="-qinclude=\"config.h\" -qinclude=\"nanox-config.h\""
cc_dep_CXXFLAGS="-qinclude=\"new_decl.hpp\""
AX_APPEND_FLAG([-qlanglvl=variadictemplates],[cc_dep_CXXFLAGS])
AX_APPEND_FLAG([-Wl,-z,muldefs],[LDFLAGS])
......@@ -69,7 +69,7 @@ AS_CASE([$ax_cv_cxx_compiler_vendor],
],
[
# Default: use -include flag
cc_dep_CPPFLAGS="-include \"config.h\""
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])
no_inline_flag=-fno-inline
......
/*************************************************************************************/
/* Copyright 2015 Barcelona Supercomputing Center */
/* Copyright 2017 Barcelona Supercomputing Center */
/* */
/* This file is part of the NANOS++ library. */
/* */
......@@ -17,20 +17,46 @@
/* along with NANOS++. If not, see <http://www.gnu.org/licenses/>. */
/*************************************************************************************/
#include "wddeque.hpp"
#include "system.hpp"
/* Devices */
#ifndef @HAVE_CUDA@
#define @HAVE_CUDA@
#endif
using namespace nanos;
#ifndef @HAVE_OPENCL@
#define @HAVE_OPENCL@
#endif
#ifndef @HAVE_GASNET@
#define @HAVE_GASNET@
#endif
void WDDeque::initDeviceList()
{
DeviceList devs = sys.getSupportedDevices();
#ifndef @HAVE_XDMA@
#define @HAVE_XDMA@
#endif
for ( DeviceList::iterator it = devs.begin(); it != devs.end(); it++ ) {
const Device * dev = *it;
Atomic<unsigned int> num = 0;
_ndevs.insert( std::make_pair( dev, num ) );
}
}
/* External libraries */
#ifndef @HAVE_HWLOC@
#define @HAVE_HWLOC@
#endif
#ifndef @HAVE_DLB@
#define @HAVE_DLB@
#endif
/* Internal features */
#ifndef @NANOS_MEMTRACKER_ENABLED@
#define @NANOS_MEMTRACKER_ENABLED@
#endif
#ifndef @NANOS_RESILIENCY_ENABLED@
#define @NANOS_RESILIENCY_ENABLED@
#endif
/* Architecture */
#ifndef @HAVE_NEW_GCC_ATOMIC_OPS@
#define @HAVE_NEW_GCC_ATOMIC_OPS@
#endif
#ifndef @SMP_SUPPORTS_ULT@
#define @SMP_SUPPORTS_ULT@
#endif
This diff is collapsed.