Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssGSEA2 error in HPC environments when available cores is not equal to total number of cores. #32

Open
cwlkr opened this issue Jun 13, 2024 · 0 comments

Comments

@cwlkr
Copy link

cwlkr commented Jun 13, 2024

Hi,

I am using ssGSEA2 on a larger data set and therefore I am running it on a HPC-cluster with job scheduler (Slurm).

Issue

ssGSEA2 will crash with Error in socketAccept(socket = socket, blocking = TRUE, open = "a+b", : all connections are in use when the allocated number of cores with Slurm is smaller than the total available cores of the hardware.

This is because parallel::detectCores() does not respect the allocation of Slurm and returns the total number of cores available on the CPU.

In my opinion the expected functionality of using par=TRUE in ssGSEA2 would imply detecting the available number cores, as is the behavior of parallelly::availableCores()as opposed to parallel::detectCores().

Workaround

set spares to:

n_cores = 64  # number of cores, same as in  --cpus-per-task
spares = 2 # number of spares 
spares = (parallel::detectCores()-n_cores)+spares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant