我最近买了一台12核的新电脑。
我尝试使用foreach包和以下命令运行R脚本:
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] parallel splines grid stats graphics grDevices utils
[8] datasets methods base
other attached packages:
[1] np_0.60-2 boot_1.3-13 doParallel_1.0.8 iterators_1.0.7
[5] foreach_1.4.2 scales_0.2.4 plyr_1.8.2 VineCopula_1.4
[9] rugarch_1.3-4 copula_0.999-13 caschrono_1.4 timeSeries_3012.99
[13] its_1.1.8 Hmisc_3.15-0 ggplot2_1.0.1 Formula_1.2-1
[17] survival_2.37-7 lattice_0.20-29 forecast_5.9 timeDate_3012.100
[21] zoo_1.7-12 urca_1.2-8 tseries_0.10-34
loaded via a namespace (and not attached):
[1] acepack_1.3-3.3 ADGofTest_0.3
[3] cluster_1.15.3 codetools_0.2-9
[5] colorspace_1.2-6 cubature_1.1-2
[7] digest_0.6.8 DistributionUtils_0.5-1
[9] expm_0.99-1.1 foreign_0.8-61
[11] fracdiff_1.4-2 GeneralizedHyperbolic_0.8-1
[13] gsl_1.9-10 gtable_0.1.2
[15] igraph_0.7.1 KernSmooth_2.23-13
[17] ks_1.9.4 latticeExtra_0.6-26
[19] MASS_7.3-35 Matrix_1.1-4
[21] misc3d_0.8-4 munsell_0.4.2
[23] mvtnorm_1.0-2 nloptr_1.0.4
[25] nnet_7.3-8 numDeriv_2012.9-1
[27] proto_0.3-10 pspline_1.0-16
[29] quadprog_1.5-5 RColorBrewer_1.1-2
[31] Rcpp_0.11.5 reshape2_1.4.1
[33] rgl_0.95.1201 rpart_4.1-8
[35] Rsolnp_1.15 SkewHyperbolic_0.3-2
[37] spd_2.0-0 stabledist_0.6-6
[39] stats4_3.1.2 stringr_0.6.2
[41] tools_3.1.2 truncnorm_1.0-7
[43] xts_0.9-7
但是,任务管理器显示只使用了4个核心(请参阅下面的快照)。你对此有解释吗?感谢。
编辑:例如,我使用以下代码
{{1}}
编辑2:SessionInfo给出
{{1}}