coderunner 0.11.10 → 0.11.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.10
1
+ 0.11.11
data/coderunner.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "coderunner"
8
- s.version = "0.11.10"
8
+ s.version = "0.11.11"
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"]
12
- s.date = "2012-11-13"
12
+ s.date = "2012-11-22"
13
13
  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."
14
14
  s.email = "edmundhighcock@sourceforge.net"
15
15
  s.executables = ["coderunner"]
@@ -52,6 +52,7 @@ Gem::Specification.new do |s|
52
52
  "lib/coderunner/system_modules/genericlinux_testsystem.rb",
53
53
  "lib/coderunner/system_modules/hector.rb",
54
54
  "lib/coderunner/system_modules/helios.rb",
55
+ "lib/coderunner/system_modules/iridis.rb",
55
56
  "lib/coderunner/system_modules/juropa.rb",
56
57
  "lib/coderunner/system_modules/macosx.rb",
57
58
  "lib/coderunner/system_modules/moab.rb",
@@ -0,0 +1,30 @@
1
+ class CodeRunner
2
+ require SCRIPT_FOLDER + '/system_modules/moab.rb'
3
+ module Iridis
4
+ include Moab
5
+ def batch_script
6
+ raise "Please specify project" unless @project
7
+ super
8
+ end
9
+ def max_ppn
10
+ 12
11
+ end
12
+ def mpi_prog
13
+ "mpirun"
14
+ end
15
+ def execute
16
+ if ((prefix = ENV['CODE_RUNNER_LAUNCHER']).size > 0 rescue false)
17
+ launch_id = "#{Time.now.to_i}#{$$}"
18
+ fname = ENV['HOME'] + "/.coderunner_to_launch_#{prefix}/#{launch_id}"
19
+ File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
20
+ sleep 1 until FileTest.exist? fname + '.pid'
21
+ pid = File.read(fname + '.pid').to_i
22
+ FileUtils.rm fname + '.pid'
23
+ return pid
24
+ else
25
+ File.open(batch_script_file, 'w'){|file| file.puts batch_script + run_command + "\n"}
26
+ pid = %x[qsub -q #@project #{batch_script_file}].to_i
27
+ end
28
+ end
29
+ end
30
+ end
@@ -17,10 +17,14 @@ EOF
17
17
  %x[cat #{ENV['HOME']}/.coderunner_to_launch_#{prefix}/queue_status.txt] +
18
18
  %x[cat #{ENV['HOME']}/.coderunner_to_launch_#{prefix}/queue_status2.txt]
19
19
  else
20
- %x[qstat | grep $USER]
20
+ %x[qstat -q consort | grep $USER]
21
21
  end
22
22
  end
23
23
 
24
+ def mpi_prog
25
+ "aprun"
26
+ end
27
+
24
28
  def run_command
25
29
  # "qsub #{batch_script_file}"
26
30
  if (ENV['CODE_RUNNER_LAUNCHER'].size > 0 rescue false)
@@ -28,7 +32,7 @@ EOF
28
32
  else
29
33
  nodes, ppn = @nprocs.split(/x/)
30
34
  nprocstot = nodes.to_i * ppn.to_i
31
- "aprun -n #{nprocstot} -N #{ppn} #{executable_location}/#{executable_name} #{parameter_string}"
35
+ "#{mpi_prog} -n #{nprocstot} -N #{ppn} #{executable_location}/#{executable_name} #{parameter_string}"
32
36
  end
33
37
  end
34
38
 
@@ -84,7 +88,7 @@ EOF
84
88
  cd $PBS_O_WORKDIR
85
89
  echo "workdir: $PBS_O_WORKDIR"
86
90
 
87
- echo "Submitting #{nodes}x#{ppn} job on Hector for project #@project..."
91
+ echo "Submitting #{nodes}x#{ppn} job on #{CodeRunner::SYS} for project #@project..."
88
92
 
89
93
 
90
94
  EOF
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.11.10
4
+ version: 0.11.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-13 00:00:00.000000000 Z
12
+ date: 2012-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphkit
@@ -219,6 +219,7 @@ files:
219
219
  - lib/coderunner/system_modules/genericlinux_testsystem.rb
220
220
  - lib/coderunner/system_modules/hector.rb
221
221
  - lib/coderunner/system_modules/helios.rb
222
+ - lib/coderunner/system_modules/iridis.rb
222
223
  - lib/coderunner/system_modules/juropa.rb
223
224
  - lib/coderunner/system_modules/macosx.rb
224
225
  - lib/coderunner/system_modules/moab.rb