Skip to content

Add HTCondor support to availableCores() - #145

Open
LeonidasZhak wants to merge 1 commit into
futureverse:developfrom
LeonidasZhak:fix/htcondor-cores-50
Open

LeonidasZhak wants to merge 1 commit into
futureverse:developfrom
LeonidasZhak:fix/htcondor-cores-50

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Summary

Add an HTCondor method to availableCores() and include it in the default lookup sequence.

Thanks to maintainers

Thanks for keeping this request open and for documenting the scheduler behavior expected by availableCores().

Issue or motivation

Fixes #50. HTCondor exposes the provisioned CPU count to jobs, but parallelly did not query it.

Root cause

The scheduler dispatch covered LSF, PBS, PJM, SGE, and Slurm, with no HTCondor lookup method.

Change

The new method reads CpusProvisioned from _CONDOR_JOB_AD, then Cpus from _CONDOR_MACHINE_AD. If neither ClassAd value is available, it uses OMP_NUM_THREADS when BATCH_SYSTEM identifies HTCondor. Documentation and NEWS are updated.

Tests

  • parallelly:::testme("availableCores")
  • R CMD check --as-cran --no-manual — Status: OK

The regression test covers job-ad precedence, machine-ad fallback, the HTCondor environment fallback, and rejection of an unrelated OMP_NUM_THREADS.

Scope

This only adds CPU-count detection to availableCores(). It does not add HTCondor host discovery to availableWorkers() or change existing scheduler methods.

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.

availableCores(): Add support for HTCondor

1 participant