andrewhooker / PopED

Population Experimental Design (PopED) in R
https://andrewhooker.github.io/PopED/
GNU Lesser General Public License v3.0
31 stars 21 forks source link

Where is the optimization parallelized #48

Closed mattfidler closed 4 years ago

mattfidler commented 4 years ago

Hi Andy,

I couldn't figure out where the optimization was parallelized. Some of the setup time with RxODE allows threaded parallelization which I was hoping to tap into.

Can you point me in the right direction here?

Matt

andrewhooker commented 4 years ago

Hi Matt,

I am using the package parallel (thinking of switching to future and furrr). Then in each optimization algorithm I call start_parallel and then parallel::mclapply or parallel::parLapply depending on the type of parallelization (and parallel is switched on). Currently I think the logic goes like: poped_optim -> poped_optim_3 and in there there are calls to optim_ARS, GA::ga and optim_LS, which all handle parallelization.

Best regards, Andy

mattfidler commented 4 years ago

Parallelization in RxODE is through OpenMP which doesn't apply to any of these. That is why I was asking.

mattfidler commented 4 years ago

I'm afraid I don't know enough to try to apply the OpenMP parallelization to PopED, though I think it would be possible. Thanks for you time; Perhaps we could catch up about it later if you think it is worthwhile.