Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Rstudio is a very useful interface of R, our support team received many requests from users to install it on cluster. Unfortunately, the bug inside the current desktop version and our user policy stop us from installing it. The newest version of Rstudio has a bug regarding to the linking errors to QtWebkit library which has not been solved by Rstudio team yet. If you are interested in investigating such error and have suggestion for us, it is described in this page: https://bugreports.qt.io/browse/QTBUG-34302 . And also Rstudio requires gstreamer for the interface. However, our cluster only has gstreamer on our login node. According to our policy, running interface on our login node is not allowed.

...

Code Block
languager
module load gdal/3.6.1 r/4.2.2

source /gpfs/sharedfs1/admin/hpc2.0/apps/gdal/3.6.1/spack/share/spack/setup-env.sh

spack load gdal

R-INLA R package

The R-INLA R package also depends on GDAL.

The R-INLA package can be install locally under a user’s account with the following steps:

#1

If a conda base environment activated, the environment would need to deactivated to install R-INLA without conflicting with conda:

Code Block
(base) [netidhere@node ~]$ conda deactivate

#2

perform the following:

Code Block
[netidhere@node ~]$ module load gsl/2.7 udunits freetype/2.12.1 gdal/3.7.3 r/4.3.2
[netidhere@node ~]$ source /gpfs/sharedfs1/admin/hpc2.0/apps/gdal/3.7.3/spack/share/spack/setup-env.sh
[netidhere@node ~]$ spack load gdal

#3

After gdal is loaded through spack, R can be called to install a local version of INLA:

Code Block
[netidhere@node ~]$ R

> .libPaths("~/rlibs")
> library(devtools)
> remotes::install_version("INLA", lib = "~/rlibs", version="24.02.09",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)

R-INLA needs the remotes command from devtools to be able to install successfully as R-INLA is not in the CRAN repostitory.

A specific version of R-INLA can be installed, in the above example the stable 24.02.09 version of INLA will be installed and the library will install under a local library directory called ~/rlibs.

When R prompts to updated existing packages when installing R-INLA, say option 3 to not update packages.

The install should be successful once the install finishes.

Once INLA gets installed, conda can be reactivated and INLA should load and run successfully in R

#4

Code Block
> library(INLA)
Loading required package: Matrix
Loading required package: sp
This is INLA_24.02.09 built 2024-02-09 03:35:28 UTC.
 - See www.r-inla.org/contact-us for how to get help.
 - List available models/likelihoods/etc with inla.list.models()
 - Use inla.doc(<NAME>) to access documentation
>