-
Notifications
You must be signed in to change notification settings - Fork 21
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 with an mrgsolve model on Windows #36
Comments
Hi Vincent,
Thanks for the nice work! I’d be happy to get a pull request from you.
Best regards,
Andrew
Andrew Hooker, Ph.D.
Associate Professor of Pharmacometrics
Dept. of Pharmaceutical Biosciences
Uppsala University
Box 591, 751 24, Uppsala, Sweden
Phone: +46 18 471 4355
Mobile: +46 768 000 725
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
…On 20 Jun 2019, 19:27 +0200, Vincent ARANZANA-CLIMENT ***@***.***>, wrote:
Hello,
Thank you for this great tool ! I was trying to optimize some dosing regimens using an mrgsolve model as input for PopED. My OS is Windows 10. It worked fine while mono-threading but when paralellizing i did get this annoying error message :
There was a problem accessing the model shared object.
Either the model object is corrupted or
the model was not properly compiled and/or loaded.
Check mrgsolve:::funset(mod) for more information.
After some research I stumbled upon this issue in the mrgsolve github (metrumresearchgroup/mrgsolve#471) where the authors suggested to use the loadso() command to load the model. After trying multiple different places to put this commnad (in the ff.model function for example, makes R crash on my computer), I finally found that by editing the start_parallel script adding these few lines made the parallelization work like a charm :
# load mrgsolve models in workers using loadso
if (!is.null(mrgsolve_model)) {
parallel::clusterCall(cl, loadso, x=mrgsolve_model)
}
I forked the repository (https://github.com/Vincent-AC/PopED) and added this to the package, would you be interested in a pull request ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You are welcome, the pull request is up ! Vincent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thank you for this great tool ! I was trying to optimize some dosing regimens using an mrgsolve model as input for PopED. My OS is Windows 10. It worked fine while mono-threading but when paralellizing i did get this annoying error message :
After some research I stumbled upon this issue in the mrgsolve github (metrumresearchgroup/mrgsolve#471) where the authors suggested to use the
loadso()
command to load the model. After trying multiple different places to put this commnad (in the ff.model function for example, makes R crash on my computer), I finally found that by editing the start_parallel script adding these few lines made the parallelization work like a charm :I forked the repository (https://github.com/Vincent-AC/PopED) and added this to the package, would you be interested in a pull request ?
The text was updated successfully, but these errors were encountered: