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

Allow to create backends with a single core #71

Open
mihaiconstantin opened this issue Nov 17, 2024 · 2 comments
Open

Allow to create backends with a single core #71

mihaiconstantin opened this issue Nov 17, 2024 · 2 comments
Assignees
Labels
feature New feature or request

Comments

@mihaiconstantin
Copy link
Owner

This is regarding Jonas' request in #53 (comment).

@mihaiconstantin mihaiconstantin self-assigned this Nov 17, 2024
@mihaiconstantin mihaiconstantin added the feature New feature or request label Nov 17, 2024
@github-project-automation github-project-automation bot moved this to Backlog in parabar Nov 17, 2024
@mihaiconstantin mihaiconstantin moved this from Backlog to Todo in parabar Nov 17, 2024
@mihaiconstantin
Copy link
Owner Author

To maintain backwards compatibility, I propose we implement this as a package option, say cores_minimum. Currently, parabar shows a warning if less than two cores are used, so it would be sensible to set cores_minimum = 2 as default.

Then, users can customize this to their needs as follows:

# Adjust the minimum number of backend cores.
set_option("cores_minimum", 1)

# Start a backend.
backend <- start_backend(cores = 1)

# At this point this will not show a warning anymore.

# Dispose the backend.
stop_backed(backend)

Similarly:

# Adjust the minimum number of backend cores.
set_option("cores_minimum", 4)

# Start a backend.
backend <- start_backend(cores = 2)

# This will show a warning and, should they are available, set to `4` cores.

# Dispose the backend.
stop_backed(backend)

Would this address the issue, @jmbh?

@jmbh
Copy link

jmbh commented Nov 22, 2024

Hi Mihia,

Apologies for the slow response!

Thanks, yes, that sounds like a good solution and it would be great if you could include it in the package!

Best wishes,
Jonas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants