coderunner 0.15.6 → 0.15.7

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: 8713fa11c4a4f698151a81038a5c1dcbb0493481
4
- data.tar.gz: a19fe0ed0368d2817e6ffc94da10c4a7e93e20b3
3
+ metadata.gz: ea54354556be9175b726b64ed64bf0a5ab260bdd
4
+ data.tar.gz: b4b4415d6868b5a890324b2799f50b4f77173f91
5
5
  SHA512:
6
- metadata.gz: c9977b1e776f99f200f031e8f85b1cf0cb0efc9ef6aca202fa39e5832f36337015c402d43b872939f386bba92f75400e4fc17d51ec7980d0893d82ebc8502a74
7
- data.tar.gz: f39416543e655fc1d8e0099d229948409049620b24bfe40928065bdceab23c3606c9ace31e6670f4a990499cf0585fae93926a273ccd9c8043cc360bf6a24f44
6
+ metadata.gz: b0d6b8eca0bcf89e2158a4153a7b4488ea881eb81b904d04562fcaa3e9bb2fa70439ecf6f01999d1d4610df54fe112ad8a47fe6430b8654d409840d50b5d8e8a
7
+ data.tar.gz: c2ceca5b591a600e1d8bb9be0303af19720332689550ba85fc28148110917b923436c6627bf183014613bdbc3a8757b6b2d79f80e240bc9e2adf30bd065e57df
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
- gem "graphkit", ">= 0.3.2"
5
+ gem "graphkit", ">= 0.4.2"
6
6
  gem "parallelpipes", ">= 1.0.0"
7
7
  gem "rubyhacks", ">= 0.1.4"
8
8
  gem "rb-gsl", ">= 1.12.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.6
1
+ 0.15.7
@@ -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.15.6 ruby lib
5
+ # stub: coderunner 0.15.7 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.15.6"
10
+ s.version = "0.15.7"
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 = "2014-12-04"
15
+ s.date = "2015-02-20"
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"]
@@ -101,7 +101,7 @@ Gem::Specification.new do |s|
101
101
  s.specification_version = 4
102
102
 
103
103
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
104
- s.add_runtime_dependency(%q<graphkit>, [">= 0.3.2"])
104
+ s.add_runtime_dependency(%q<graphkit>, [">= 0.4.2"])
105
105
  s.add_runtime_dependency(%q<parallelpipes>, [">= 1.0.0"])
106
106
  s.add_runtime_dependency(%q<rubyhacks>, [">= 0.1.4"])
107
107
  s.add_runtime_dependency(%q<rb-gsl>, [">= 1.12.0"])
@@ -112,7 +112,7 @@ Gem::Specification.new do |s|
112
112
  s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
113
113
  s.add_development_dependency(%q<jeweler>, [">= 2.0.0"])
114
114
  else
115
- s.add_dependency(%q<graphkit>, [">= 0.3.2"])
115
+ s.add_dependency(%q<graphkit>, [">= 0.4.2"])
116
116
  s.add_dependency(%q<parallelpipes>, [">= 1.0.0"])
117
117
  s.add_dependency(%q<rubyhacks>, [">= 0.1.4"])
118
118
  s.add_dependency(%q<rb-gsl>, [">= 1.12.0"])
@@ -124,7 +124,7 @@ Gem::Specification.new do |s|
124
124
  s.add_dependency(%q<jeweler>, [">= 2.0.0"])
125
125
  end
126
126
  else
127
- s.add_dependency(%q<graphkit>, [">= 0.3.2"])
127
+ s.add_dependency(%q<graphkit>, [">= 0.4.2"])
128
128
  s.add_dependency(%q<parallelpipes>, [">= 1.0.0"])
129
129
  s.add_dependency(%q<rubyhacks>, [">= 0.1.4"])
130
130
  s.add_dependency(%q<rb-gsl>, [">= 1.12.0"])
@@ -625,7 +625,7 @@ class CodeRunner
625
625
  g.modify(options)
626
626
  g.instance_eval options[:graphkit_modify] if options[:graphkit_modify]
627
627
  # p g; exit
628
- g.title += sprintf(", frame %0#{fd}d", frame_index) unless options[:frame_title] == false
628
+ g.title = (g.title||"") + sprintf(", frame %0#{fd}d", frame_index) unless options[:frame_title] == false
629
629
  # folder = ("film_frames/");
630
630
  # file_name = sprintf("frame_%0#{fd}d", actual_frames[frame_index])
631
631
  # g.gnuplot; gets; g.close
@@ -653,80 +653,31 @@ class CodeRunner
653
653
  # fa = (options[:frame_array] or options[:fa] or list[0][0].run_list[list[0][0].filtered_ids[0]].frame_array(options) )
654
654
 
655
655
  fd = frame_digits = options[:fd]||Math.log10(graphkit_frame_array.map{|f, g| f}.max).ceil
656
+ fd = 8 if options[:concatenate]
657
+
656
658
  extension = (options[:extension] or options[:ext] or '.png')
657
659
  extension = '.' + extension unless extension =~ /^\./
658
660
  unless options[:skip_frames] or options[:sf]
659
- FileUtils.rm_r('film_frames') if FileTest.exist?('film_frames')
661
+ FileUtils.rm_r('film_frames') if FileTest.exist?('film_frames') and not options[:concatenate]
660
662
 
661
663
  FileUtils.makedirs('film_frames')
662
- # puts @@multiple_processes; gets
663
664
  no_forks = (@@multiple_processes or 1)
664
665
  ep @@multiple_processes, no_forks
665
- # end_graphkit = graphkit_multiple_runners(list, frame_index: fa[1])
666
- # begin_graphkit = graphkit_multiple_runners(list, frame_index: fa[0])
667
-
668
- # end_area = end_graphkit.plot_area_size
669
- # begin_area = begin_graphkit.plot_area_size
670
- # p end_area, begin_area, options
671
- # plot_size = {}
672
- # axes = [:x, :y, :z]
673
- # options[:normalize] ||= options[:nm]
674
- # options[:normalize_pieces] ||= options[:nmp]
675
- # for i in 0...end_area.size
676
- # next unless options[:normalize] and options[:normalize].include? axes[i]
677
- # min = [end_area[i][0], begin_area[i][0]].min
678
- # max = [end_area[i][1], begin_area[i][1]].max
679
- # key = axes[i]
680
- # plot_size[key + :range] = [min, max]
681
- # end
682
- # ep plot_size
683
- # exit
684
- # frames = []
685
- # actual_frames = {}
686
- # i = fa[0]
687
- # j = 0
688
- # while i <= fa[1]
689
- # frames.push i
690
- # actual_frames[i] = j
691
- # i += (options[:ic] or options[:increment] or 1)
692
- # j += 1
693
- # end
694
666
  i = 0
667
+ if options[:concatenate] and (ents = Dir.entries('film_frames').grep(/frame_/)).size > 0
668
+ i = ents.map{|fn| fn.gsub(/\D/, '').to_i}.max + 1
669
+ end
670
+
695
671
  actual_frames = graphkit_frame_array.map{|f, g| f}.inject({}){|hash, f| hash[f] = i; i+=1; hash}
696
672
  graphkit_frame_array.pieces(no_forks).each_with_index do |graphkit_frame_array_piece, myrank|
697
673
  fork do
698
- # if options[:normalize_pieces]
699
- # end_area = graphkit_multiple_runners(list, frame_index: piece.max).plot_area_size
700
- # begin_area = graphkit_multiple_runners(list, frame_index: piece.min).plot_area_size
701
- # axes = [:x, :y, :z]
702
- # for i in 0...end_area.size
703
- # next unless options[:normalize_pieces].include? axes[i]
704
- # min = [end_area[i][0], begin_area[i][0]].min
705
- # max = [end_area[i][1], begin_area[i][1]].max
706
- # key = axes[i]
707
- #
708
- # plot_size[key + :range] = [min, max]
709
- # end
710
- # end
711
- # eputs 'making graphs...'; sleep 1
712
- # graph_array = graphkit_multiple_runners_with_frame_array(piece, list, myrank==0)
713
- # # ep graph_array
714
- # eputs
715
674
  graphkit_frame_array_piece.each_with_index do |(frame_index,g), pindex|
716
675
  if myrank == 0
717
676
  eputs "\033[2A" # Terminal jargon - go back one line
718
677
  eputs sprintf("Plotting graphs: %2.2f", pindex.to_f/graphkit_frame_array_piece.size.to_f * 100.0) + "% Complete"
719
678
  end
720
- # g = graph_kit_multiple_runners(list, plot_size + {frame_index: frame_index})
721
-
722
- # g.modify(plot_size)
723
- # g.modify(options)
724
- # p g; exit
725
- # g.title += sprintf(", frame %0#{fd}d", frame_index) unless options[:frame_title] == false
726
679
  folder = ("film_frames/");
727
680
  file_name = sprintf("frame_%0#{fd}d", actual_frames[frame_index])
728
- # g.gnuplot; gets; g.close
729
- # ep folder + file_name + '.png'; gets
730
681
  g.gnuplot_write(folder + file_name + extension, size: options[:size])
731
682
  end
732
683
  end
@@ -150,7 +150,8 @@ class RemoteCodeRunner < CodeRunner
150
150
  end
151
151
  cachename = self.class.cache_folder(@host, @folder) + '/' + filename
152
152
  if @remote_cache == :auto and FileTest.exist?(cachename)
153
- return eval(File.read(cachename))
153
+ data = eval(File.read(cachename))
154
+ return data if not data.nil?
154
155
  end
155
156
  string = @libraries.map{|lib| "require #{lib}"}.join(";") + ";" + string
156
157
 
@@ -394,9 +394,9 @@ class TestFortranNamelistC < Test::Unit::TestCase
394
394
  #FileUtils.rm('lib/cubecalccrmod/namelists.rb')
395
395
  CodeRunner.setup_run_class('cubecalc', modlet: 'with_namelist')
396
396
  assert_equal(File.read('test/cubecalc_namelist.cc').size+1, CodeRunner::Cubecalc::WithNamelist.get_aggregated_source_code_text('test').size)
397
- CodeRunner::Cubecalc::WithNamelist.synchronise_variables('test')
397
+ #CodeRunner::Cubecalc::WithNamelist.synchronise_variables('test')
398
398
  CodeRunner::Cubecalc::WithNamelist.synchronise_variables_from_input_file('test/cubecalc.in')
399
- CodeRunner::Cubecalc::WithNamelist.update_defaults_from_source_code('test')
399
+ #CodeRunner::Cubecalc::WithNamelist.update_defaults_from_source_code('test')
400
400
  end
401
401
  def test_mediawiki_write
402
402
  CodeRunner.setup_run_class('cubecalc', modlet: 'with_namelist')
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.15.6
4
+ version: 0.15.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-04 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphkit
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.2
19
+ version: 0.4.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.2
26
+ version: 0.4.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parallelpipes
29
29
  requirement: !ruby/object:Gem::Requirement