[R] inconsistency in mclapply.....

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Fri Jun 9 22:13:00 CEST 2023

On Fri, 9 Jun 2023 18:01:44 +0000
akshay kulkarni <akshay_e4 using hotmail.com> wrote:

> > LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = 2,mc.preschedule =
> > FALSE)  
>   |
>                                                                                   |
>   0%, ETA NA^
> It just hangs.

My questions from the last time still stand:

0) What is your sessionInfo()? Maybe you're running a parallel BLAS
which doesn't always handle fork() or something. It may be worth
disabling BLAS-level parallelism as long as you're already trying to
use 100% of your processor by other means.

1) What does traceback() show after you interrupt pbmclapply? Most
likely, you would be interrupting selectChildren(), but if not, the
problem may lie in a very different place from what I'm expecting.

2) While pbmclapply is hung, without interrupting it, take a look at
the state of the system and the processes on it (are you still on RHEL?
use `top` or whatever task manager you're comfortable with).

 a) Is 100% of the CPU being used? 100% of one core? Is system mostly

 b) Can you find the child processes launched by pbmclapply?

 c) Write down the PID of the child process and attach a debugger to
 it (If you're on RHEL, try following this guide:
 <https://beej.us/guide/bggdb/#attach>. If GDB asks you to install
 additional debug symbols by running debuginfo-install, follow its
 guidance and then restart GDB.) and obtain a backtrace. (In GDB, the
 command to obtain a backtrace is "backtrace".) Which function is the
 child process stuck in?

Best regards,

More information about the R-help mailing list