close Warning: Can't synchronize with repository "(default)" (/common/SVN/wimax does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Version 3 and Version 4 of dSite/gGIMISetup


Ignore:
Timestamp:
Nov 26, 2012, 10:17:23 PM (10 years ago)
Author:
ffund01
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • dSite/gGIMISetup

    v3 v4  
    9393unset irodsHost
    9494}}}
     95
     96== Extend OMF EC (Optional) ==
     97
     98You may optionally make some changes to the OMF experiment controller to allow users to archive their last experiment by running {{{iarchive}}} with no arguments.
     99
     100In {{{/usr/share/omf-expctl-5.3/omf-expctl/experiment.rb}}} add this line in the Experiment class:
     101
     102{{{
     103  @@user = %x(whoami).downcase.chomp
     104}}}
     105
     106and modify the Experiment.ID function as follows:
     107
     108{{{
     109  #
     110  # Return the ID of this Experiment
     111  #
     112  # [Return] the experiment's ID (String)
     113  #
     114  def Experiment.ID
     115    ts = DateTime.now.strftime("%Ft%T%Z").gsub(':','.')
     116    if (@@expID == nil)
     117      # since we use the exp ID as the pubsub user name
     118      # we need to get rid of ":" and uppercase characters
     119      ts = DateTime.now.strftime("%Ft%T%Z").gsub(':','.')
     120      @@expID = "#{@@user}-#{@@sliceID}-#{ts}"
     121      #YTraceState.experiment(:id, @@expID)
     122    end
     123 
     124    File.open(ENV['HOME']+'/.omf-expctl', 'w') do |f2|
     125      f2.puts "EXP_ID=#{@@expID}"
     126      f2.puts "SLICE=#{@@sliceID}"
     127      f2.puts "OMF_USER=#{@@user}"
     128      f2.puts "OMF_DATE=#{ts}"
     129      f2.close
     130    end
     131 
     132    return @@expID
     133  end
     134}}}
     135
     136
     137Now ever time a user runs an experiment, the EC will create a sourceable file called ".omf-expctl" in the user's home directory. It will look something like this:
     138
     139{{{
     140EXP_ID=ffund-default_slice-2012-11-06t22.31.47-05.00
     141SLICE=default_slice
     142EXP_USER=ffund
     143EXP_DATE=2012-11-06t22.31.53-05.00
     144}}}