From ee3bada10050e312f7f8997c8bfbd681275ea2be Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Fri, 9 Nov 2018 13:13:10 +0100 Subject: [PATCH 1/5] Initial commit --- cscs-checks/mch/check_ruby.py | 21 +++++++++++++++++++++ cscs-checks/mch/src/NArray.rb | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 cscs-checks/mch/check_ruby.py create mode 100644 cscs-checks/mch/src/NArray.rb diff --git a/cscs-checks/mch/check_ruby.py b/cscs-checks/mch/check_ruby.py new file mode 100644 index 0000000000..fe99b64ce7 --- /dev/null +++ b/cscs-checks/mch/check_ruby.py @@ -0,0 +1,21 @@ +import reframe as rfm +import reframe.utility.sanity as sn + + +@rfm.simple_test +class RubyNArray(rfm.RunOnlyRegressionTest): + def __init__(self): + super().__init__() + self.descr = ('Check NArray for Ruby version 2.2.2') + self.valid_systems = ['kesch:cn'] + self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray', 'PrgEnv-pgi'] + self.sourcepath = 'NArray.rb' + + self.modules = ['ruby/2.2.2-gmvolf-17.02'] + self.executable = 'ruby' + self.executable_opts = [self.sourcepath] + self.sanity_patterns = sn.assert_found(r'NArray\.float\(4\):\s*' + '\[ 1.0, 2.0, 3.0, 4.0 \]', + self.stdout) + self.maintainers = ['MKr'] + self.tags = {'production'} diff --git a/cscs-checks/mch/src/NArray.rb b/cscs-checks/mch/src/NArray.rb new file mode 100644 index 0000000000..2f17bccd4c --- /dev/null +++ b/cscs-checks/mch/src/NArray.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby + +require "rubygems" +require 'gsl' + +g1 = GSL::Vector.alloc(1,2,3,4) +a1 = g1.to_na + +p a1 + From b1dea00afc30f50e6e0d7f31a71a296f54a1eac4 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Fri, 9 Nov 2018 13:44:40 +0100 Subject: [PATCH 2/5] Correcting valid prgenvs --- cscs-checks/mch/check_ruby.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cscs-checks/mch/check_ruby.py b/cscs-checks/mch/check_ruby.py index fe99b64ce7..27173593cc 100644 --- a/cscs-checks/mch/check_ruby.py +++ b/cscs-checks/mch/check_ruby.py @@ -8,10 +8,10 @@ def __init__(self): super().__init__() self.descr = ('Check NArray for Ruby version 2.2.2') self.valid_systems = ['kesch:cn'] - self.valid_prog_environs = ['PrgEnv-gnu', 'PrgEnv-cray', 'PrgEnv-pgi'] - self.sourcepath = 'NArray.rb' - + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', + 'PrgEnv-gnu-nompi'] self.modules = ['ruby/2.2.2-gmvolf-17.02'] + self.sourcepath = 'NArray.rb' self.executable = 'ruby' self.executable_opts = [self.sourcepath] self.sanity_patterns = sn.assert_found(r'NArray\.float\(4\):\s*' From eee78fad420155d8ebc7057c4c0b61da0655b1f9 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Fri, 9 Nov 2018 13:46:41 +0100 Subject: [PATCH 3/5] Removing self.sourcepath --- cscs-checks/mch/check_ruby.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cscs-checks/mch/check_ruby.py b/cscs-checks/mch/check_ruby.py index 27173593cc..1a66fd96df 100644 --- a/cscs-checks/mch/check_ruby.py +++ b/cscs-checks/mch/check_ruby.py @@ -11,8 +11,7 @@ def __init__(self): self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', 'PrgEnv-gnu-nompi'] self.modules = ['ruby/2.2.2-gmvolf-17.02'] - self.sourcepath = 'NArray.rb' - self.executable = 'ruby' + self.executable = 'ruby NArray.rb' self.executable_opts = [self.sourcepath] self.sanity_patterns = sn.assert_found(r'NArray\.float\(4\):\s*' '\[ 1.0, 2.0, 3.0, 4.0 \]', From 3c1d69a56c90d74d5d233e3853c1b21bc837abd8 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Fri, 9 Nov 2018 14:04:33 +0100 Subject: [PATCH 4/5] Applying requested modifications --- cscs-checks/mch/check_ruby.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cscs-checks/mch/check_ruby.py b/cscs-checks/mch/check_ruby.py index 1a66fd96df..c7dd8acc12 100644 --- a/cscs-checks/mch/check_ruby.py +++ b/cscs-checks/mch/check_ruby.py @@ -11,10 +11,10 @@ def __init__(self): self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', 'PrgEnv-gnu-nompi'] self.modules = ['ruby/2.2.2-gmvolf-17.02'] - self.executable = 'ruby NArray.rb' - self.executable_opts = [self.sourcepath] + self.executable = 'ruby' + self.executable_opts = ['NArray.rb'] self.sanity_patterns = sn.assert_found(r'NArray\.float\(4\):\s*' - '\[ 1.0, 2.0, 3.0, 4.0 \]', + r'\[ 1.0, 2.0, 3.0, 4.0 \]', self.stdout) self.maintainers = ['MKr'] self.tags = {'production'} From 171a5229fba1266484b3675e5fa435293fd882e7 Mon Sep 17 00:00:00 2001 From: Matthias Kraushaar Date: Mon, 12 Nov 2018 08:29:34 +0100 Subject: [PATCH 5/5] Modifications to resolve github comments --- cscs-checks/mch/check_ruby.py | 3 +-- cscs-checks/mch/src/NArray.rb | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cscs-checks/mch/check_ruby.py b/cscs-checks/mch/check_ruby.py index c7dd8acc12..1eba17e16d 100644 --- a/cscs-checks/mch/check_ruby.py +++ b/cscs-checks/mch/check_ruby.py @@ -8,8 +8,7 @@ def __init__(self): super().__init__() self.descr = ('Check NArray for Ruby version 2.2.2') self.valid_systems = ['kesch:cn'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', - 'PrgEnv-gnu-nompi'] + self.valid_prog_environs = ['PrgEnv-gnu-nompi'] self.modules = ['ruby/2.2.2-gmvolf-17.02'] self.executable = 'ruby' self.executable_opts = ['NArray.rb'] diff --git a/cscs-checks/mch/src/NArray.rb b/cscs-checks/mch/src/NArray.rb index 2f17bccd4c..1ea939b469 100644 --- a/cscs-checks/mch/src/NArray.rb +++ b/cscs-checks/mch/src/NArray.rb @@ -7,4 +7,3 @@ a1 = g1.to_na p a1 -