Running ‘000.sessionDetails.R’ [0s/1s]
  Running ‘ClusterRegistry.R’ [3s/9s]
  Running ‘Future-class.R’ [2s/4s]
  Running ‘FutureError.R’ [1s/1s]
  Running ‘FutureGlobals.R’ [1s/1s]
  Running ‘FutureRegistry.R’ [1s/1s]
  Running ‘as.cluster.R’ [1s/3s]
  Running ‘availableCores.R’ [1s/1s]
  Running ‘availableWorkers.R’ [1s/1s]
  Running ‘backtrace.R’ [1s/2s]
  Running ‘cluster-missing-future-pkg.R’ [1s/3s]
  Running ‘cluster.R’ [7s/31s]
  Running ‘constant.R’ [1s/1s]
  Running ‘demo.R’ [10s/13s]
  Running ‘dotdotdot.R’ [2s/5s]
  Running ‘early-signaling.R’ [2s/12s]
  Running ‘future,labels.R’ [1s/1s]
  Running ‘future.R’ [1s/1s]
  Running ‘futureAssign.R’ [2s/6s]
  Running ‘futureAssign_OP.R’ [3s/7s]
  Running ‘futureAssign_OP_with_environment.R’ [1s/1s]
  Running ‘futureAssign_OP_with_listenv.R’ [1s/1s]
  Running ‘futureCall.R’ [4s/11s]
  Running ‘futureOf.R’ [1s/1s]
  Running ‘futureOf_with_environment.R’ [1s/1s]
  Running ‘futureOf_with_listenv.R’ [1s/1s]
  Running ‘futures.R’ [19s/45s]
  Running ‘globals,NSE.R’ [1s/2s]
  Running ‘globals,formulas.R’ [4s/9s]
  Running ‘globals,manual.R’ [2s/3s]
  Running ‘globals,resolve.R’ [2s/4s]
  Running ‘globals,subassignment.R’ [3s/7s]
  Running ‘globals,toolarge.R’ [1s/4s]
  Running ‘globals,tricky.R’ [8s/13s]
  Running ‘globals,tricky_recursive.R’ [1s/1s]
  Running ‘globalsOf,tweaks.R’ [1s/1s]
  Running ‘immediateCondition.R’ [1s/2s]
  Running ‘invalid-owner.R’ [2s/5s]
  Running ‘makeClusterPSOCK.R’ [1s/3s]
  Running ‘mandelbrot.R’ [1s/1s]
  Running ‘mpi.R’ [1s/1s]
  Running ‘multicore,multithreading.R’ [1s/1s]
  Running ‘multicore.R’ [1s/2s]
  Running ‘multiprocess.R’ [2s/3s]
  Running ‘multisession.R’ [4s/13s]
  Running ‘nbrOfWorkers.R’ [3s/12s]
  Running ‘nested_futures,mc.cores.R’ [2s/6s]
  Running ‘nested_futures.R’ [1s/1s]
  Running ‘non-exportable,connections.R’ [1s/4s]
  Running ‘objectSize.R’ [1s/1s]
  Running ‘plan.R’ [2s/5s]
  Running ‘relaying.R’ [1s/3s]
  Running ‘remote.R’ [1s/4s]
  Running ‘requestCore.R’ [1s/3s]
  Running ‘requestNode.R’ [2s/10s]
  Running ‘reserved-keyword-functions.R’ [1s/2s]
  Running ‘resolve.R’ [2s/4s]
  Running ‘resolved-non-blocking-test.R’ [3s/35s]
  Running ‘rng.R’ [11s/18s]
  Running ‘sequential.R’ [1s/1s]
  Running ‘sessionDetails.R’ [1s/1s]
  Running ‘startup.R’ [2s/6s]
  Running ‘stdout.R’ [2s/6s]
  Running ‘transparent.R’ [1s/1s]
  Running ‘tweak.R’ [1s/1s]
  Running ‘utils.R’ [1s/2s]
  Running ‘uuid.R’ [1s/1s]
  Running ‘whichIndex.R’ [1s/1s]
Running the tests in ‘tests/nested_futures,mc.cores.R’ failed.
Complete output:
  > source("incl/start.R")
  [15:42:35.487] plan(): Setting new future strategy stack:
  [15:42:35.488] List of future strategies:
  [15:42:35.488] 1. sequential:
  [15:42:35.488]    - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)
  [15:42:35.488]    - tweaked: FALSE
  [15:42:35.488]    - call: future::plan("sequential")
  [15:42:35.491] plan(): nbrOfWorkers() = 1
  > library("listenv")
  > options(future.debug = FALSE)
  > 
  > message("*** Nested futures - mc.cores ...")
  *** Nested futures - mc.cores ...
  > 
  > strategies <- NULL
  > ## Speed up CRAN checks: Skip on CRAN Windows 32-bit
  > if (!isWin32) strategies <- c(strategies, "multisession")
  > if (supportsMulticore()) strategies <- c(strategies, "multicore")
  > pid <- Sys.getpid()
  > cat(sprintf("Main PID: %d\n", pid))
  Main PID: 31391
  > 
  > cat("Available cores on this machine:\n")
  Available cores on this machine:
  > cores <- availableCores()
  > print(cores)
  mc.cores 
         2 
  > 
  > for (mc in 1:2) {
  +   ## Speed up CRAN checks: Skip on CRAN Windows 32-bit
  +   if (!fullTest && isWin32) next
  +   
  +   message(sprintf("- mc.cores = %d ...", mc))
  +   options(mc.cores = mc)
  +   mc2 <- min(mc, cores)
  +   
  +   for (strategy in strategies) {
  +     message(sprintf("plan(list('sequential', '%s')):", strategy))
  +     plan(list('sequential', strategy))
  +     a %<-% {
  +       b1 %<-% Sys.getpid()
  +       b2 %<-% Sys.getpid()
  +       list(pid = Sys.getpid(), cores = availableCores(), pid1 = b1, pid2 = b2)
  +     }
  +     print(a)
  +     stopifnot(a$pid == pid)
  +     stopifnot((mc2 <= 1 && a$pid1 == pid) || (a$pid1 != pid))
  +     stopifnot((mc2 <= 1 && a$pid2 == pid) || (a$pid2 != pid))
  +     stopifnot(((mc2 <= 1 || a$cores <= 2) && a$pid2 == a$pid1) || (a$pid2 != a$pid1))
  + 
  +     if (mc == 1L) {
  +       message(sprintf("plan(list('sequential', '%s':2)):", strategy))
  +       plan(list('sequential', tweak(strategy, workers = 2)))
  +       a %<-% {
  +         b1 %<-% Sys.getpid()
  +         b2 %<-% Sys.getpid()
  +         list(pid = Sys.getpid(), cores = availableCores(), pid1 = b1, pid2 = b2)
  +       }
  +       print(a)
  +       stopifnot(a$pid == pid)
  +       stopifnot((mc2 <= 1 && a$pid1 == pid) || (a$pid1 != pid))
  +       stopifnot((mc2 <= 1 && a$pid2 == pid) || (a$pid2 != pid))
  +       stopifnot((mc2 <= 1 && a$pid2 == a$pid1) || (a$pid2 != a$pid1))
  +     }
  + 
  +     message(sprintf("plan(list('%s', 'sequential')):", strategy))
  +     plan(list(strategy, 'sequential'))
  +     a %<-% {
  +       b1 %<-% Sys.getpid()
  +       b2 %<-% Sys.getpid()
  +       list(pid = Sys.getpid(), cores = availableCores(), pid1 = b1, pid2 = b2)
  +     }
  +     print(a)
  +     stopifnot((mc2 <= 1 && a$pid  == pid) || (a$pid  != pid))
  +     stopifnot((mc2 <= 1 && a$pid1 == pid) || (a$pid1 != pid))
  +     stopifnot((mc2 <= 1 && a$pid2 == pid) || (a$pid2 != pid))
  +     stopifnot(a$pid2 == a$pid1)
  + 
  +     message(sprintf("plan(list('%s', '%s')):", strategy, strategy))
  +     plan(list(strategy, strategy))
  +     a %<-% {
  +       b1 %<-% { Sys.sleep(0.2); Sys.getpid() }
  +       b2 %<-% Sys.getpid()
  +       list(pid = Sys.getpid(), cores = availableCores(), pid1 = b1, pid2 = b2)
  +     }
  +     print(a)
  +     stopifnot((mc2 <= 1 && a$pid  == pid) || (a$pid  != pid))
  +     stopifnot((mc2 <= 1 && a$pid1 == pid) || (a$pid1 != pid))
  +     stopifnot((mc2 <= 1 && a$pid2 == pid) || (a$pid2 != pid))
  +     stopifnot(a$pid2 == a$pid1)
  + 
  +     if (mc == 1L) {
  +       message(sprintf("plan(list('%s':2, '%s':2)):", strategy, strategy))
  +       plan(list(tweak(strategy, workers = 2), tweak(strategy, workers = 2)))
  +       a %<-% {
  +         b1 %<-% Sys.getpid()  ## This stalls
  +         b2 %<-% Sys.getpid()
  +         list(pid = Sys.getpid(), cores = availableCores(), pid1 = b1, pid2 = b2)
  +       }
  +       print(a)
  +       stopifnot(a$pid  != pid)
  +       stopifnot(a$pid1 != pid)
  +       stopifnot(a$pid2 != pid)
  +       stopifnot(a$pid2 != a$pid1)
  +     }
  + 
  +     ## Assert that nested the FutureRegistry is not inherited when using
  +     ## nested strategies, particularly 'multicore'.
  +     ## https://github.com/HenrikBengtsson/future/issues/231
  +     fs <- lapply(1:2, FUN = function(i) future( value(future(TRUE)) ))
  +     v <- values(fs)
  +   } ## for (strategy ...)
  + 
  +   message(sprintf(" - mc.cores = %d ... DONE", mc))
  + } ## for (mc ...)
  - mc.cores = 1 ...
  plan(list('sequential', 'multisession')):
  $pid
  [1] 31391
  
  $cores
  mc.cores 
         1 
  
  $pid1
  [1] 31391
  
  $pid2
  [1] 31391
  
  plan(list('sequential', 'multisession':2)):
  $pid
  [1] 31391
  
  $cores
  mc.cores 
         1 
  
  $pid1
  [1] 32452
  
  $pid2
  [1] 600
  
  plan(list('multisession', 'sequential')):
  $pid
  [1] 31391
  
  $cores
  mc.cores 
         1 
  
  $pid1
  [1] 31391
  
  $pid2
  [1] 31391
  
  plan(list('multisession', 'multisession')):
  $pid
  [1] 31391
  
  $cores
  mc.cores 
         1 
  
  $pid1
  [1] 31391
  
  $pid2
  [1] 31391
  
  plan(list('multisession':2, 'multisession':2)):
  Warning in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE,  :
    port 35258 cannot be opened
  Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE,  : 
    Failed to launch and connect to R worker on local machine 'localhost' from local machine 'gimli'.
   * The error produced by socketConnection() was: 'cannot open the connection'
   * In addition, socketConnection() produced 1 warning(s):
     - Warning #1: 'port 35258 cannot be opened' (which suggests that this port is either already occupied by another process or blocked by the firewall on your local machine)
   * The localhost socket connection that failed to connect to the R worker used port 35258 using a communication timeout of 120 seconds and a connection timeout of 120 seconds.
   * Worker launch call: '/home/hornik/tmp/R.check/r-patched-gcc/Work/build/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e '#label=future/tests/nested_futures,mc.cores.R:gimli:hornik:31391' -e 'try(suppressWarnings(cat(Sys.getpid(),file="/tmp/RtmpLZEDuS/future.parent=31391.7a9f4e701862.pid")), silent = TRUE)' -e 'workRSOCK <- tryCatch(parallel:::.slaveRSOCK, error=function(e) parallel:::.workRSOCK); workRSOCK()' MASTER=localhost PORT=35258 OUT=/dev/null TIMEOUT=120 XDR=TRUE.
   * Worker (PID 1437) was successfully killed: TRUE
   * Troubleshooting suggestions:
     - Suggestion #1: Set 'verbose=TRUE' to see more details.
     - Suggestion #2: Set 'outfile=NULL' to see output from worker.
  Calls: plan ... tryCatchList -> tryCatchOne -> <Anonymous> -> <Anonymous>
  Execution halted