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

Fix PBSPRO queue status fetch #5529

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HDash
Copy link

@HDash HDash commented Nov 21, 2024

Closes #5528

A simple conditional if statement to check if the output is empty fixes the issue.

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 0471dff
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/673f133437a460000820fa6d

@bentsherman
Copy link
Member

I have a sneaking suspicion that this worked on whatever PBSPro cluster it was tested on, and maybe the status text changed across different versions. It would be good to have some clear documentation on how the status text is supposed to look, so that we can test against it, like here:

def 'should parse queue status'() {
setup:
def executor = [:] as PbsProExecutor
def text =
"""
Job Id: 12.localhost
job_state = F
Job Id: 13.localhost
job_state = R
Job Id: 14.localhost
job_state = Q
Job Id: 15.localhost
job_state = S
Job Id: 16.localhost
job_state = E
Job Id: 17.localhost
job_state = H
""".stripIndent().trim()

At the same time, I'm pretty sure the PBSPro executor was added at my request, to support my university cluster 😅 And I do remember seeing these "failed to fetch queue status" warnings but I never figured out why they were happening

@HDash
Copy link
Author

HDash commented Nov 21, 2024

Hello @bentsherman,

You are correct—I’ve been encountering this issue on Imperial’s cluster. It seems that qstat -B returns a phantom empty server string, which causes an error when passed to qstat -f. I have detailed the output in the mentioned issue.

The job state parsing portion of the code, however, appears to work perfectly and functions as intended. The failure lies in fetching the job state strings.

With my fork, qstat -f $( qstat -B | grep -E -v '(^Server|^---)' | awk -v ORS=' ' '{if ($1 != "") print "@"$1}' ) | { grep -E '(Job Id:|job_state =)' || true; } outputs:

Job Id: 297959.pbs
    job_state = Q

Which is exactly what we want. My queued job is labelled appropriately.

For current version, qstat -f $( qstat -B | grep -E -v '(^Server|^---)' | awk -v ORS=' ' '{print "@"$1}' ) | { grep -E '(Job Id:|job_state =)' || true; } outputs:

qstat: illegally formed destination: @

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

Successfully merging this pull request may close these issues.

Cannot fetch PBSPRO queue status
2 participants