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

Number of cores in ssgsea-cli.R is hardcoded but should be set using command line arguments #33

Open
sstein93 opened this issue Jul 15, 2024 · 0 comments

Comments

@sstein93
Copy link

The number of cores in ssgsea-cli.R is hard coded, and should be set using an input command line argument instead.

Currently, parallel processing is set to use all available cores, i.e.:

## in ssgsea-cli.R
# hard-coded parameters
spare.cores <- 0 # use all available cpus

## then in ssGSEA.2.0.R
## register cores
cl <- parallel::makeCluster(detectCores() - spare.cores)
doParallel::registerDoParallel(cl)

This is problematic when using a job scheduler in an HPC environment, since detectCores() returns the number of CPU cores on the current machine regardless of how many cores the job has been allotted by the scheduler.

Is it possible to add a command line argument --cores (or some other name) to specify the number of cores one wants to use, and then in ssGSEA.2.0.R use cl <- parallel::makeCluster(cores)?

Thanks!

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