操作系统:win10 64位家庭版;
R版本:4.3.1
让R使用openBLAS的方法参考的是
[https://www.douban.com/note/296114898/?_i=2203346w0yKmky](https://)
- 下载OpenBLAS-0.3.25-x64-64.zip文件,找到其中的bin/libopenblas.dll文件,改名为Rblas.dll,放到D:\Program Files\R\R-4.3.1\bin\x64中,替换原有的Rblas.dll;
- 下载adda_1.2_win64.zip文件,将其中的libgfortran_64-3.dll文件改名为libgfortran-3.dll,复制到D:\Program Files\R\R-4.3.1\bin\x64;
- 将第二步文件中的libquadmath_64-0.dll复制到D:\Program Files\R\R-4.3.1\bin\x64。
上述链接提供了测试用例:
> a <- matrix(runif(2e3^2), 2e3)
> system.time(b <- crossprod(a))
> a <- matrix(runif(4e3^2), 4e3)
> system.time(b <- crossprod(a))
上述代码可以正常运行,且运行速度明显提升。
但是当我要使用WGCNA构建网络时,R在需要调用BLAS时立即崩溃。WGCNA网络构建代码:
net <-
blockwiseModules(expDataMt, power=power, maxBlockSize=35000, minModuleSize=10,
TOMType='signed', networkType = networkType, reassignThreshold=1e-6,
mergeCutHeight=mergeCutHeight, numericLabels=TRUE, pamStage = T,
pamRespectsDendro=T, saveTOMs=TRUE, corType='bicor',
maxPOutliers=0.05, loadTOMs=TRUE, verbose=3,
robustY = F, corFnc = 'bicor', deepSplit = deepSplit,
saveTOMFileBase=paste(dataSetName, as.character(suffix),
'tom', sep='.'))
不会插图。上述代码运行过程中会打印类似“正在调用BLAS进行矩阵相乘计算”之类的提示信息。但使用openBLAS后,在这行信息出现之前,R崩溃了。
![C:\Users\dell\Desktop\捕获.PNG](https://)
![C:\Users\dell\Desktop\捕获2.PNG](https://)
请问有人遇到过类似的情况吗?这是什么原因导致的?应该怎么解决?请各位大佬多多指教!