Thanks for providing the examples! I'm able to reproduce the multiprocessing example as shown below when using mprof run --multiprocess multiprocessing_example.py
I can also produce this plot to see the total memory consumption by using mprof run --multiprocess --include-children multiprocessing_example.py
However, mprof run --include-children multiprocessing_example.py fails with the final error message as _pickle.PicklingError: Can't pickle <function worker at 0x7f9980295510>: attribute lookup worker on __main__ failed. Can you help me understand why using only the -C flag causes the run to fail, but using both -C and -M successfully runs.
Thanks for providing the examples! I'm able to reproduce the multiprocessing example as shown below when using
mprof run --multiprocess multiprocessing_example.py
I can also produce this plot to see the total memory consumption by using
mprof run --multiprocess --include-children multiprocessing_example.py
However,
mprof run --include-children multiprocessing_example.py
fails with the final error message as_pickle.PicklingError: Can't pickle <function worker at 0x7f9980295510>: attribute lookup worker on __main__ failed
. Can you help me understand why using only the-C
flag causes the run to fail, but using both-C
and-M
successfully runs.