Skip to content

Conversation

@Sbozzolo
Copy link

I'd like to try benchpark on a system with OpenPBS, but benchpark did not support such scheduler. This PR adds compatibility with it (to the best of my understanding of benchpark).

@github-actions github-actions bot added the feature New feature or request label Dec 10, 2025
Comment on lines +477 to +478
expected_ranks = v.n_nodes * v.n_ranks_per_node
if v.n_ranks != expected_ranks:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might get a complaint given that you are

        if not v.n_ranks_per_node and v.n_ranks and v.n_nodes:
            v.n_ranks_per_node = math.ceil(v.n_ranks / v.n_nodes)


# Calculate n_ranks_per_node if not explicitly set
if not v.n_ranks_per_node and v.n_ranks and v.n_nodes:
v.n_ranks_per_node = math.ceil(v.n_ranks / v.n_nodes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If pbs always requires setting n_ranks_per_node (or in particular when n_ranks and n_nodes are set) I think that might best be done in pbs_instructions (based on reading it I assume it is not required, and in that case as well I think it might be best to skip this): this function implicitly ensures that either n_nodes or n_ranks is set by the end of it, and scheduler option functions tend to work with that; if this also sets n_ranks_per_node itself, it could over-specify (e.g. the potential mismatch from calling ceil).

Perhaps if n_nodes is set but not n_ranks/n_ranks_per_node then I should be setting n_ranks_per_node = sys_cores_per_node in this function. I assumed schedulers were doing that automatically; nearly all experiments in benchpark set n_ranks.

node_spec += f":ppn={v.n_ranks_per_node}"

if v.n_gpus and v.sys_gpus_per_node:
if v.n_gpus > v.n_nodes * v.sys_gpus_per_node:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a check I should have added to determine_allocation - would you mind moving this there?

@Sbozzolo
Copy link
Author

Sbozzolo commented Dec 18, 2025

Sorry for the slow turnaround time. I wanted to implement the review comments and verify that the updated PR works as expected, but I haven't had time for that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants