Skip to content

Suggest parallelly::availableCores() in mc.cores docs - #218

Open
ms609-agent wants to merge 1 commit into
mainfrom
docs/availablecores-examples
Open

ms609-agent wants to merge 1 commit into
mainfrom
docs/availablecores-examples

Conversation

@ms609-agent

Copy link
Copy Markdown
Collaborator

Prose code blocks that suggest options(mc.cores = parallel::detectCores()) now suggest parallelly::availableCores() instead. detectCores() reports the hardware count. availableCores() respects Slurm/PBS/cgroup allocations, R CMD check's core limit and MC_CORES, so "use all cores" doesn't oversubscribe a shared machine or HPC job.

These are documentation snippets, not run examples, so no Suggests entry is needed. The single-threaded default (getOption("mc.cores", 1L)) is unchanged. R sources and Rd were edited in step: one line per snippet, plus realigning the neighbouring comment.

🤖 Generated with Claude Code

parallel::detectCores() reports the hardware count; availableCores()
respects scheduler and cgroup allocations, R CMD check's core limit and
MC_CORES, so "use all cores" no longer oversubscribes a shared machine
or HPC job. Prose snippets only; no new dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ms609-agent
ms609-agent requested a review from ms609 October 16, 2026 12:05
@github-actions

Copy link
Copy Markdown

Performance benchmark results

Call Status Change Time (ms)
ClusteringInfoDistance(tr280) ⚪ NSD 0.29% 9.38, 9.45 →
9.37, 9.4
ClusteringInfoDistance(tr50) ⚪ NSD -0.79% 6.75, 6.74 →
6.72, 6.84
LAPJV(test2000) ⚪ NSD 0.84% 96.5, 96.5 →
95.4, 96.4
LAPJV(test40) ⚪ NSD 1.63% 0.0184, 0.0185 →
0.0182, 0.018
LAPJV(test400) ⚪ NSD 0.99% 3.26, 3.29 →
3.25, 3.25
MutualClusteringInfo(tr280) ⚪ NSD 2.63% 19.4, 19 →
19.1, 18.1
MutualClusteringInfo(tr50) ⚪ NSD 2.23% 18.4, 18.2 →
18.1, 17.7
NNIMaxStep(2000, normalize = TRUE) ⚪ NSD 0.06% 0.215, 0.214 →
0.215, 0.215
NNIMaxStep(300, normalize = TRUE) ⚪ NSD 0.19% 0.0317, 0.0317 →
0.0317, 0.0317
NNIMaxStep(300) ⚪ NSD 0.89% 0.009, 0.00901 →
0.00891, 0.00896
PathDist(postTrees) ⚪ NSD -0.13% 2.38, 2.4 →
2.38, 2.4
PhylogeneticInfoDistance(tr180) ⚪ NSD 0.08% 58.3, 58.9 →
58.4, 59.3
PhylogeneticInfoDistance(tr50) ⚪ NSD -0.41% 43.8, 44 →
44, 44.2
RobinsonFoulds(tr280) ⚪ NSD -0.33% 4.77, 4.76 →
4.75, 4.81
RobinsonFoulds(tr280) ⚪ NSD -0.7% 4.58, 4.59 →
4.58, 4.65
RobinsonFoulds(tr50) ⚪ NSD -1.03% 4.56, 4.55 →
4.56, 4.62

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.57%. Comparing base (5c9e9eb) to head (68eca2d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files          60       60           
  Lines        6065     6065           
=======================================
  Hits         5918     5918           
  Misses        147      147           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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