Skip to content

New nvimcom option: max_cpu_cores#594

Merged
PMassicotte merged 3 commits into
mainfrom
max_cpu_cores
Jun 17, 2026
Merged

New nvimcom option: max_cpu_cores#594
PMassicotte merged 3 commits into
mainfrom
max_cpu_cores

Conversation

@jalvesaq

Copy link
Copy Markdown
Member

Close #593

@PMassicotte

Copy link
Copy Markdown
Collaborator

Good job. Should we also give an example about using SLURM requested CPUs?

options(nvimcom.max_cpu_cores = as.integer(Sys.getenv("SLURM_CPUS_PER_TASK"))

@jalvesaq

Copy link
Copy Markdown
Member Author

Should we also give an example about using SLURM requested CPUs?

Yes, if the variable will always be set for Slurm users in the normal way of using Slurm (which, according to Gemini, isn't through SSH). I have zero experience with HPC Clusters.

@PMassicotte

Copy link
Copy Markdown
Collaborator

I will add something.

@PMassicotte

Copy link
Copy Markdown
Collaborator

I think this is good to merge. Ok with you?

@jalvesaq

Copy link
Copy Markdown
Member Author

It's OK for me. Should we wait a while for @daler's comments?

@PMassicotte

Copy link
Copy Markdown
Collaborator

It's OK for me. Should we wait a while for @daler's comments?

I think so!

Comment thread doc/R.nvim.txt

@daler daler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, and works great -- thanks for such quick turnaround.

I made some adjustments to the docs to make it a little more general while still keeping the concrete Slurm-specific example, and slightly tweaked the example to have a max of 2 in case the env var is unavailable, like if you don't use --cpus-per-task.

@jalvesaq

Copy link
Copy Markdown
Member Author

Thank you, @daler! Let's wait for @PMassicotte final review.

Co-authored-by: Ryan Dale <115406+daler@users.noreply.github.com>
@PMassicotte

Copy link
Copy Markdown
Collaborator

LGTM! Merging, thank you all for your contributions.

@PMassicotte PMassicotte merged commit aa37fb6 into main Jun 17, 2026
13 checks passed
@PMassicotte PMassicotte deleted the max_cpu_cores branch June 17, 2026 11:09
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.

Update detection of CPU count

3 participants