search for: init_sprng

Displaying 1 result from an estimated 1 matches for "init_sprng".

2003 Dec 01
2
help with random numbers and Rmpi
.../*Initialize MPI*/ MPI_Init(&argc, &argv); MPI_Comm_get_parent(&slavecomm); MPI_Intercomm_merge(slavecomm, 1, &all_processes); /*How many processes are there?*/ MPI_Comm_size(all_processes, &size); /*Which one am I?*/ MPI_Comm_rank(all_processes, &rank); init_sprng() rand = sprng(); free.sprng() randarray = (double *)malloc(sizeof(double)*size); /*Gather random numbers from all C slave processes*/ /* Using randarray doesn't make sense since this should correspond to the rdata vector in the R master process */ MPI_GAther(&rand, 1, 1, MP...