diff --git a/setup.py b/setup.py index af476097..7b3f8b20 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,9 @@ def run(self): setup( name='yask', - version='v2-alpha', - description='YASK--Yet Another Stencil Kernel: ' - 'A framework to facilitate exploration of the HPC ' - 'stencil-performance design space', - url='https://01.org/yask', + version='v2.15.11', + description='YASK--Yet Another Stencil Kernel', + url='https://github.com/intel/yask', author='Intel Corporation', license='MIT', packages = ['yask'], diff --git a/src/common/common_utils.cpp b/src/common/common_utils.cpp index b6a999b8..5d19004d 100644 --- a/src/common/common_utils.cpp +++ b/src/common/common_utils.cpp @@ -46,7 +46,7 @@ namespace yask { // for numbers above 9 (at least up to 99). // Format: "major.minor.patch". - const string version = "2.15.10"; + const string version = "2.15.11"; string yask_get_version_string() { return version; diff --git a/src/kernel/lib/soln_apis.cpp b/src/kernel/lib/soln_apis.cpp index 5fa7524b..394c2be2 100644 --- a/src/kernel/lib/soln_apis.cpp +++ b/src/kernel/lib/soln_apis.cpp @@ -113,20 +113,23 @@ namespace yask { // Report ranks. os << endl; - os << "Num MPI ranks: " << _env->get_num_ranks() << endl; - os << "This MPI rank index: " << _env->get_rank_index() << endl; + os << "Num MPI ranks: " << _env->get_num_ranks() << endl; + os << "This MPI rank index: " << _env->get_rank_index() << endl; // report threads. - os << "Num OpenMP procs: " << omp_get_num_procs() << endl; - set_all_threads(); - os << "Num OpenMP threads: " << omp_get_max_threads() << endl; - set_region_threads(); // Temporary; just for reporting. - os << " Num threads per region: " << omp_get_max_threads() << endl; - set_block_threads(); // Temporary; just for reporting. - os << " Num threads per block: " << omp_get_max_threads() << endl; - - // Set the number of threads for a region. It should stay this - // way for top-level OpenMP parallel sections. + { + os << "Num OpenMP procs: " << omp_get_num_procs() << endl; + int rt, bt; + int at = get_num_comp_threads(rt, bt); + os << "Num OpenMP threads avail: " << opts->max_threads << + "\nNum OpenMP threads used: " << at << + "\n Num threads per region: " << rt << + "\n Num threads per block: " << bt << endl; + } + + // Set the number of threads for a region. The number of threads + // used in top-level OpenMP parallel sections should not change + // during execution. int rthreads = set_region_threads(); // Run a dummy nested OMP loop to make sure nested threading is diff --git a/src/kernel/lib/utils.hpp b/src/kernel/lib/utils.hpp index cc02bc67..29e9c96f 100644 --- a/src/kernel/lib/utils.hpp +++ b/src/kernel/lib/utils.hpp @@ -25,18 +25,18 @@ IN THE SOFTWARE. #pragma once +// Provide the needed definitions for NUMA support. +// This is fairly convoluted because of the inconsistency of +// support on various OS releases. +// The USE_NUMA* vars are set in the Makefile. #ifdef USE_NUMA // Use numa policy library? #ifdef USE_NUMA_POLICY_LIB #include -// Use mmap and mbind directly? -#else -#include - // Use if available. -#ifdef USE_NUMAIF_H +#elif defined(USE_NUMAIF_H) #include // This is a hack, but some systems are missing . @@ -54,7 +54,6 @@ extern "C" { #define MPOL_BIND 2 #define MPOL_INTERLEAVE 3 -#endif #endif #endif diff --git a/src/kernel/lib/yask.hpp b/src/kernel/lib/yask.hpp index fa4154a2..0711024c 100644 --- a/src/kernel/lib/yask.hpp +++ b/src/kernel/lib/yask.hpp @@ -82,6 +82,7 @@ typedef int MPI_Request; #include #include #include +#include #ifdef USE_PMEM #include #include diff --git a/utils/lib/YaskUtils.pm b/utils/lib/YaskUtils.pm index c660e416..3ba4a0ff 100644 --- a/utils/lib/YaskUtils.pm +++ b/utils/lib/YaskUtils.pm @@ -57,7 +57,7 @@ our @log_keys = 'binary invocation', 'num MPI ranks', 'num ranks', - 'num OpenMP threads', + 'num OpenMP threads', # also matches 'Num OpenMP threads used'. 'num threads per region', 'num threads per block', 'total overall allocation', @@ -193,7 +193,10 @@ sub getResultsFromLine($$) { } } - # special cases for manual parsing. + # special cases for manual parsing... + # TODO: catch output of auto-tuner and update relevant results. + + # Output of 'uname -a' if ($line =~ /^\s*Linux\s+\w+\s+(\S+)/) { $results->{$linux_key} = $1; } @@ -216,13 +219,14 @@ sub getResultsFromLine($$) { # short key. my $sk = substr $key,0,$klen; - # quick match? + # match to short key? return if !exists $proc_keys{$sk}; # look for exact key. for my $m (keys %{$proc_keys{$sk}}) { # match? + # only check that beginning of key matches. if ($key =~ /^$m/) { $val =~ s/^\s+//; $val =~ s/\s+$//;