coderunner 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/coderunner.gemspec +2 -1
- data/lib/coderunner/system_modules/hopper.rb +42 -0
- metadata +2 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.13.
|
|
1
|
+
0.13.2
|
data/coderunner.gemspec
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "coderunner"
|
|
8
|
-
s.version = "0.13.
|
|
8
|
+
s.version = "0.13.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Edmund Highcock"]
|
|
@@ -55,6 +55,7 @@ Gem::Specification.new do |s|
|
|
|
55
55
|
"lib/coderunner/system_modules/genericlinux_testsystem.rb",
|
|
56
56
|
"lib/coderunner/system_modules/hector.rb",
|
|
57
57
|
"lib/coderunner/system_modules/helios.rb",
|
|
58
|
+
"lib/coderunner/system_modules/hopper.rb",
|
|
58
59
|
"lib/coderunner/system_modules/iridis.rb",
|
|
59
60
|
"lib/coderunner/system_modules/juropa.rb",
|
|
60
61
|
"lib/coderunner/system_modules/load_leveler.rb",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
class CodeRunner
|
|
2
|
+
require SCRIPT_FOLDER + '/system_modules/moab.rb'
|
|
3
|
+
module Hopper
|
|
4
|
+
include Moab
|
|
5
|
+
|
|
6
|
+
def batch_script
|
|
7
|
+
nodes, ppn = @nprocs.split(/x/)
|
|
8
|
+
eputs "Warning: Underuse of nodes (#{ppn} cores per node instead of 4)" if ppn.to_i < 4
|
|
9
|
+
raise "Please specify project" unless @project
|
|
10
|
+
raise "Error: cores per node cannot excede 4" if ppn.to_i > 4
|
|
11
|
+
# raise "Error: project (i.e. budget) not specified" unless @project
|
|
12
|
+
ppn ||= 4
|
|
13
|
+
if @wall_mins
|
|
14
|
+
ep @wall_mins
|
|
15
|
+
hours = (@wall_mins / 60).floor
|
|
16
|
+
mins = @wall_mins.to_i % 60
|
|
17
|
+
secs = ((@wall_mins - @wall_mins.to_i) * 60).to_i
|
|
18
|
+
end
|
|
19
|
+
eputs "Allotted wall time is " + sprintf("%02d:%02d:%02d", hours, mins, secs)
|
|
20
|
+
nprocstot = nodes.to_i * ppn.to_i
|
|
21
|
+
<<EOF
|
|
22
|
+
#!/bin/bash --login
|
|
23
|
+
#PBS -N #{executable_name}.#{job_identifier}
|
|
24
|
+
#PBS -l mppwidth=#{nprocstot}
|
|
25
|
+
#PBS -l mppnppn=#{ppn}
|
|
26
|
+
#{@wall_mins ? "#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}" : ""}
|
|
27
|
+
#{@project ? "#PBS -A #@project" : ""}
|
|
28
|
+
#PBS -q #{@runner.debug ? "debug" : "regular"}
|
|
29
|
+
|
|
30
|
+
### start of jobscript
|
|
31
|
+
cd $PBS_O_WORKDIR
|
|
32
|
+
echo "workdir: $PBS_O_WORKDIR"
|
|
33
|
+
|
|
34
|
+
echo "Submitting #{nodes}x#{ppn} job on Hector for project #@project..."
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
EOF
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: coderunner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -222,6 +222,7 @@ files:
|
|
|
222
222
|
- lib/coderunner/system_modules/genericlinux_testsystem.rb
|
|
223
223
|
- lib/coderunner/system_modules/hector.rb
|
|
224
224
|
- lib/coderunner/system_modules/helios.rb
|
|
225
|
+
- lib/coderunner/system_modules/hopper.rb
|
|
225
226
|
- lib/coderunner/system_modules/iridis.rb
|
|
226
227
|
- lib/coderunner/system_modules/juropa.rb
|
|
227
228
|
- lib/coderunner/system_modules/load_leveler.rb
|