Skip to content

HELP WANTED: availableWorkers() #16

@HenrikBengtsson

Description

@HenrikBengtsson

Background

When submitting a job to the TORQUE / PBS using something like:

qsub -l nodes=3:ppn=2 myjob.sh

the scheduler will allocate 3 nodes with 2 cores each (= 6 cores total) for myjob.sh when launched. Exactly which 3 nodes is only known to myjob.sh at run time. This information is available in a file $PBS_NODEFILE written by TORQUE / PBS, e.g.

$ cat $PBS_NODEFILE
n1
n1
n8
n8
n9
n9

Other HPC job schedulers use other files / environment variables for this.

Actions

Add an availableNodes() file that searches for common environment variables and returns a vector of node names, e.g.

> availableNodes()`
[1] "n1" "n1" "n8" "n8" "n9" "n9"

If no known environment variables are found, the default fallback could be to return rep("localhost", times = availableCores().

The above would allow us to make workers = availableNodes() the new default for cluster futures (currently workers = availableCores()).

Identify these settings for the following schedulers:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions