Hello INLA team and community,
We’ve been trying to run an INLA model with SPDE on a university-managed HPC cluster. Over the past two weeks, we’ve exhausted nearly all documented installation options for INLA + fmesher in both Conda and containerized environments, but still face critical errors. Below is a detailed description of all methods we’ve tried and the corresponding errors.
What We've Tried
Conda + R 4.4.2 + INLA (24.05.10)
Installed R 4.4 through Conda. However, install.packages("INLA") now pulls version 25+, which requires fmesher. Since fmesher is not available for R 4.4, the installation fails.
Conda + R 4.5.0 + INLA (25.06)
Tried using the r-ver=4.5.0 image in Conda and installing INLA and fmesher. INLA installs, but fmesher installation fails due to missing system-level library libudunits2.so.0.
Singularity + rocker/r-ver:4.5.0 image
This was our most promising attempt. INLA installs and runs successfully for simple models. However, fmesher again fails to install due to the same libudunits2.so.0 error during compilation.
Installing fmesher from GitHub using pak::pkg_install("inlabru-org/fmesher@stable")
This fails at the compilation stage with the same libudunits2.so.0 issue.
Basic model test with INLA (without mesh)
Successfully ran a simple INLA model using y ~ x, which confirms that INLA itself works in the R 4.5.0 + Singularity setup.
Running the full script (INLA_model_script.R)
The script loads all packages and data correctly, but crashes silently or freezes right after launching inla(). The last message is either “INLA running” or “*** inla.core.safe: The inla program failed…”
Manually installed all required R packages (here, haven, readr, posterior, etc.)
All packages were installed successfully, except fmesher which consistently fails.
Slurm interactive job session (srun --account=...)
Successfully accessed compute node via srun, and tried rerunning the INLA script in that environment. Results were the same: INLA loads, but script halts during model fitting.
Verified file path and project root
Confirmed that INLA_model_script.R and all required data exist, and that here() correctly resolves the working directory.
Tried older and newer versions of INLA
Installed both 24.x and 25.x releases via direct tarball. But older INLA versions now also depend on fmesher, so they fail in the same way.
Error Messages Encountered
package ‘fmesher’ is not available for this version of R
libudunits2.so.0: cannot open shared object file
The inla program failed, but will rerun in case better initial values may help.
The inla-program exited with an error. Unless you interrupted it yourself...
Fatal error: cannot open file INLA_model_script.R
Script hangs indefinitely after printing "INLA running"
Error: there is no package called 'rprojroot' (solved after manual install)
Current Setup Summary
Cluster OS: Linux (university HPC, shared)
Scheduler: Slurm (interactive session tested)
R versions: 4.4.2 (Conda), 4.5.0 (Conda and Singularity)
Container: rocker/r-ver:4.5.0 via Singularity
Tested script: INLA_model_script.R (SPDE + covariates on U.S. mortality data)
Goal: Fit a spatial INLA model using mesh and census covariates
Questions
Is there any way to use fmesher on an HPC without sudo access or without libudunits2.so.0 installed system-wide?
Has anyone successfully run INLA + SPDE in a shared cluster environment?
Is it possible to use older versions of INLA that do not require fmesher?
Does a precompiled container with INLA + fmesher exist for public use?
Any help, working setup examples, or suggested direction would be deeply appreciated!
Thanks so much!
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/232d177dc3d461d7904416cb5e2ef246b3c5fcfa.camel%40r-inla.org.
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/78948aa8-5340-4ad0-b810-907808e361f5n%40googlegroups.com.