When debugging #21, most permutations are run within the parallel %dopar for-loop, and there is no easy way to print message to stdout.
Reference
I found this socket based solution link here. However, the socket does not work for me.
Problem
Nothing is outputted to the socket. Also, the socket will automatically shutdown and make the program stuck.
I tried the socket write in a parent R process, and it works. Potential reason for the socket stuck is multiple threads compete for I/O resource and deadlock the program.
Fix this in the future this issue is independent to this project.
Task
Output debugging message within
%dopar%
function.Scenario
When debugging #21, most permutations are run within the parallel
%dopar
for-loop, and there is no easy way to print message tostdout
.Reference
I found this
socket
based solution link here. However, the socket does not work for me.Problem
Nothing is outputted to the socket. Also, the socket will automatically shutdown and make the program stuck.
I tried the socket write in a parent R process, and it works. Potential reason for the socket stuck is multiple threads compete for I/O resource and deadlock the program.
Fix this in the future this issue is independent to this project.