coderunner 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fc5e5974dff0a71a29915aaf0c735afd0cad363
4
- data.tar.gz: 2fbdcc05d0a38b8294edb033637a152787c73cdc
3
+ metadata.gz: 6cd7f8afa58069ccdb34e72bff14f922bfa53fb5
4
+ data.tar.gz: 69f7b07f3dc1008a50a9a630ff006f9f07523276
5
5
  SHA512:
6
- metadata.gz: 8eb527b55e5a2ee9f4cddaf4170aefc75a9a5583d2af93191002117578145c51470d0a7f813b67821480b9c784feec9c4bd6e315c765294541f676880ebe2336
7
- data.tar.gz: 365aac180ed54957ca351fa57a7b6780a6d2f10eb057aa58fd8238581615f75c568e7704027e4eb4c6a56c18c66a1cd4ea77841e215d152e79b42b85012ac789
6
+ metadata.gz: 48f307830a8d73ef708cb809ae98191dbe73fb754e3aa520b198c3455ded9d03a8cc2b322d79feecaeb61c09e6c9d52da21b7caf268896d5e043f6ef4cd815b0
7
+ data.tar.gz: d01ff9e906cf760fa0596621fa947fc5aa9979ffa150872d4482738df20ca6f8076a6092870f9670824a8abfcfae8e455e3598797150bde4ae0cec568b44b6c6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.17.0
1
+ 0.17.1
@@ -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.17.0 ruby lib
5
+ # stub: coderunner 0.17.1 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.17.0"
10
+ s.version = "0.17.1"
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 = "2015-08-11"
15
+ s.date = "2015-08-16"
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"]
@@ -221,7 +221,7 @@ class CodeRunner
221
221
  eputs queue_status
222
222
  rescue => _err
223
223
  eputs "General queue status doesn't work on this system; showing queue status for this folder"
224
- # p err
224
+ #ep err
225
225
  runner = fetch_runner(copts)
226
226
  eputs runner.queue_status
227
227
  end
@@ -1,16 +1,22 @@
1
1
  class CodeRunner
2
+ require SCRIPT_FOLDER + '/system_modules/launcher.rb'
2
3
  module GenericLinux
4
+ include Launcher
3
5
 
4
6
 
5
7
  # @@ruby_command = "ruby1.9"
6
8
 
7
9
  def queue_status
8
- if rcp.uses_mpi
9
- return %x[ps -e -U #{Process.uid} | grep mpi] + %x[ps -e -U #{Process.uid} | grep -G '\\bsh\\b'] + %x[ps -e -U #{Process.uid} -o pid,user,cmd | grep coderunner].grep(/launch/)
10
- else
11
- # ep executable_name
12
- return %x[ps -e -U #{Process.uid} | grep '#{executable_name}'] + %x[ps -e -U #{Process.uid} | grep -G '\\bsh\\b']
13
- end
10
+ if use_launcher
11
+ queue_status_launcher
12
+ else
13
+ if methods.include?(:rcp) and rcp.uses_mpi? and rcp.uses_mpi
14
+ return %x[ps -e -U #{Process.uid} | grep mpi] + %x[ps -e -U #{Process.uid} | grep -G '\\bsh\\b'] + %x[ps -e -U #{Process.uid} -o pid,user,cmd | grep coderunner].grep(/launch/)
15
+ else
16
+ # ep executable_name
17
+ return %x[ps -e -U #{Process.uid} | grep '#{executable_name}'] + %x[ps -e -U #{Process.uid} | grep -G '\\bsh\\b']
18
+ end
19
+ end
14
20
  end
15
21
 
16
22
  def run_command
@@ -44,7 +50,7 @@ def execute
44
50
  if prefix = ENV['CODE_RUNNER_LAUNCHER']
45
51
  launch_id = "#{Time.now.to_i}#{$$}"
46
52
  fname = CodeRunner.launcher_directory + "/#{launch_id}"
47
- File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
53
+ File.open(fname + '.start', 'w'){|file| file.puts "cd '#{Dir.pwd}';#{run_command}"}
48
54
  sleep 1 until FileTest.exist? fname + '.pid'
49
55
  pid = File.read(fname + '.pid').to_i
50
56
  FileUtils.rm fname + '.pid'
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.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphkit