[Swift-commit] r3306 - SwiftApps/adem-osg

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon May 3 14:56:19 CDT 2010


Author: aespinosa
Date: 2010-05-03 14:56:19 -0500 (Mon, 03 May 2010)
New Revision: 3306

Modified:
   SwiftApps/adem-osg/adem.rb
Log:
Reduced external globus calls via staging executables

Modified: SwiftApps/adem-osg/adem.rb
===================================================================
--- SwiftApps/adem-osg/adem.rb	2010-05-03 19:56:16 UTC (rev 3305)
+++ SwiftApps/adem-osg/adem.rb	2010-05-03 19:56:19 UTC (rev 3306)
@@ -128,16 +128,14 @@
   contact = site_fork site[:compute_element]
   storage = site[:storage_element].first
   rootdir = site[:app_directory] + "/" + conf[:virtual_organization] 
-  script = <<-eos
-#!/bin/bash
-which pacman
-  eos
-  File.open("/tmp/find_pacman.sh", "w") do |dump|
-    dump << script
+  File.open("find_pacman.sh", "w") do |dump|
+    dump.puts "#!/bin/bash"
+    dump.puts "which pacman"
   end
-  `globus-url-copy -cd file:///tmp/find_pacman.sh #{storage}#{rootdir}/find_pacman.sh`
-  `globus-job-run #{contact} -d #{rootdir} /bin/chmod 755 find_pacman.sh`
-  File.dirname(File.dirname(`globus-job-run #{contact} -d #{rootdir} find_pacman.sh`))
+  File.chmod 0755, "find_pacman.sh"
+  resp = `globus-job-run #{contact} -d #{rootdir} -stage find_pacman.sh`
+  File.delete "find_pacman.sh"
+  File.dirname(File.dirname(resp))
 end
 
 def config(args, config_file)




More information about the Swift-commit mailing list