The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Parallel Execution for Confidence Intervals

Justin Kamerman

2024-08-27

To leverage multicore processors to speed up calcualtion of confidence intervals, use the parallel package to create a cluster and attach the qfasa.parallel.cluster option.

The cluster can be used for multiple invocations of beta.meths.CI() but should be shut down when work is complete to free up resources.

Set Number of Cores

For maximum speedup, set the qfasa.parallel.numcores option to the total number of cores on your computer. The number of cores can be determined using the detectCores() function.

parallel::detectCores()
## [1] 20

Create Cluster

options(qfasa.parallel.numcores = 8)
options(qfasa.parallel.cluster = parallel::makeCluster(getOption('qfasa.parallel.numcores'),
                                                       type='FORK'))
#
# Note that if using windows, do not include type='FORK'.

Confidence Intervals

No change is required to the conf.meth() call. The implementation will automatically detect the cluster and use it to parallelize the bootstrap iterations.

Shut Down Cluster

parallel::stopCluster(getOption('qfasa.parallel.cluster'))

Portability

Parallel execution has been tested on Ubuntu Linux, AWS Linux, and MacOS platforms only.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.