相关疑难解决方法(0)

R CRAN使用并行功能时检查失败

我想向使用并行计算的CRAN提交一个包parallel::makeCluster(parallel::detectCores()).

当我构建包时一切正常,但是当我检查包(devtools::check(document = FALSE))时它返回错误:

Running examples in ‘TESTER-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hello_world
> ### Title: Prints hello world
> ### Aliases: hello_world
> 
> ### ** Examples
> 
> hello_world()
Error in .check_ncores(length(names)) : 8 simultaneous processes spawned
Calls: hello_world -> <Anonymous> -> makePSOCKcluster -> .check_ncores
Execution halted
Run Code Online (Sandbox Code Playgroud)

我在MWE包(TESTER)中重新创建了错误,它只有一个函数hello_world,我已将整个TESTER包上传到GitHub,但它应该可以从以下函数重现.

#' Prints hello world
#'
#' @return nothing
#' @export …
Run Code Online (Sandbox Code Playgroud)

r cran

2
推荐指数
1
解决办法
325
查看次数

标签 统计

cran ×1

r ×1