also on a batch farm encode spaces to avoid problems parsing arguments
authormkrzewic <mikolaj.krzewicki@cern.ch>
Wed, 14 May 2014 12:38:56 +0000 (14:38 +0200)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Wed, 14 May 2014 12:38:56 +0000 (14:38 +0200)
which contain them

PWGPP/benchmark/benchmark.sh

index 74da32b..b110064 100755 (executable)
@@ -1513,6 +1513,12 @@ goSubmitBatch()
   extraOpts=("$@")
   if ! parseConfig ${configFile} "${extraOpts[@]}"; then return 1; fi
   
+  #batch systems/makeflow sometimes handle spaces in arguments poorly, so encode them
+  for (( i=0;i<${#extraOpts[@]};i++ )); do 
+    extraOpts[i]=$(encSpaces "${extraOpts[i]}")
+  done
+  extraOpts+=("encodedSpaces=1")
+
   #record the working directory provided by the batch system
   batchWorkingDirectory=${PWD}