Skip to content
Commits on Source (9)
AC_INIT([nanox], [0.14], [pm-tools@bsc.es])
AC_INIT([nanox], [0.14.1], [pm-tools@bsc.es])
AC_LANG([C++])
AC_CONFIG_SRCDIR([src/core/system.cpp])
AC_DEFINE_UNQUOTED([NANOX_CONFIGURE_ARGS], ["$0 $@"], [Configure line])
......@@ -22,7 +22,7 @@ AM_CONDITIONAL([SUPPORTED_SILENT_RULES], test x$supported_silent_rules = x1)
# Nanos version check
# Make sure build_version is double-quoted!
AS_IF([test -d "$srcdir/.git"],[
AS_IF([test -e "$srcdir/.git"],[
# Git directory found
AC_PATH_PROG([GIT], [git], [])
AC_MSG_CHECKING([revision of git repository])
......
......@@ -10,6 +10,8 @@
AC_DEFUN([AX_CHECK_EXTRAE],
[
AC_REQUIRE([AC_PROG_AWK])
MPITRACE_HOME=""
MPITRACE_INC=""
MPITRACE_LIB=""
......@@ -25,15 +27,28 @@ AC_DEFUN([AX_CHECK_EXTRAE],
AS_IF([test "x$with_extrae" != xno], [
# Extrae 2.4 or higher is needed
# Header extrae_version.h exists until Extrae 3.4
# Header extrae_version.h exists until Extrae 3.4 and again since 3.5.3
# 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/')
extrae_version_h="$with_extrae/include/extrae_version.h"
AS_IF([test -e "$extrae_version_h"], [
# Obtain version through Extrae header
extrae_version=$($AWK -v FS='[[(),]]' \
'/EXTRAE_VERSION_NUMBER\([[0-9]],[[0-9]],[[0-9]]\)/{print $[2]"."$[3]"."$[4];}' \
$extrae_version_h)
AS_IF([test -z "$extrae_version"], [
extrae_version=$($AWK \
'
BEGIN{major=""; minor=""; micro="";}
/EXTRAE_MAJOR [[0-9]]/{major=$[3];}
/EXTRAE_MINOR [[0-9]]/{minor=$[3];}
/EXTRAE_MICRO [[0-9]]/{micro=$[3];}
END{if (length(major)>0 && length(minor)>0 && length(micro)>0)
print major"."minor"."micro;}
' $extrae_version_h)
])
], [
# Obtain version through Extrae API
AC_LANG_PUSH([C])
......@@ -45,7 +60,7 @@ AC_DEFUN([AX_CHECK_EXTRAE],
{
unsigned major, minor, revision;
Extrae_get_version(&major, &minor, &revision);
printf("%1d%1d%1d\n", major, minor, revision);
printf("%1d.%1d.%1d\n", major, minor, revision);
return 0;
}
]])
......@@ -67,15 +82,15 @@ AC_DEFUN([AX_CHECK_EXTRAE],
])
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])
AX_COMPARE_VERSION([$extrae_version],[ge],[2.4], [
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)])
])
......
......@@ -55,16 +55,15 @@ AS_IF([test "x$with_hwloc" != xyes dnl
-o "x$with_hwloc" != xno dnl
-o "x$with_hwloc" != x dnl
],[
hwlocinc="-I $with_hwloc/include"
hwloc_h="$with_hwloc/include/hwloc.h"
AS_IF([test -d $with_hwloc/lib64],
[hwloclib="-L$with_hwloc/lib64 -Wl,-rpath,$with_hwloc/lib64"],
[hwloclib="-L$with_hwloc/lib -Wl,-rpath,$with_hwloc/lib"])dnl
])dnl
AS_IF([test "x$with_hwloc_include" != x],[
hwlocinc="-isystem $with_hwloc_include"
hwloc_h="$with_hwloc_include/hwloc.h"
AS_IF([test -d $with_hwloc/include], [
hwlocinc="-I $with_hwloc/include"
hwloc_h="$with_hwloc/include/hwloc.h"
])
AS_IF([test -d $with_hwloc/lib64], [
hwloclib="-L$with_hwloc/lib64 -Wl,-rpath,$with_hwloc/lib64"
], [test -d $with_hwloc/lib], [
hwloclib="-L$with_hwloc/lib -Wl,-rpath,$with_hwloc/lib"
])dnl
])dnl
AS_IF([test "x$with_hwloc_lib" != x],[
......@@ -73,7 +72,7 @@ AS_IF([test "x$with_hwloc_lib" != x],[
# This condition is satisfied even if $with_hwloc="yes"
# This happens when user leaves --with-value alone
AS_IF([test "x$with_hwloc$with_hwloc_include$with_hwloc_lib" != x],[
AS_IF([test "x$with_hwloc$with_hwloc_lib" != x],[
AC_LANG_PUSH([C++])
#tests if provided headers and libraries are usable and correct
......
......@@ -255,3 +255,15 @@ void SMPMultiThread::addThreadsFromPEs(unsigned int representingPEsCount, PE **r
_threads.push_back( &( representingPEs[ i ]->startWorker( this ) ) );
}
}
void SMPMultiThread::initializeDependent( void )
{
BaseThread *tmpMyThread = myThread;
for ( unsigned int i = 0; i < _threads.size(); i++ ) {
//Change myThread so calls to myThread->... or getMythreadSafe()->...
// work as expected and do not try call parent multithread (this)
myThread = _threads[ i ];
myThread->initializeDependent();
}
myThread = tmpMyThread;
}
......@@ -145,6 +145,7 @@ namespace ext {
void addThreadsFromPEs(unsigned int representingPEsCount, PE **representingPEs);
virtual bool canBlock() { return false;}
virtual void initializeDependent( void );
};
} // namespace ext
} // namespace nanos
......
......@@ -202,7 +202,6 @@ namespace nanos {
ThreadTeam *_nextTeam; //!< If thread has no team, which team should it join
private:
virtual void initializeDependent () = 0;
virtual void runDependent () = 0;
// These must be called through the Scheduler interface
......@@ -238,6 +237,7 @@ namespace nanos {
virtual void lock ();
virtual void unlock ();
virtual void initializeDependent () = 0;
virtual void start () = 0;
virtual void finish ();
void run();
......
......@@ -586,7 +586,7 @@ namespace nanos {
/* 43 */ registerEventKey("dep-address", "Dependence address", true, EVENT_DEVELOPER );
/* 44 */ registerEventKey("copy-data-in","WD id that is copying data in", true, EVENT_DEVELOPER );
/* 45 */ registerEventKey("cache-copy-data-in","WD id that is copying data in", true, EVENT_DEVELOPER );
/* 46 */ registerEventKey("cache-copy-data-out","WD id that is copying data in", true, EVENT_DEVELOPER );
/* 46 */ registerEventKey("cache-copy-data-out","WD id that is copying data out", true, EVENT_DEVELOPER );
/* 47 */ registerEventKey("sched-affinity-constraint","Constraint used by affinity scheduler", true, EVENT_DEVELOPER );
/* 48*/ registerEventKey("in-mpi-runtime","Inside MPI runtime", true, EVENT_DEVELOPER );
......
......@@ -45,7 +45,7 @@ NANOS_API_DECL(nanos_err_t, nanos_omp_set_implicit, ( nanos_wd_t uwd ));
NANOS_API_DECL(int, nanos_omp_get_max_threads, ( void ));
NANOS_API_DECL(int, nanos_omp_get_num_threads, ( void ));
NANOS_API_DECL(int, nanos_omp_get_thread_num, ( void ));
NANOS_API_DECL(int, nanos_omp_set_num_threads, ( int nthreads ));
NANOS_API_DECL(void, nanos_omp_set_num_threads, ( int nthreads ));
NANOS_API_DECL(nanos_ws_t, nanos_omp_find_worksharing, ( nanos_omp_sched_t kind ));
NANOS_API_DECL(nanos_err_t, nanos_omp_get_schedule, ( nanos_omp_sched_t *kind, int *modifier ));
......
......@@ -56,8 +56,8 @@ extern "C"
omp_set_num_threads(*nthreads);
}
int nanos_omp_set_num_threads ( int nthreads ) __attribute__ ((alias ("omp_set_num_threads")));
int nanos_omp_set_num_threads_ ( int nthreads ) __attribute__ ((alias ("omp_set_num_threads")));
void nanos_omp_set_num_threads ( int nthreads ) __attribute__ ((alias ("omp_set_num_threads")));
void nanos_omp_set_num_threads_ ( int nthreads ) __attribute__ ((alias ("omp_set_num_threads")));
NANOS_API_DEF(int, omp_get_thread_num, ( void ))
{
......
......@@ -70,8 +70,10 @@ void Hwloc::loadHwloc ()
fatal_cond0( res != 0, "Could not load hwloc topology xml file." );
}
#if (HWLOC_API_VERSION >> 16) == 1
// Enable GPU detection
hwloc_topology_set_flags( _hwlocTopology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES );
#endif
// Perform the topology detection.
hwloc_topology_load( _hwlocTopology );
......