5

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

DavideChicco.it
  • 3,318
  • 13
  • 56
  • 84
  • It's hard to tell you "the commands / edits to my script to avoid this error and execute my software smoothly" without having any of your script. – duckmayr Feb 11 '19 at 17:58
  • @duckmayr You can find my script here: https://github.com/davidechicco/heart-failure-gene-expression-analysis – DavideChicco.it Feb 11 '19 at 20:16
  • Looks like combat is requesting to use the max number of threads on your machine (fine on your laptop but not on a cluster), as I bet you don't have permission to use all threads on your cluster so it's waiting to get permission but youll never get it. I would look to add a line to combat with number of threads (that you are able to access as a user in a session). This solved my problem a few times when I moved code from a simple machine to a cluster. If not, you're gonna have to talk to your Torque cluster admin. – kana Feb 13 '19 at 04:46
  • Hi @csugai , thanks for your comment. That is possible, but I don't know how to control the number of threads in the script. That's the weird aspect: my script is in R, not in Python, and I see no option for OpenBlas(). Can you please check my code and tell me what you would change? https://github.com/davidechicco/heart-failure-gene-expression-analysis/blob/master/retrieve_genes.r The call to ComBat() is at line #433. Thanks! – DavideChicco.it Feb 13 '19 at 14:32

1 Answers1

3

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.

DavideChicco.it
  • 3,318
  • 13
  • 56
  • 84