|
10 | 10 | LocalCEType = Pool
|
11 | 11 |
|
12 | 12 | The Pool Computing Element is specific: it embeds an additional "inner" CE
|
13 |
| - (`InProcess` by default, `Sudo`, `Singularity`). The "inner" CE can be specified such as:: |
| 13 | + (`InProcess` by default, or `Singularity`). The "inner" CE can be specified such as:: |
14 | 14 |
|
15 | 15 | LocalCEType = Pool/Singularity
|
16 | 16 |
|
|
19 | 19 |
|
20 | 20 | **Code Documentation**
|
21 | 21 | """
|
22 |
| -import functools |
23 |
| -import os |
24 | 22 | import concurrent.futures
|
| 23 | +import functools |
25 | 24 |
|
26 |
| -from DIRAC import S_OK, S_ERROR |
| 25 | +from DIRAC import S_ERROR, S_OK |
27 | 26 | from DIRAC.ConfigurationSystem.private.ConfigurationData import ConfigurationData
|
28 |
| - |
29 | 27 | from DIRAC.Resources.Computing.ComputingElement import ComputingElement
|
30 |
| - |
31 | 28 | from DIRAC.Resources.Computing.InProcessComputingElement import InProcessComputingElement
|
32 | 29 | from DIRAC.Resources.Computing.SingularityComputingElement import SingularityComputingElement
|
33 | 30 |
|
34 |
| -# Number of unix users to run job payloads with sudo |
35 |
| -MAX_NUMBER_OF_SUDO_UNIX_USERS = 32 |
36 |
| - |
37 | 31 |
|
38 | 32 | def executeJob(executableFile, proxy, taskID, inputs, **kwargs):
|
39 |
| - """wrapper around ce.submitJob: decides which CE to use (Sudo or InProcess or Singularity) |
| 33 | + """wrapper around ce.submitJob: decides which CE to use (InProcess or Singularity) |
40 | 34 |
|
41 | 35 | :param str executableFile: location of the executable file
|
42 | 36 | :param str proxy: proxy file location to be used for job submission
|
@@ -134,13 +128,6 @@ def submitJob(self, executableFile, proxy=None, inputs=None, **kwargs):
|
134 | 128 | # Here we define task kwargs: adding complex objects like thread.Lock can trigger errors in the task
|
135 | 129 | taskKwargs = {"InnerCESubmissionType": self.innerCESubmissionType}
|
136 | 130 | taskKwargs["jobDesc"] = kwargs.get("jobDesc", {})
|
137 |
| - if self.innerCESubmissionType == "Sudo": |
138 |
| - for nUser in range(MAX_NUMBER_OF_SUDO_UNIX_USERS): |
139 |
| - if nUser not in self.userNumberPerTask.values(): |
140 |
| - break |
141 |
| - taskKwargs["NUser"] = nUser |
142 |
| - if "USER" in os.environ: |
143 |
| - taskKwargs["PayloadUser"] = os.environ["USER"] + f"p{str(nUser).zfill(2)}" |
144 | 131 |
|
145 | 132 | # Submission
|
146 | 133 | future = self.pPool.submit(executeJob, executableFile, proxy, self.taskID, inputs, **taskKwargs)
|
|
0 commit comments