def getExecuteArguments (self, sites, workflow=None, other=[]): result = None pegasusHome = GraysonUtil.getPegasusHome () args = ["--conf=${outputDir}/${pegasusProperties}", "--sites ${sites}", "--force", "--verbose", "--verbose", "--verbose", "--nocleanup", "--output local"] ''' if using one of the new data configuration modes ''' if self.dataConfiguration: args.append ("-Dpegasus.data.configuration=%s" % self.dataConfiguration) args.append ("--staging-site=local") # TODO - make this more flexible for arg in other: args.append (arg) template = Template (" ".join (args)) context = { "outputDir" : self.getOutputDir (), "pegasusProperties" : PegasusProperties.PEGASUS_PROPERTIES, "sites" : sites } if workflow: context ["outputDax"] = os.path.join (self.getOutputDir (), workflow) result = template.substitute (context) logger.debug ("generated workflow execute arguments: %s", result) return result
def configureLocal (self): pegasusLocation = GraysonUtil.getPegasusHome () globusLocation = os.getenv ("GLOBUS_LOCATION") if not globusLocation: raise ValueError ("GLOBUS_LOCATION must be defined") self.addEntry ( "local", { "architecture" : "x86_64", # TODO: inspect environment "scratchFileServerProtocol" : "file", "scratchFileServerMountPoint" : "%s/work/outputs" % self.wms.getOutputDir (), "scratchInternalMountPoint" : "%s/work/outputs" % self.wms.getOutputDir (), "storageFileServerProtocol" : "file", "storageFileServerMountPoint" : "%s/work/outputs" % self.wms.getOutputDir (), "storageMountPoint" : "%s/work/outputs" % self.wms.getOutputDir (), "storageInternalMountPoint" : "%s/work/outputs" % self.wms.getOutputDir (), "pegasusLocation" : pegasusLocation, "globusLocation" : globusLocation })