4343from DIRAC import S_OK , S_ERROR
4444
4545from DIRAC .Resources .Computing .ComputingElement import ComputingElement
46- from DIRAC .Resources .Computing .PilotBundle import bundleProxy , writeScript
4746from DIRAC .Core .Utilities .List import uniqueElements
4847from DIRAC .Core .Utilities .Subprocess import systemCall
4948
@@ -153,26 +152,12 @@ def submitJob(self, executableFile, proxy=None, numberOfJobs=1):
153152 if not os .access (executableFile , 5 ):
154153 os .chmod (executableFile , stat .S_IRWXU | stat .S_IRGRP | stat .S_IXGRP | stat .S_IROTH | stat .S_IXOTH )
155154
156- # if no proxy is supplied, the executable can be submitted directly
157- # otherwise a wrapper script is needed to get the proxy to the execution node
158- # The wrapper script makes debugging more complicated and thus it is
159- # recommended to transfer a proxy inside the executable if possible.
160- if self .proxy and not proxy :
161- proxy = self .proxy
162- if proxy :
163- self .log .verbose ("Setting up proxy for payload" )
164- wrapperContent = bundleProxy (executableFile , proxy )
165- name = writeScript (wrapperContent , os .getcwd ())
166- submitFile = name
167- else : # no proxy
168- submitFile = executableFile
169-
170155 jobStamps = []
171156 for _i in range (numberOfJobs ):
172157 jobStamps .append (uuid .uuid4 ().hex )
173158
174159 batchDict = {
175- "Executable" : submitFile ,
160+ "Executable" : executableFile ,
176161 "NJobs" : numberOfJobs ,
177162 "OutputDir" : self .batchOutput ,
178163 "ErrorDir" : self .batchError ,
@@ -186,8 +171,6 @@ def submitJob(self, executableFile, proxy=None, numberOfJobs=1):
186171 "NumberOfGPUs" : self .numberOfGPUs ,
187172 }
188173 resultSubmit = self .batchSystem .submitJob (** batchDict )
189- if proxy :
190- os .remove (submitFile )
191174
192175 if resultSubmit ["Status" ] == 0 :
193176 self .submittedJobs += len (resultSubmit ["Jobs" ])
0 commit comments