Thanks for the suggestion. I tried it from a Z shell window and get the error messages:
1: In mclapply(data, graph, graphs1, periods[iPeriod, ], mc.cores = 6) :
scheduled cores 1, 2, 3, 4, 5, 6 did not deliver results, all values of the jobs will be affected
So I started an R session from the command line and got the YES from Sys.getenv. Then I sourced my R program and got different errors:
address 0x110, cause 'memory not mapped'
Traceback:
1: jpeg(filename = fn, width = 800, pointsize = 12, quality = 100)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: mclapply(data, graph, graphs1, periods[iPeriod, ], mc.cores = 6)
13: bestCompiled(debugIt = FALSE)
14: eval(ei, envir)
15: eval(ei, envir)
16: withVisible(eval(ei, envir))
17: source("pBestETFs.R")
It makes me wonder if anyone has gotten mclapply to work on a Mac. Mine is a 2019 Intel version.