Hello —

I am using inline C functions within foreach %dopar% loop. On SMP (doParallel, 
doMP) it works but on MPI-based clusters (doMPI) it does’t. The reason, I 
think, is because the object code produced using the inline package, 
essentially an .so file, does not get copied onto the worker nodes when they 
are spawned using startMPIcluster().

Does anyone have any ideas on how I can send the object code to the workers and 
re-link it to the inline functions, or some other way? I know that I can define 
the inline functions within the foreach loop but it is very limiting and does 
not look pretty when you have a lot of functions to define. So, is there I way 
that follows a good programming style?

I would prefer to do it from within the R script and use the “spawning” mode to 
paralellize.

Thank you for your time, 

Mikhail.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to