lib/coderunner/run.rb in coderunner-0.14.14 vs lib/coderunner/run.rb in coderunner-0.14.15
- old
+ new
@@ -522,10 +522,11 @@
#FileUtils.cp("#{defaults_location}/#{defaults_file_name}", defaults_file_name)
evaluate_defaults_file(defaults_file_name)
end
return unless parameters
+ @parameter_hash_string = parameters
raise "parameters: #{parameters.inspect} must be a string which evaluates to a hash" unless parameters.class == String and parameters = eval(parameters) and parameters.class == Hash # parameters.class == String and parameters =~ /\S/
@parameter_hash = parameters
parameters.each do |var, value|
raise CRFatal.new('Cannot specify id as a parameter') if var.to_sym == :id
set(var, value) unless value == :default
@@ -821,10 +822,10 @@
# Log.log(:@@variables0, @@variables[0])
@run_info = rcp.run_info || [] # Run info can optionally be defined in the code module.
# ep @run_info
- @run_info = rcp.run_info + ([:preamble, :job_no, :running, :id, :status, :sys, :is_component, :naming_pars, :run_name, :resubmit_id, :real_id, :component_runs, :parameter_hash, :output_file, :error_file, :extra_files] + SUBMIT_OPTIONS) #.each{|v| RUN_INFO.push v} unless RUN_INFO.include? :job_no
+ @run_info = rcp.run_info + ([:preamble, :job_no, :running, :id, :status, :sys, :is_component, :naming_pars, :run_name, :resubmit_id, :real_id, :component_runs, :parameter_hash, :parameter_hash_string, :output_file, :error_file, :extra_files] + SUBMIT_OPTIONS) #.each{|v| RUN_INFO.push v} unless RUN_INFO.include? :job_no
@all = (rcp.variables + rcp.results + rcp.run_info) #.each{|v| ALL.push v}
# ep "GOT HERE"
(@all + [:directory, :run_name, :modlet, :relative_directory]).each{|var| send(:attr_accessor, var)}
#eputs "Checking and updating"
@user_defaults_location = ENV['HOME'] + "/.coderunner/#{rcp.code}crmod/defaults_files"