coderunner 0.13.4 → 0.13.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/coderunner.gemspec +2 -1
- data/lib/coderunner/system_modules/loki.rb +45 -0
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.13.
|
1
|
+
0.13.5
|
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.5"
|
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"]
|
@@ -59,6 +59,7 @@ Gem::Specification.new do |s|
|
|
59
59
|
"lib/coderunner/system_modules/iridis.rb",
|
60
60
|
"lib/coderunner/system_modules/juropa.rb",
|
61
61
|
"lib/coderunner/system_modules/load_leveler.rb",
|
62
|
+
"lib/coderunner/system_modules/loki.rb",
|
62
63
|
"lib/coderunner/system_modules/macosx.rb",
|
63
64
|
"lib/coderunner/system_modules/moab.rb",
|
64
65
|
"lib/coderunner/system_modules/new_hydra.rb",
|
@@ -0,0 +1,45 @@
|
|
1
|
+
class CodeRunner
|
2
|
+
require SCRIPT_FOLDER + '/system_modules/moab.rb'
|
3
|
+
module Loki
|
4
|
+
include Moab
|
5
|
+
|
6
|
+
def max_ppn
|
7
|
+
8
|
8
|
+
end
|
9
|
+
def batch_script
|
10
|
+
nodes, ppn = @nprocs.split(/x/)
|
11
|
+
eputs "Warning: Underuse of nodes (#{ppn} cores per node instead of 4)" if ppn.to_i < 4
|
12
|
+
raise "Please specify project" unless @project
|
13
|
+
raise "Error: cores per node cannot excede 4" if ppn.to_i > max_ppn
|
14
|
+
# raise "Error: project (i.e. budget) not specified" unless @project
|
15
|
+
ppn ||= 4
|
16
|
+
if @wall_mins
|
17
|
+
ep @wall_mins
|
18
|
+
hours = (@wall_mins / 60).floor
|
19
|
+
mins = @wall_mins.to_i % 60
|
20
|
+
secs = ((@wall_mins - @wall_mins.to_i) * 60).to_i
|
21
|
+
end
|
22
|
+
eputs "Allotted wall time is " + sprintf("%02d:%02d:%02d", hours, mins, secs)
|
23
|
+
nprocstot = nodes.to_i * ppn.to_i
|
24
|
+
<<EOF
|
25
|
+
#!/bin/bash --login
|
26
|
+
#PBS -N #{executable_name}.#{job_identifier}
|
27
|
+
#PBS -l mppwidth=#{nprocstot}
|
28
|
+
#PBS -l mppnppn=#{ppn}
|
29
|
+
#{@wall_mins ? "#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}" : ""}
|
30
|
+
#{@project ? "#PBS -A #@project" : ""}
|
31
|
+
#PBS -q #{@runner.debug ? "debug" : "regular"}
|
32
|
+
|
33
|
+
### start of jobscript
|
34
|
+
cd $PBS_O_WORKDIR
|
35
|
+
echo "workdir: $PBS_O_WORKDIR"
|
36
|
+
|
37
|
+
echo "Submitting #{nodes}x#{ppn} job on Hector for project #@project..."
|
38
|
+
|
39
|
+
|
40
|
+
EOF
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -226,6 +226,7 @@ files:
|
|
226
226
|
- lib/coderunner/system_modules/iridis.rb
|
227
227
|
- lib/coderunner/system_modules/juropa.rb
|
228
228
|
- lib/coderunner/system_modules/load_leveler.rb
|
229
|
+
- lib/coderunner/system_modules/loki.rb
|
229
230
|
- lib/coderunner/system_modules/macosx.rb
|
230
231
|
- lib/coderunner/system_modules/moab.rb
|
231
232
|
- lib/coderunner/system_modules/new_hydra.rb
|