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

Cgroups v1 error when calling plan(multisession, workers = availableCores()) #118

Open
bshor opened this issue Nov 22, 2024 · 3 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@bshor
Copy link

bshor commented Nov 22, 2024

Describe the bug

I am trying to set up parallel processing in my R code. I get an inexplicable error. I am running R 4.4.2 inside Ubuntu and Fedora containers running on Aurora 41, a "spin" of Fedora Kinoite 41, which is an immutable version of Linux. R and RStudio work perfectly.

Reproduce example

These two lines of code generate the error.

library(future)
plan(multisession, workers = availableCores())

And the error I get is:

Error in getCGroupsRoot(controller = controller, pid = pid) : 
  Failed to identify mount point for CGroups v1 controller ‘cpuset’

Expected behavior

No error

Session information

Please share your session information after the error has occurred so that we also see which packages and versions are involved;

> sessionInfo()
…
> future::futureSessionInfo()
…

Warning: Your system is mis-configured:/etc/localtimeis not a symlink
Warning: It is strongly recommended to set envionment variable TZ toAmerica/Chicago’ (or equivalent)
R version 4.4.2 (2024-10-31)
Platform: x86_64-redhat-linux-gnu
Running under: Fedora Linux 40 (Container Image)

Matrix products: default
BLAS/LAPACK: FlexiBLAS OPENBLAS-OPENMP;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Chicago
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] future_1.34.0

loaded via a namespace (and not attached):
 [1] compiler_4.4.2    parallelly_1.39.0 parallel_4.4.2    tools_4.4.2       rstudioapi_0.17.1
 [6] listenv_0.9.1     codetools_0.2-20  digest_0.6.37     globals_0.16.3    CoprManager_0.5.7

*** Package versions
future 1.34.0, parallelly 1.39.0, parallel 4.4.2, globals 0.16.3, listenv 0.9.1

*** Allocations
availableCores():
Error in getCGroupsRoot(controller = controller, pid = pid) : 
  Failed to identify mount point for CGroups v1 controllercpuset
@bshor bshor added the bug Something isn't working label Nov 22, 2024
@HenrikBengtsson
Copy link
Collaborator

Thanks for reporting.

I rewrote the CGroups look-up mechanism in parallelly 1.39.0 (2024-11-07). I did this because I realized the original code was winging it a bit, so I tried to follow the official docs as much as I could understand it. It could be that I broke something.

As a first test, could you please try with the previous version - parallelly 1.38.0 - by installing it from source:

install.packages("https://cran.r-project.org/src/contrib/Archive/parallelly/parallelly_1.38.0.tar.gz")

Then, after restarting R, call:

parallelly::availableCores(which = "all")

Please let me know if this works around the problem. Also, please let me know what you get.

PS. I'll transfer this issue over to the parallelly issue tracker, because that's where the problem lies. Also, another user reported on another CGroups problem, which is probably unrelated to yours.

@HenrikBengtsson HenrikBengtsson transferred this issue from futureverse/future Nov 22, 2024
@HenrikBengtsson HenrikBengtsson added this to the Next release milestone Nov 22, 2024
@bshor
Copy link
Author

bshor commented Nov 22, 2024

Thank you! I'll give this a shot ASAP.

As a bit of backround, this is running in a Distrobox container.

@HenrikBengtsson
Copy link
Collaborator

I've improved the code quite a bit. Can you please re-try with the develop version;

remotes::install_github("futureverse/parallelly", ref="develop")

Then retry with:

parallelly::availableCores(which = "all")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants