|
17 | 17 | from copy import deepcopy
|
18 | 18 | import numpy as np
|
19 | 19 |
|
20 |
| -from ... import logging |
| 20 | +from ... import logging, config |
21 | 21 | from ...utils.misc import str2bool
|
22 | 22 | from ..engine import MapNode
|
23 | 23 | from ..plugins import semaphore_singleton
|
@@ -223,15 +223,18 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
|
223 | 223 | key=lambda item: (self.procs[item]._interface.estimated_memory_gb,
|
224 | 224 | self.procs[item]._interface.num_threads))
|
225 | 225 |
|
226 |
| - logger.debug('Free memory (GB): %d, Free processors: %d', |
227 |
| - free_memory_gb, free_processors) |
| 226 | + if str2bool(config.get('execution', 'profile_runtime')): |
| 227 | + logger.debug('Free memory (GB): %d, Free processors: %d', |
| 228 | + free_memory_gb, free_processors) |
228 | 229 |
|
229 | 230 | # While have enough memory and processors for first job
|
230 | 231 | # Submit first job on the list
|
231 | 232 | for jobid in jobids:
|
232 |
| - logger.debug('Next Job: %d, memory (GB): %d, threads: %d' \ |
233 |
| - % (jobid, self.procs[jobid]._interface.estimated_memory_gb, |
234 |
| - self.procs[jobid]._interface.num_threads)) |
| 233 | + if str2bool(config.get('execution', 'profile_runtime')): |
| 234 | + logger.debug('Next Job: %d, memory (GB): %d, threads: %d' \ |
| 235 | + % (jobid, |
| 236 | + self.procs[jobid]._interface.estimated_memory_gb, |
| 237 | + self.procs[jobid]._interface.num_threads)) |
235 | 238 |
|
236 | 239 | if self.procs[jobid]._interface.estimated_memory_gb <= free_memory_gb and \
|
237 | 240 | self.procs[jobid]._interface.num_threads <= free_processors:
|
@@ -307,5 +310,3 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
|
307 | 310 | self.pending_tasks.insert(0, (tid, jobid))
|
308 | 311 | else:
|
309 | 312 | break
|
310 |
| - |
311 |
| - logger.debug('No jobs waiting to execute') |
|
0 commit comments