Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenBLAS issue with ComBat() function of the R Bioconductor SVA package on Torque cluster

I've a problem with ComBat() function from the SVA package of Bioconductor in R.

On my laptop (Latitude 5590 running a Linux Ubuntu 18 operating system), it works well. But if I ran it on a TORQUE cluster, the call to the ComBat() function generates an infinite waiting loop:

"ComBat()" Found25batches

Note: one batch has only one sample, setting mean.only=TRUE

Adjusting for0covariate(s) or covariate level(s)

Standardizing Data across genes

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

OpenBLAS blas_thread_init: RLIMIT_NPROC 903725 current, 903725 max

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

OpenBLAS blas_thread_init: RLIMIT_NPROC 903725 current, 903725 max

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

OpenBLAS blas_thread_init: RLIMIT_NPROC 903725 current, 903725 max

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

OpenBLAS blas_thread_init: RLIMIT_NPROC 903725 current, 903725 max

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

OpenBLAS blas_thread_init: RLIMIT_NPROC 903725 current, 903725 max

OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable

Do you know how I can fix it?

I checked online and some people already had that problem, which is related to Python. That sounds weird to me: if it's a Python problem, why does it show up in R?

Thanks

like image 456
DavideChicco.it Avatar asked Oct 16 '22 07:10

DavideChicco.it


1 Answers

A colleague of mine (outside StackOverflow) helped me and found the solution.

I needed to insert this command in my R script:

Sys.setenv(OPENBLAS_NUM_THREADS="1")

That was it.

like image 128
DavideChicco.it Avatar answered Oct 21 '22 06:10

DavideChicco.it