uqfoundation / pathos

parallel graph management and execution in heterogeneous computing
http://pathos.rtfd.io
Other
1.38k stars 89 forks source link

Is there a multiprocessing Logger for pathos? #201

Closed jerrysjin closed 3 years ago

jerrysjin commented 3 years ago

Is a multiprocessing logger for pathos?

I want to create a MP logger exporting logs to stdout and a single log file which can be passed to every created process. Is it possible to achieve this?

I tried several implementations found on the internet, but no one worked for me.

visrra commented 3 years ago

Try using pathos.helpers.mp instead of pathos.multiprocessing.ProcessPool. Reference: https://github.com/uqfoundation/pathos/issues/80#issuecomment-200420713

mmckerns commented 3 years ago

@visrra: thanks for the answer.

jerrysjin commented 3 years ago

Thanks for your reply! may i ask if there is an example showing the usage? still feel confusing about how to write to file and stdout