You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a Chapel library as a python module and calling it from a Jupyter notebook, any writes to stdout or stderr do not propagate to the Jupyter cell notebook.
IPython (which Jupyter uses) redirects the sys.stdout and sys.stderr python objects (source) to their custom objects. However, Chapel libraries write to their own stdout/stderr file descriptors, therefore IPython (and Jupyter) is unable to propagate that output.
There is a known user-end work-around where users can capture the output/stderr with the wurlitzer package. However, this is a bit cumbersome to use, and buffers all the output until the external library call is completed.
Marked as [user issue] due to a number of users reporting this through separate channels.
ben-albrecht
changed the title
Chapel output does not propagate to Jupter notebook cells
Chapel output does not propagate to Jupyter notebook cells
Feb 17, 2019
Summary of Problem
When compiling a Chapel library as a python module and calling it from a Jupyter notebook, any writes to stdout or stderr do not propagate to the Jupyter cell notebook.
IPython (which Jupyter uses) redirects the
sys.stdout
andsys.stderr
python objects (source) to their custom objects. However, Chapel libraries write to their ownstdout/stderr
file descriptors, therefore IPython (and Jupyter) is unable to propagate that output.There is a known user-end work-around where users can capture the output/stderr with the wurlitzer package. However, this is a bit cumbersome to use, and buffers all the output until the external library call is completed.
Steps to Reproduce
Source Code:
Compile command:
Execution command:
Using Anaconda 3.6.5:
Inside a Jupyter notebook:
The output shows up in the console output among the Jupyter logging output rather than the notebook output, e.g.
Configuration Information
chpl --version
:1.19.0 pre-release (9bfff1f9fa)
The text was updated successfully, but these errors were encountered: