bigGP.init
initializes the bigGP and must be called before
using any bigGP functionality. It starts slave processes, if not
already started, and sets up the necessary objects containing
information for distributing calculations correctly. It also
initializes the RNG on the slave processes.
bigGP.init(P = NULL, parallelRNGpkg = "rlecuyer", seed = 0)
Number of slave processes. Should be equal to D(D+1)/2 for some
integer D. If NULL
, will be taken to be
mpi.comm.size()-1
, where the additional process is the
master.
Package to be used for random number generation (RNG). At the moment this should be one of relecuyer or rsprng, and these packages must be installed.
Seed to be used for initializing the parallel RNG.
The initialization includes starting the slave processes, calculating
the partition factor, \(D\), and providing the slave processes with
unique identifying information. This information is stored in the
.bigGP
object on each slave process.
Note that in general, the number of processes (number of slave
processes, P
, plus one for the master) should not exceed the number of
physical cores on the machine(s) available.
bigGP.init
also sets up random number generation on the slaves,
using parallelRNGpkg
when specified, and setting appropriate
seeds on each slave process.
if (FALSE) {
bigGP.init(3, seed = 1)
}
Run the code above in your browser using DataLab