Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PETSc error #64

Open
milisims opened this issue Apr 27, 2023 · 0 comments
Open

PETSc error #64

milisims opened this issue Apr 27, 2023 · 0 comments

Comments

@milisims
Copy link

I'm rendering a scene with a bunch of little spheres and boxes, and the rendering completes, but then throws this error and crashes the python process.

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 13 Broken Pipe: Likely while reading or writing to a socket
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0

It happens specifically when this line is executed, process.communicate(string.encode('ascii')) in render_povstring. This makes sense, since it complains about a broken pipe for the communicate call.

If I save the string (or just the tempfile), and execute the exact call to render_povstring separately, it doesn't replicate the issue. The string is generated in a module that uses multiprocessing, so there might be some weirdness going on there?

Either way, the issue is resolved if I remove string.encode('ascii') from the communicate call, or use subprocess.run instead of Popen, like in this patch. Is there any use to sending the string as stdin, since the command generated in that function always uses the saved file anyway?

The patch I linked above preserves the return_np_array functionality, I'm not sure if there is another side effect but it doesn't seem so to me. I'll submit a PR if you like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant