coderunner 0.18.2 → 0.18.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +37 -0
- data/VERSION +1 -1
- data/coderunner.gemspec +9 -4
- data/dependencies/Makefile +1 -1
- data/dependencies/README.md +1 -1
- data/dependencies/download_dependencies.sh +1 -1
- data/dependencies/system_config_files/archer.sh +8 -0
- data/dependencies/system_config_files/bluejoule.sh +3 -0
- data/dependencies/system_config_files/helios.sh +3 -0
- data/index.html +1 -0
- data/lib/coderunner/remote_code_runner.rb +24 -28
- data/test/test_coderunner.rb +3 -3
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7e746354a851207811dad7279189cebc4ac944d
|
4
|
+
data.tar.gz: 45c5ef152cab46c28f24e647497d992c857aa9b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cfc3d4250b200e60317d1a27fa26da96555272dd95d389917086eebe5bc91a4fcd0775a865202f3ea9474349d0044ccabe0e244018890397c59fec7d4a8e888
|
7
|
+
data.tar.gz: 540db0835ff130b11ffb2adfabfdb1bd79514a49be8c95490ddd44d75c7ed563965511d29c9c92bb324d6c2f28e97c98fd2102911a3816e3ff852ae1d0279fd6
|
data/.travis.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
sudo: false
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.2.0
|
5
|
+
notifications:
|
6
|
+
email:
|
7
|
+
on_success: change
|
8
|
+
on_failure: change
|
9
|
+
|
10
|
+
addons:
|
11
|
+
apt:
|
12
|
+
packages:
|
13
|
+
- gsl-bin
|
14
|
+
- libgsl0-dev
|
15
|
+
- libnetcdf-dev
|
16
|
+
- libhdf5-serial-dev
|
17
|
+
- libyaml-dev
|
18
|
+
- libreadline-dev
|
19
|
+
- libncurses5-dev
|
20
|
+
|
21
|
+
before_install:
|
22
|
+
- rvm use 2.2.0 --install --binary --fuzzy --default
|
23
|
+
|
24
|
+
install:
|
25
|
+
- bundle install
|
26
|
+
- rake install
|
27
|
+
- mkdir -m 700 -p -v $HOME/.ssh
|
28
|
+
- ssh-keygen -t rsa -N '' -f $HOME/.ssh/id_rsa
|
29
|
+
- cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/authorized_keys
|
30
|
+
- cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/known_hosts
|
31
|
+
- echo "Host *" >> $HOME/.ssh/config &&
|
32
|
+
echo " NoHostAuthenticationForLocalhost yes" >> $HOME/.ssh/config
|
33
|
+
- echo "export CODE_RUNNER_SYSTEM=generic_linux" >> $HOME/.bashrc
|
34
|
+
- source $HOME/.bashrc
|
35
|
+
|
36
|
+
script:
|
37
|
+
- export CPP=g++ && rake test
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.
|
1
|
+
0.18.3
|
data/coderunner.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: coderunner 0.18.
|
5
|
+
# stub: coderunner 0.18.3 ruby lib
|
6
6
|
# stub: ext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "coderunner"
|
10
|
-
s.version = "0.18.
|
10
|
+
s.version = "0.18.3"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
s.authors = ["Edmund Highcock"]
|
15
|
-
s.date = "2016-
|
15
|
+
s.date = "2016-05-11"
|
16
16
|
s.description = "CodeRunner is a framework for the automated running and analysis of simulations. It automatically generates any necessary input files, organises the output data and analyses it. Because it is a modular system, it can easily be customised to work with any system and any simulation code. One of its greatest strengths is that it is independent of any one simulation code; thus it can easily plot and compare the data from different codes."
|
17
17
|
s.email = "edmundhighcock@sourceforge.net"
|
18
18
|
s.executables = ["coderunner", "coderunnerrepo"]
|
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
]
|
24
24
|
s.files = [
|
25
25
|
".document",
|
26
|
+
".travis.yml",
|
26
27
|
"CONTRIBUTING.md",
|
27
28
|
"Gemfile",
|
28
29
|
"LICENSE.txt",
|
@@ -35,11 +36,15 @@ Gem::Specification.new do |s|
|
|
35
36
|
"dependencies/Makefile",
|
36
37
|
"dependencies/README.md",
|
37
38
|
"dependencies/download_dependencies.sh",
|
39
|
+
"dependencies/system_config_files/archer.sh",
|
40
|
+
"dependencies/system_config_files/bluejoule.sh",
|
41
|
+
"dependencies/system_config_files/helios.sh",
|
38
42
|
"ext/code_runner_ext.c",
|
39
43
|
"ext/extconf.rb",
|
40
44
|
"ext/graph_kit.c",
|
41
45
|
"include/code_runner_ext.h",
|
42
46
|
"include/graph_kit.h",
|
47
|
+
"index.html",
|
43
48
|
"lib/code_runner_extension.rb",
|
44
49
|
"lib/coderunner.rb",
|
45
50
|
"lib/coderunner/class_methods.rb",
|
@@ -103,7 +108,7 @@ Gem::Specification.new do |s|
|
|
103
108
|
s.licenses = ["GPLv3"]
|
104
109
|
s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
|
105
110
|
s.rubyforge_project = "coderunner"
|
106
|
-
s.rubygems_version = "2.
|
111
|
+
s.rubygems_version = "2.4.8"
|
107
112
|
s.summary = "A framework for the automated running and analysis of simulations."
|
108
113
|
|
109
114
|
if s.respond_to? :specification_version then
|
data/dependencies/Makefile
CHANGED
data/dependencies/README.md
CHANGED
@@ -27,7 +27,7 @@ Manual Installation
|
|
27
27
|
2. To compile all the packages, run `make hd all rb PREFIX=/path/to/install/dir`.
|
28
28
|
3. If you only want to build one package see the makefile for the short name
|
29
29
|
of the package. If you find any of these out of date, please open an
|
30
|
-
issue
|
30
|
+
issue on GitHub.
|
31
31
|
4. Finally, export these to the system PATH by adding the following to your
|
32
32
|
`.bashrc`:
|
33
33
|
|
@@ -16,5 +16,5 @@ wget -nc ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz -P $DIR
|
|
16
16
|
wget -nc ftp://ftp.unidata.ucar.edu/pub/netcdf/old/netcdf-4.2.1.1.tar.gz -P $DIR
|
17
17
|
wget -nc ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz -P $DIR
|
18
18
|
wget -nc http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz -P $DIR
|
19
|
-
wget -nc https://cache.ruby-lang.org/pub/ruby/ruby-2.1
|
19
|
+
wget -nc https://cache.ruby-lang.org/pub/ruby/ruby-2.1.0.tar.gz -P $DIR
|
20
20
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export CODE_RUNNER_SYSTEM=archer
|
2
|
+
export CODE_RUNNER_NO_ANALYSIS=false
|
3
|
+
eval `modulecmd bash unload PrgEnv-cray`
|
4
|
+
eval `modulecmd bash load PrgEnv-gnu`
|
5
|
+
eval `modulecmd bash load fftw`
|
6
|
+
export XTPE_LINK_TYPE=dynamic
|
7
|
+
export LD_LIBRARY_PATH=/opt/xt-libsci/10.4.1/gnu/lib/44:$LD_LIBRARY_PATH
|
8
|
+
echo "Confiuration is now complete."
|
data/index.html
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
hello world
|
@@ -2,14 +2,14 @@ class RemoteCodeRunner < CodeRunner
|
|
2
2
|
(CodeRunner.instance_methods - (Object.instance_methods + Log.instance_methods)).each do |meth|
|
3
3
|
next if [:sort_runs, :print_out, :filter, :similar_runs, :get_max, :get_min, :generate_combined_ids, :setup_run_class, :get_run_class_name, :readout, :graphkit_from_lists, :graphkit, :graphkit_shorthand, :run_graphkit_shorthand, :axiskit, :filtered_ids, :filtered_run_list, :make_film_from_lists, :sweep_graphkits, :cache, :merged_runner_info].include? meth
|
4
4
|
next if CodeRunner::DEFAULT_RUNNER_OPTIONS.keys.include? meth
|
5
|
-
next if CodeRunner::DEFAULT_RUNNER_OPTIONS.keys.map{|
|
5
|
+
next if CodeRunner::DEFAULT_RUNNER_OPTIONS.keys.map{|method| (method.to_s + '=').to_sym}.include? meth
|
6
6
|
|
7
7
|
undef_method meth
|
8
8
|
end
|
9
9
|
# class << self
|
10
10
|
# undef_method :graphkit_multiple_runners_from_frame_array
|
11
11
|
# def method_missing(method, *args)
|
12
|
-
# raise "Not a CodeRunner class method #{method}" unless (CodeRunner.methods + [:puts]).include? method
|
12
|
+
# raise "Not a CodeRunner class method #{method}" unless (CodeRunner.methods + [:puts]).include? method
|
13
13
|
# if method.to_s =~ /=$/
|
14
14
|
# raise NoMethodError.new("unknown set method: #{method}")
|
15
15
|
# # @attributes[method] = args[0]
|
@@ -18,14 +18,14 @@ class RemoteCodeRunner < CodeRunner
|
|
18
18
|
# data = retrieve(method, *args)
|
19
19
|
# if method.to_s =~ /graphkit/
|
20
20
|
# return Marshal.load(data)
|
21
|
-
# else
|
21
|
+
# else
|
22
22
|
# puts data
|
23
23
|
# end
|
24
|
-
# end
|
25
24
|
# end
|
26
|
-
|
25
|
+
# end
|
26
|
+
|
27
27
|
attr_accessor :combined_ids, :component_ids, :ids, :combined_run_list, :component_run_list, :run_list, :remote_cache, :libraries
|
28
|
-
|
28
|
+
|
29
29
|
# include Log
|
30
30
|
# puts instance_methods; exit
|
31
31
|
# SHOULD_NOT_BE_CALLED = :add_component
|
@@ -61,13 +61,13 @@ class RemoteCodeRunner < CodeRunner
|
|
61
61
|
runner = old_new(host, folder, copts)
|
62
62
|
runner.update
|
63
63
|
runner.remote_cache = copts[:cache]
|
64
|
-
unless FileTest.exist? cache_folder(host, folder)
|
64
|
+
unless FileTest.exist? cache_folder(host, folder)
|
65
65
|
FileUtils.makedirs cache_folder(host, folder)
|
66
66
|
end
|
67
67
|
File.open(cache_file(host, folder), 'w') do |file|
|
68
68
|
file.puts Marshal.dump(runner)
|
69
69
|
end
|
70
|
-
return runner
|
70
|
+
return runner
|
71
71
|
end
|
72
72
|
else
|
73
73
|
return old_new(host, folder, copts)
|
@@ -81,7 +81,7 @@ class RemoteCodeRunner < CodeRunner
|
|
81
81
|
cache_folder(host, folder) + '/runner.msl'
|
82
82
|
end
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
85
|
DISPLAY_REMOTE_INVOCATION = false
|
86
86
|
|
87
87
|
RUNNER_CACHE = ENV['HOME'] + '/.coderunner/remote_cache/'
|
@@ -117,7 +117,7 @@ class RemoteCodeRunner < CodeRunner
|
|
117
117
|
@copts.delete(:E)
|
118
118
|
end
|
119
119
|
def method_missing(method, *args)
|
120
|
-
raise "Not a CodeRunner method #{method}" unless (CodeRunner.instance_methods + [:puts]).include? method
|
120
|
+
raise "Not a CodeRunner method #{method}" unless (CodeRunner.instance_methods + [:puts]).include? method
|
121
121
|
# ep method; STDIN.gets
|
122
122
|
|
123
123
|
if method.to_s =~ /=$/
|
@@ -133,10 +133,10 @@ class RemoteCodeRunner < CodeRunner
|
|
133
133
|
end
|
134
134
|
#return Marshal.load(data)
|
135
135
|
return data
|
136
|
-
else
|
136
|
+
else
|
137
137
|
puts data
|
138
138
|
end
|
139
|
-
end
|
139
|
+
end
|
140
140
|
def retrieve_method(method, *args)
|
141
141
|
eputs "Calling Remote Method: #{method}"
|
142
142
|
retrieve("#{method.to_s}(*#{args.inspect})")
|
@@ -157,42 +157,38 @@ class RemoteCodeRunner < CodeRunner
|
|
157
157
|
|
158
158
|
eputs "Connecting to server using '#{@ssh_command}'..."
|
159
159
|
eputs "Loading folder #{@folder}..."
|
160
|
-
# eval =
|
161
|
-
# > /dev/null 2> /dev/null > /dev/null 2> /dev/null
|
162
|
-
#{%w{ ~/.bashrc ~/.bash_login ~/.bash_profile ~/.profile}.map{|w| "source #{w} > /dev/null 2> /dev/null "}.join(" && ")}
|
163
160
|
shell_script = <<EOF
|
164
161
|
cd #@folder
|
165
162
|
export ROWS=#{Terminal.terminal_size[0]}
|
166
|
-
export COLS=#{Terminal.terminal_size[1]}
|
163
|
+
export COLS=#{Terminal.terminal_size[1]}
|
167
164
|
source /etc/bashrc /etc/profile > /dev/null 2> /dev/null
|
168
|
-
#{%w{
|
165
|
+
#{%w{ .bash_login .bash_profile .profile .bashrc .rvm/scripts/rvm}.map{|w| "source $HOME/#{w} > /dev/null 2> /dev/null "}.join(" ; ")}
|
169
166
|
if [ "$CODE_RUNNER_COMMAND" ]
|
170
167
|
then
|
171
|
-
$CODE_RUNNER_COMMAND runner_eval #{string.inspect} -Z #{@copts.inspect.inspect}
|
168
|
+
$CODE_RUNNER_COMMAND runner_eval #{string.inspect} -Z #{@copts.inspect.inspect}
|
172
169
|
else
|
173
170
|
coderunner runner_eval #{string.inspect} -Z #{@copts.inspect.inspect}
|
174
171
|
fi
|
175
172
|
|
176
173
|
EOF
|
177
|
-
# coderunner runner_eval #{"#{method.to_s}(*#{args.inspect})".inspect} -Z #{@copts.inspect.inspect}
|
178
174
|
|
179
175
|
eputs shell_script if DISPLAY_REMOTE_INVOCATION
|
180
176
|
data = %x[#@ssh_command '#{shell_script}']
|
181
177
|
#ep data
|
182
|
-
eputs "\nDisconnecting from server..."
|
178
|
+
eputs "\nDisconnecting from server..."
|
183
179
|
eprint "Extracting data..."
|
184
180
|
data_arr = []
|
185
181
|
in_dump = false
|
186
182
|
i = 0
|
187
183
|
loop do
|
188
|
-
|
184
|
+
|
189
185
|
if i>=80 #data.size
|
190
186
|
break
|
191
|
-
|
192
|
-
else #if data[i-1] == "E" and data[i-2] == "_"
|
187
|
+
|
188
|
+
else #if data[i-1] == "E" and data[i-2] == "_"
|
193
189
|
# ep data[i...(i + "code_runner_server_dump_start_E".size)], '.....'
|
194
190
|
# ep data[(-"code_runner_server_dump_end_E\n".size-i+1)..-i] if in_dump
|
195
|
-
|
191
|
+
|
196
192
|
# string = data[0...i]
|
197
193
|
# p string
|
198
194
|
if !in_dump and data[i...(i + "code_runner_server_dump_start_E".size)] == "code_runner_server_dump_start_E" # =~ /.*Begin Output\n\Z/
|
@@ -200,7 +196,7 @@ EOF
|
|
200
196
|
data = data[(i + "code_runner_server_dump_start_E".size)..-1]
|
201
197
|
in_dump = true
|
202
198
|
i = 0
|
203
|
-
elsif in_dump and data[(-"code_runner_server_dump_end_E\n".size-i+1)..-i] == "code_runner_server_dump_end_E\n" #
|
199
|
+
elsif in_dump and data[(-"code_runner_server_dump_end_E\n".size-i+1)..-i] == "code_runner_server_dump_end_E\n" #
|
204
200
|
data_arr.push data[0...(data.size - ("code_runner_server_dump_end_E\n".size+i-1))]
|
205
201
|
# ep "OUT DUMP"
|
206
202
|
# ep data_arr
|
@@ -212,11 +208,11 @@ EOF
|
|
212
208
|
end
|
213
209
|
i+=1
|
214
210
|
end
|
215
|
-
|
211
|
+
|
216
212
|
eputs "done"
|
217
213
|
# ep data_arr; exit
|
218
|
-
|
219
|
-
|
214
|
+
|
215
|
+
|
220
216
|
begin
|
221
217
|
case data_arr.size
|
222
218
|
when 0
|
data/test/test_coderunner.rb
CHANGED
@@ -44,7 +44,7 @@ class TestSubmission < MiniTest::Test
|
|
44
44
|
end
|
45
45
|
def test_status_loop
|
46
46
|
unless ENV['SHORT_TEST']
|
47
|
-
|
47
|
+
CodeRunner::GLOBAL_OPTIONS[:launcher] = '42323490qw4q4432407Q2342U3'
|
48
48
|
#@mutex = Mutex.new
|
49
49
|
#@launcher_started =
|
50
50
|
@thread = Thread.new{CodeRunner.start_launcher(0.5,10)}
|
@@ -52,7 +52,7 @@ class TestSubmission < MiniTest::Test
|
|
52
52
|
CodeRunner.submit(Y: 'test/submission_results', C: 'cubecalc', m: 'sleep', X: Dir.pwd + '/test/submission_results/cubecalc', p: '{sleep_time: 2}')
|
53
53
|
CodeRunner.status_loop(Y: 'test/submission_results')
|
54
54
|
#@thread.kill # This is commented out because it causes a Heisenbug... the kill signal can get trapped and cause the deletion of the 'submitting' lock file. This line is unnecessary because the thread will die when the program exits
|
55
|
-
|
55
|
+
CodeRunner::GLOBAL_OPTIONS[:launcher] = nil
|
56
56
|
end
|
57
57
|
end
|
58
58
|
def testanalysis
|
@@ -384,7 +384,7 @@ end # if false/true
|
|
384
384
|
#end
|
385
385
|
#
|
386
386
|
#
|
387
|
-
|
387
|
+
CodeRunner::GLOBAL_OPTIONS[:non_interactive] = true
|
388
388
|
class TestFortranNamelistC < MiniTest::Test
|
389
389
|
def setup
|
390
390
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coderunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphkit
|
@@ -195,6 +195,7 @@ extra_rdoc_files:
|
|
195
195
|
- README.md
|
196
196
|
files:
|
197
197
|
- ".document"
|
198
|
+
- ".travis.yml"
|
198
199
|
- CONTRIBUTING.md
|
199
200
|
- Gemfile
|
200
201
|
- LICENSE.txt
|
@@ -207,11 +208,15 @@ files:
|
|
207
208
|
- dependencies/Makefile
|
208
209
|
- dependencies/README.md
|
209
210
|
- dependencies/download_dependencies.sh
|
211
|
+
- dependencies/system_config_files/archer.sh
|
212
|
+
- dependencies/system_config_files/bluejoule.sh
|
213
|
+
- dependencies/system_config_files/helios.sh
|
210
214
|
- ext/code_runner_ext.c
|
211
215
|
- ext/extconf.rb
|
212
216
|
- ext/graph_kit.c
|
213
217
|
- include/code_runner_ext.h
|
214
218
|
- include/graph_kit.h
|
219
|
+
- index.html
|
215
220
|
- lib/code_runner_extension.rb
|
216
221
|
- lib/coderunner.rb
|
217
222
|
- lib/coderunner/class_methods.rb
|
@@ -290,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
295
|
version: '0'
|
291
296
|
requirements: []
|
292
297
|
rubyforge_project: coderunner
|
293
|
-
rubygems_version: 2.
|
298
|
+
rubygems_version: 2.4.8
|
294
299
|
signing_key:
|
295
300
|
specification_version: 4
|
296
301
|
summary: A framework for the automated running and analysis of simulations.
|