[yt-dev] Issue #956: enable_parallelism dies due to missing rootLogger (yt_analysis/yt)

Nathan Goldbaum issues-reply at bitbucket.org
Sat Dec 13 12:07:18 PST 2014


New issue 956: enable_parallelism dies due to missing rootLogger
https://bitbucket.org/yt_analysis/yt/issue/956/enable_parallelism-dies-due-to-missing

Nathan Goldbaum:

This script:


```
#!python

import yt
yt.enable_parallelism()
```

Will fail with the following (somewhat garbled) traceback when run in parallel:


```
#!python

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    yt.enable_parallelism()
  File "/Users/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 116, in enable_parallelism
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    if len(yt.utilities.logger.rootLogger.handlers) > 0:
    yt.enable_parallelism()
AttributeError: 'module' object has no attribute 'rootLogger'
  File "/Users/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 116, in enable_parallelism
    if len(yt.utilities.logger.rootLogger.handlers) > 0:
AttributeError: 'module' object has no attribute 'rootLogger'
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    yt.enable_parallelism()
  File "/Users/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 116, in enable_parallelism
    if len(yt.utilities.logger.rootLogger.handlers) > 0:
AttributeError: 'module' object has no attribute 'rootLogger'
yt : [INFO     ] 2014-12-13 12:04:00,092 Global parallel computation enabled: 0 / 4
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    yt.enable_parallelism()
  File "/Users/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 116, in enable_parallelism
    if len(yt.utilities.logger.rootLogger.handlers) > 0:
AttributeError: 'module' object has no attribute 'rootLogger'
```

This was caused by PR 1355. I've provisionally assigned this issue to John ZuHone because he's been thinking about loggers a lot lately. I'm also not sure what the parallel analysis interface is doing with the loggers here, so I can't fix this myself immediately.  If anyone else knows how to handle this, feel free to jump in with a patch :)

Responsible: jzuhone



More information about the yt-dev mailing list