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

console being held on call to sge #24

Closed
yonicd opened this issue Jun 29, 2018 · 5 comments
Closed

console being held on call to sge #24

yonicd opened this issue Jun 29, 2018 · 5 comments

Comments

@yonicd
Copy link

yonicd commented Jun 29, 2018

is there a way to free the console when sending a job to a grid (like sge)? this would seem like a natural thing to do since the master isnt actually working.

thanks

@DavisVaughan
Copy link
Owner

So you want to just use furrr as a way to send off jobs to the grid, get the future objects back immediately, and then manually call values() on that yourself when you are ready to try and collect from the grid? I could see that being useful.

I think it would just require an extra wait argument in future_options() and then a change to this line that does or does not try and resolve based on the value of wait. https://github.com/DavisVaughan/furrr/blob/master/R/future_map_template.R#L188

@yonicd
Copy link
Author

yonicd commented Jul 14, 2018

I think it can be controlled in the tweak you define internally, can that be made into a functional expr for user to pass in?

@DavisVaughan
Copy link
Owner

What do you mean? What else would it do?

@yonicd
Copy link
Author

yonicd commented Jul 14, 2018

i use this (from henrik's suggestion), i use sge in this case

my_sge <- future::tweak(future.batchtools::batchtools_sge, template = PATH_TO_TMPL)

future::plan(list(multiprocess, my_sge))

then i run

Y1 %<-% future_lapply(rep(300, 20),
                      FUN = function(nr){
                        solve( matrix(rnorm(nr^2), nrow=nr, ncol=nr))
                        },
                      future.scheduling = 5)

and the grid is governed by another thread and frees the console to continue working

i think you can wrap that around a functional and have furrr eval internally to what the user gives you... having a default in place in case they don't.

@DavisVaughan
Copy link
Owner

I think I'm going to keep furrr as is for now. I would use future() directly if you need more control over the lazy resolution of values

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

No branches or pull requests

2 participants