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

Parallelization issue when using doFuture on Linux systems #153

Closed
mmeierer opened this issue Jan 10, 2021 · 1 comment
Closed

Parallelization issue when using doFuture on Linux systems #153

mmeierer opened this issue Jan 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mmeierer
Copy link
Collaborator

Test runs did show that parallelization stopped working properly on Linux systems. Using doParallel still works.

Here is a code chunk to replicate the issue:

start_time <- Sys.time()

library("CLVTools")
library("data.table")
library("doFuture")
library("doParallel")


#ohne die folgenden beiden Zeilen laeuft es schneller!
registerDoFuture()
plan(multisession) #sollte Multithreading aktivieren, funktioniert aber nicht richtig.


data("apparelTrans")

clv.apparel <- clvdata(apparelTrans,  
                       date.format="ymd", 
                       time.unit = "week",
                       estimation.split = 40,
                       name.id = "Id",
                       name.date = "Date",
                       name.price = "Price")

data("apparelDynCov")



clv.dyn <- SetDynamicCovariates(clv.data = clv.apparel, 
                                data.cov.life = apparelDynCov,
                                data.cov.trans = apparelDynCov, 
                                names.cov.life = c("Marketing", "Gender", "Channel"), 
                                names.cov.trans = c("Marketing", "Gender", "Channel"), 
                                name.id = "Id",
                                name.date = "Cov.Date")

est.pnbd.dyn <- pnbd(clv.dyn, 
                     start.params.model = c(r=1, alpha = 2, s = 1, beta = 2),
                     start.params.life = c(Marketing=0.5, Gender=0.6, Channel=0.4),
                     start.params.trans = c(Marketing=0.5, Gender=0.6, Channel=0.4),
                     optimx.args = list(control=list(trace=6)))

summary(est.pnbd.dyn)

end_time <- Sys.time()
end_time - start_time

To check the core usage use e.g. htop.

Check if related to the following doFuture issue: GitHub Link

@mmeierer mmeierer added the bug Something isn't working label Jan 10, 2021
@pschil
Copy link
Collaborator

pschil commented Mar 1, 2021

Support for parallelization was removed in PR #158 by using Rcpp for the F2.3 part in the LL of the extended pnbd

@pschil pschil closed this as completed Mar 1, 2021
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