[R-sig-hpc] Unique name for each child process in parallel R

Cameron Bracken cameron.bracken at gmail.com
Fri Sep 12 20:31:16 CEST 2014


Just what I was looking for thanks!

On Fri, Sep 12, 2014 at 12:28 PM, Olaf Mersmann <olafm at p-value.net> wrote:
> Hi Cameron,
>
> * Cameron Bracken <cameron.bracken at gmail.com> [700101 00:59]:
>> I would like to find a unique name for each child process when running
>> computations with the parallel package in R. My goal is to do a 'poor
>> mans' parallel output where each process writes to its own file. I can
>> get the nodename with Sys.info()['nodename'] but I have 8 processes
>> for each node. I can't seem to find a way to identify each process
>> uniquely.
>
> Try Sys.getpid(). Not really unique but the chance of getting the same
> PID in successive runs is quite low.
>
> Cheers,
> Olaf



More information about the R-sig-hpc mailing list