Skip to content

Commit

Permalink
Merge pull request #182 from intel/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
chuckyount authored Nov 28, 2018
2 parents ccd7d56 + 4aa5d5b commit cd9696c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 27 deletions.
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion src/common/common_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
27 changes: 15 additions & 12 deletions src/kernel/lib/soln_apis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/kernel/lib/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <numa.h>

// Use mmap and mbind directly?
#else
#include <sys/mman.h>

// Use <numaif.h> if available.
#ifdef USE_NUMAIF_H
#elif defined(USE_NUMAIF_H)
#include <numaif.h>

// This is a hack, but some systems are missing <numaif.h>.
Expand All @@ -54,7 +54,6 @@ extern "C" {
#define MPOL_BIND 2
#define MPOL_INTERLEAVE 3

#endif
#endif
#endif

Expand Down
1 change: 1 addition & 0 deletions src/kernel/lib/yask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ typedef int MPI_Request;
#include <unistd.h>
#include <stdint.h>
#include <immintrin.h>
#include <sys/mman.h>
#ifdef USE_PMEM
#include <memkind.h>
#include <sys/syscall.h>
Expand Down
10 changes: 7 additions & 3 deletions utils/lib/YaskUtils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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;
}
Expand All @@ -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+$//;
Expand Down

0 comments on commit cd9696c

Please sign in to comment.