Debug iPython Parallel engines in cluster

2019-08-29 01:53发布

Related to this thread...

I am trying to track down a bug in which the results from processing on an iPython cluster do not match what happens when the same process is run locally. Even when the iPython cluster is entirely local, and the CPU is simply running multiple engines.

I cannot seem to figure out how to log data as it is being processed on the engines. Print statements don't work and even when I try to have each engine write to a separate file, the file is created but nothing is written to it.

There must be a way to debug code running on the iPython parallel engines.

1条回答
成全新的幸福
2楼-- · 2019-08-29 02:20

Not sure why, but I narrowed the problem and workaround down to the fact that I am using cython and compiling the .pyx files before running the program.

For some reason the cython cdef init of my float variables was not being done properly on the engines however it was being done correctly when I ran outside of the Client() queue.

Changing these variables to be normal python variables solved the problem. Though it does not seem like this should have to happen. Anyone that can shed more light on this?

查看更多
登录 后发表回答