coderunner 0.16.12 → 0.16.13

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: 5a5fabaed2679fb026e5d753d3dfa7a4b5923c8f
4
- data.tar.gz: c8c733a67cf95a7aa962a70904b5263c91b3ba04
3
+ metadata.gz: 43bead6fec269358f63b4383ff7314b563907215
4
+ data.tar.gz: d9b9600896bd8f90496d3c9d9b815cb93d30dc98
5
5
  SHA512:
6
- metadata.gz: b03ae4cabb3003e47f3b29eb113a9a513fd5fa2c20b479ff5cb4187f0d262752f95de198fbb69ec57e417a9d0bf3c623a3b0fb06330f2e7ab4865170694ea9b7
7
- data.tar.gz: 1ec4d8aad74c2f772fb0a8c641f9134e2e3f1dc23b39b7ed2c1ba9c4e5b2d5ebbfd878b8a7ce96a2b26e8888d90a333d48a52aafaf1e6b2d34b867165cacb52d
6
+ metadata.gz: 395adc891d85088a696262d0fe7c8a5fd82e71c302b1238d6a1a38ef0a00c999ea7b45160db1ca167ea47e36bb60c203a11e48c5da01203ec2c531b00a0b40a6
7
+ data.tar.gz: dd3f28c468d935df74de4f9b1f1ab300cb0e9874659857c9e65a71c53939a6e2de7512455f9e1e5db992f4bfde2b5f53e7b641552f0773eec02a59a2cb6f9370
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.12
1
+ 0.16.13
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.16.12 ruby lib
5
+ # stub: coderunner 0.16.13 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.16.12"
10
+ s.version = "0.16.13"
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-05-27"
15
+ s.date = "2015-05-28"
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"]
data/lib/coderunner.rb CHANGED
@@ -232,6 +232,7 @@ EOF
232
232
  ["status", "st", 0, 'Print out a summary of the status of the filtered runs.', [], [:U, :N, :j, :f, :O]],
233
233
  ["status_with_comments", "sc", 0, 'Print a list of ids with their status and any comments.', [], [:U, :N, :j, :f, :O]],
234
234
  ["status_loop", "sl", 0, 'Loop, updating the filtered runs, then printing out a summary of the status of the filtered runs. ', [], [:U, :N, :j, :f, :O]],
235
+ ["status_loop_running", "slr", 0, 'Loop, updating and then printing out a summary of runs which are currently running.', [], [:U, :N, :O]],
235
236
  ["submit", "sub", 0, 'Submit a run to be simulated.', [], [:p, :n, :W, :k, :v, :T, :d, :J]],
236
237
  ["submit_command", "subcom", 2, 'Submit an arbitrary shell command to the batch queue.', ['job name', 'command'], [:n, :W, :v, :T, :d]],
237
238
  ["write_graph", "wg", 1, 'Write a graph to disk.', ['filename'], [:G, :g, :w, :O, :U, :N, :j, :f]],
@@ -737,6 +737,36 @@ EOF
737
737
  runner.print_out(0, with_comments: copts[:with_comments]) unless copts[:interactive_start] or copts[:Z] or copts[:no_print_out]
738
738
  end
739
739
  def self.status_loop(copts={})
740
+ # process_copts(copts)
741
+ runner = fetch_runner(copts)
742
+ runner.print_out(0, with_comments: copts[:with_comments]) unless copts[:interactive_start] or copts[:Z] or copts[:no_print_out]
743
+ break_out = false
744
+ loop do
745
+ old_trap = trap(2){eputs " Terminating loop, please wait..."; break_out = true}
746
+ runner.use_large_cache = true
747
+ runner.update(false)
748
+ (trap(2, old_trap); break) if break_out
749
+ runner.recheck_filtered_runs(false)
750
+ runner.print_out(nil, with_comments: copts[:with_comments])
751
+ trap(2, old_trap)
752
+ break if break_out
753
+ break if not runner.run_list.values.find do |r|
754
+ not [:Complete, :Failed].include? r.status
755
+ end
756
+ #ep "sleep"
757
+ sleep 3
758
+ #ep "end sleep"
759
+ end
760
+ end
761
+ def self.status_loop_running(copts={})
762
+ copts[:f] = "@running"
763
+ runner = fetch_runner(copts)
764
+ ids = runner.filtered_ids
765
+ copts[:f] = "#{ids.inspect}.include? id"
766
+ copts[:j] = nil
767
+ status_loop(copts)
768
+ end
769
+ def self.status_loop(copts={})
740
770
  # process_copts(copts)
741
771
  runner = fetch_runner(copts)
742
772
  runner.print_out(0, with_comments: copts[:with_comments]) unless copts[:interactive_start] or copts[:Z] or copts[:no_print_out]
@@ -902,7 +932,8 @@ EOF
902
932
  else
903
933
  runner = @runners[copts[:Y]]
904
934
  end
905
- #p 'reading defaults', runner.recalc_all, DEFAULT_RUNNER_OPTIONS
935
+ # This call ensures that even if we are using an existing
936
+ # runner, it still uses the new copts
906
937
  runner.read_defaults
907
938
  #p 'read defaults', runner.recalc_all
908
939
 
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.16.12
4
+ version: 0.16.13
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-05-27 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphkit