Skip to content

Make sure sbatch receives --comments correctly #118

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

Closed
wants to merge 2 commits into from
Closed

Make sure sbatch receives --comments correctly #118

wants to merge 2 commits into from

Conversation

Zhongzheng99
Copy link

I’ve resolved the issue, and it turns out that the problem was not with the account and partition not being input correctly. The actual issue was with the --comment parameter in the sbatch command. In the original __init__.py file, line 133 was f"--comment {comment_str}". It’s crucial to note that comment_str needs to be enclosed in quotes. If this is not done, it might cause sbatch to misinterpret comment_str, leading to the -A and -p parameters (which specify the account and partition) being incorrectly associated with the --comment parameter. This would result in the following WorkflowError:

SLURM job submission failed. The error message was sbatch: error: invalid account or account/partition combination specified
sbatch: error: Batch job submission failed: Unspecified error

To fix the issue, the line in the init.py file should be modified to ensure that comment_str is properly quoted, like so:
f"--comment=`{comment_str}`"
Note: it’s important to use the=sign to properly assign the value to the --comment option in the sbatch command.

By making this change, sbatch will correctly interpret the --comment parameter and subsequent -A and -p parameters, allowing the job to be submitted without errors.

The final command passed to sbatch would then be correctly formatted, like so:
sbatch --comment=`Y{comment_str}` -A your_account -p your_partition ...

@Zhongzheng99 Zhongzheng99 changed the title Patch 1 Make sure sbatch receives --comments correctly Jul 22, 2024
@Zhongzheng99
Copy link
Author

#117

@Zhongzheng99
Copy link
Author

Ah, this is a mistake because my account is in arrears.

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

Successfully merging this pull request may close these issues.

1 participant