How about the attached patch? Should detection of number of cores
fail it sets the number of cores to be one. With this patch
r-cran-nmf builds successfully on Alpha.
Cheers
Michael.
Index: r-cran-nmf-0.21.0/R/options.R
===================================================================
--- r-cran-nmf-0.21.0.orig/R/options.R 2018-02-07 02:45:56.000000000 +1300
+++ r-cran-nmf-0.21.0/R/options.R 2018-03-12 19:42:26.704548354 +1300
@@ -78,7 +78,7 @@
, gc=50
# define default parallel backend
, parallel.backend= option_symlink('pbackend') # for backward compatibility
- , pbackend= if( parallel::detectCores() > 1 ) 'par' else 'seq'
+ , pbackend= if( parallel::detectCores() > 1 && !is.na(parallel::detectCores()) ) 'par' else 'seq'
# toogle verbosity
, verbose=FALSE
# toogle debug mode
Index: r-cran-nmf-0.21.0/R/parallel.R
===================================================================
--- r-cran-nmf-0.21.0.orig/R/parallel.R 2018-02-19 06:39:59.000000000 +1300
+++ r-cran-nmf-0.21.0/R/parallel.R 2018-03-12 19:35:55.337916554 +1300
@@ -17,6 +17,7 @@
getMaxCores <- function(limit=TRUE){
#ceiling(parallel::detectCores()/2)
nt <- n <- parallel::detectCores()
+ if( is.na(n) ) n <- 1L
# limit to number of cores specified in options if asked for
if( limit ){
if( !is.null(nc <- getOption('cores')) ) n <- nc # global option