Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/doParallel
23 February 2022, 09:29:41 UTC
  • Code
  • Branches (23)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.0.0
    • refs/tags/1.0.1
    • refs/tags/1.0.10
    • refs/tags/1.0.11
    • refs/tags/1.0.14
    • refs/tags/1.0.15
    • refs/tags/1.0.16
    • refs/tags/1.0.17
    • refs/tags/1.0.3
    • refs/tags/1.0.6
    • refs/tags/1.0.7
    • refs/tags/1.0.8
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • ca77b56
  • /
  • man
  • /
  • registerDoParallel.Rd
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:09e505c4593e967f63db1bea22112192b7ef9f29
origin badgedirectory badge
swh:1:dir:58a54dd306016507d4c20fd1b8db03f892f4a3e5
origin badgerevision badge
swh:1:rev:b843662b9c49fb610434ae22713fbc188a06b1c3
origin badgesnapshot badge
swh:1:snp:9e237295e4cb0cb01a3f5c368216b67a29736c74

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: b843662b9c49fb610434ae22713fbc188a06b1c3 authored by Rich Calaway on 28 September 2017, 15:24:39 UTC
version 1.0.11
Tip revision: b843662
registerDoParallel.Rd
\name{registerDoParallel}
\alias{registerDoParallel}
\alias{stopImplicitCluster}
\title{registerDoParallel}
\description{
The \code{registerDoParallel} function is used to register the 
parallel backend with the \code{foreach} package.
}
\usage{
registerDoParallel(cl, cores=NULL, \dots)
stopImplicitCluster()
}
\arguments{
  \item{cl}{A cluster object as returned by \code{makeCluster}, or the number
  of nodes to be created in the cluster. If not specified, on Windows a 
  three worker cluster is created and used.}
  \item{cores}{The number of cores to use for parallel execution. If not
  specified, the number of cores is set to the value of 
  \code{options("cores")}, if specified, or to one-half the number of cores detected
  by the \code{parallel} package.}
  \item{\dots}{Package options.  Currently, only the \code{nocompile} option
  is supported.  If \code{nocompile} is set to \code{TRUE}, compiler
  support is disabled.}
}
\details{
The \code{parallel} package from R 2.14.0 and later provides functions for 
parallel execution of R code on machines with multiple cores or processors 
or multiple computers.  It is essentially a blend of the \code{snow} and 
\code{multicore} packages. By default, the \code{doParallel} package uses 
\code{snow}-like functionality.  The \code{snow}-like functionality
should work fine on Unix-like systems, but the \code{multicore}-like 
functionality is limited to a single sequential worker on Windows systems.
On workstations with multiple cores running Unix-like operating systems, 
the system \code{fork} call is used to spawn copies of the current process. 

The \code{doParallel} backend supports both multicore and snow options passed
through the \code{foreach} function. 
The supported multicore options are \code{preschedule}, \code{set.seed},
\code{silent}, and \code{cores}, which are analogous to the similarly named 
arguments to \code{\link{mclapply}}, and are passed using the
\code{.options.multicore} argument to \code{foreach}. The supported snow options are 
\code{preschedule}, which like its multicore analog can be used to chunk the 
tasks so that each worker gets a prescheduled chunk of tasks, and 
\code{attachExportEnv}, which can be used to attach the export environment
in certain cases where R's lexical scoping is unable to find a needed
export. The snow options are passed to \code{foreach} using the \code{.options.snow}
argument.

The function \code{stopImplicitCluster} can be used in vignettes and other places
where it is important to explicitly close the implicitly created cluster.
}
\examples{
cl <- makePSOCKcluster(2)
registerDoParallel(cl)
m <- matrix(rnorm(9), 3, 3)
foreach(i=1:nrow(m), .combine=rbind) %dopar%  (m[i,] / mean(m[i,]))
stopCluster(cl)
}
\keyword{utilities}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API