背景

使用SCENT包进行分析时出现如下错误:

  1. OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
  2. OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2583728 max
  3. OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
  4. OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2583728 max

解决过程

解决方法

在运行程序或者进入R环境之前设置环境变量:

  1. export OPENBLAS_NUM_THREADS=1

原理:在其他程序调用BLAS进行线性运算时,可能创建了过多的BLAS线程,造成环境过负荷,超过系统限制,在此设置调用线程为1即可。