R Under development (unstable) (2024-07-26 r86926 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") > > library(parallel) Attaching package: 'parallel' The following object is masked _by_ '.GlobalEnv': detectCores > > message("*** makeClusterMPI() ...") *** makeClusterMPI() ... > > pkg <- "Rmpi" > if (fullTest && requireNamespace(pkg, quietly = TRUE)) { + cl <- makeClusterMPI(2L) + str(cl) + + res <- parLapply(cl, X = 1:2, fun = function(x) { + list( + hostname = Sys.info()[["nodename"]], + pid = Sys.getpid(), + value = x^2 + ) + }) + utils::str(res) + y <- vapply(res, FUN = `[[`, "value", FUN.VALUE = NA_real_) + stopifnot(identical(y, c(1, 4))) + + stopCluster(cl) + str(cl) + } > > message("*** makeClusterMPI() ... DONE") *** makeClusterMPI() ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.25 0.07 0.31