Dear all, I am currently fitting a complex model with glmmTMB that involves random effects and covariance structures (spatiotemporal autocorrelation). I would like to try the experimental parallel optimization feature <https://cran.r-project.org/web/packages/glmmTMB/vignettes/parallel.html> to reduce computation time. To do this I've setup a virtual machine running Ubuntu 20.04 on 16+ cores. However, I found no information in how to setup OpenMP, R and glmmTMB. Is there a step by step guide that I can follow? The Vignette states the following: "If your OS supports OpenMP parallelization and R was installed using OpenMP, glmmTMB will automatically pick up the OpenMP flags from R's Makevars and compile the C++ model with OpenMP support." I was not able to find any information on how to install R using OpenMP. Best, Xaver
glmmTMB, OpenMP and Ubuntu
3 messages · meg@-x m@iii@g oii gmx@@et, J. Marius RAKOTONDRAMANGA, Ben Bolker
Dear Xaver, Have a look on these two links, they may help you to install and configure "openmpi-bin" on Ubuntu and "Rmpi" R packages: 1- https://zoomadmin.com/HowToInstall/UbuntuPackage/openmpi-bin 2- http://webhome.auburn.edu/~zengpen/tutorials/openMPI_with_R.pdf Best regards, --------- J. Marius RAKOTONDRAMANGA, MSc PhD Student in Biostatistics/Biomathematics Sorbonne Universit? (ex. UPMC) Le lun. 7 sept. 2020 ? 12:56, <mega-x at gmx.net> a ?crit :
Dear all, I am currently fitting a complex model with glmmTMB that involves random effects and covariance structures (spatiotemporal autocorrelation). I would like to try the experimental parallel optimization feature <https://cran.r-project.org/web/packages/glmmTMB/vignettes/parallel.html> to reduce computation time. To do this I've setup a virtual machine running Ubuntu 20.04 on 16+ cores. However, I found no information in how to setup OpenMP, R and glmmTMB. Is there a step by step guide that I can follow? The Vignette states the following: "If your OS supports OpenMP parallelization and R was installed using OpenMP, glmmTMB will automatically pick up the OpenMP flags from R's Makevars and compile the C++ model with OpenMP support." I was not able to find any information on how to install R using OpenMP. Best, Xaver [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Try running TMB::openmp() . If you already have R installed with
OpenMP support, that should tell you how many cores OpenMP is configured
to run with.
In general R automatically gets built with OpenMP support if a given
OS/compiler combination supports it; I don't know much about how to
troubleshoot that if it *doesn't* happen automatically, but there seems
to be a little information here
https://cran.r-project.org/web/packages/ProFit/vignettes/ProFit-OpenCL-OpenMP.html
After it's installed, you could try running some fairly big models
with glmmTMB(..., control=glmmTMBControl(parallel=xx)) where xx is
either 1 or >1 (NULL, the default, automatically sets the max number of
OpenMP threads to the number of available cores on my machine). Use
system.time() to check the elapsed time (if you want to be more
systematic and your examples are fast enough to run several times, you
can use one of the available R benchmarking package). I would also
suggest using 'top' or some system monitoring GUI to check the CPU load
while your job is running ... the expectation is that the CPU % listed
for your R process will reflect the number of OpenMP threads being used.
If you encounter anything particularly interesting you could report
it at https://github.com/glmmTMB/glmmTMB/issues/620 ...
On 9/7/20 5:56 AM, mega-x at gmx.net wrote:
Dear all, I am currently fitting a complex model with glmmTMB that involves random effects and covariance structures (spatiotemporal autocorrelation). I would like to try the experimental parallel optimization feature <https://cran.r-project.org/web/packages/glmmTMB/vignettes/parallel.html> to reduce computation time. To do this I've setup a virtual machine running Ubuntu 20.04 on 16+ cores. However, I found no information in how to setup OpenMP, R and glmmTMB. Is there a step by step guide that I can follow? The Vignette states the following: "If your OS supports OpenMP parallelization and R was installed using OpenMP, glmmTMB will automatically pick up the OpenMP flags from R's Makevars and compile the C++ model with OpenMP support." I was not able to find any information on how to install R using OpenMP. Best, Xaver [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models