Skip to content

Commit 847bb9e

Browse files
committed
add R module set R libs ilocation docs
1 parent 7cf839b commit 847bb9e

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

config/templates/hpc.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ nav:
5959
- OpenFOAM: openFOAM.md
6060
- Python: python.md
6161
- Python virtual environments: setting_up_python_virtual_environments.md
62+
- R Libraries: rlibs.md
6263
- Transcribe: transcribe.md
6364
- VS Code Tunnel: vscodetunnel.md
6465
- FAQ:

mkdocs/docs/HPC/rlibs.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# R libraries
2+
3+
Please keep in mind, that this is not a genral manual
4+
abut installing `R` libraries, but only system specific information about self
5+
installed R libraries at {{ hpcinfra }}.
6+
7+
Our infrastructure contains different CPU arcitectures, that are
8+
not neccesarily compatible with each other. Additionally, we have
9+
multiple versions of `R` installed with different versions of toolchains, and by default,
10+
self installed libraries are installed in separate directories based only
11+
on R major and minor versions.
12+
13+
In this way, you might use self installed R libraries on incopatible architectures and/or
14+
compiled with incompatible toolchains, which might lead to hangs or other types of errors.
15+
16+
When you load a centrally installed `R` module we make sure that self installed libraries
17+
will be installed to an operational system, arhictecture, toolchain, and `R` version
18+
dependent directory. The loaction of this directory by default is
19+
(by setting `R_LIBS_USER` environmental variable to)
20+
`$VSC_DATA/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`.
21+
22+
If you would like to have another location (for example you are using a central location
23+
in your VO), you should set the environmental variable `R_LIBS_BASEDIR` to the desired location
24+
*before* you load any centrally installed `R` module. In this case, the location of the
25+
directory for self installed `R` libraries will be
26+
`$R_LIBS_BASEDIR/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`.
27+
If this directory is not writtable, you can still be able to use already installed
28+
`R` libararies from that location, but you will not be able to install `R` libarires
29+
yourself.
30+
31+
You can always check the default location(s) of `R` libraries by issuing `.libPaths()` command
32+
in `R`. This command will show the library locations ordered by their priorites.
33+
34+
Please be aware that if you have installed an `R` libaries yourself in the past, you might have to
35+
reinstall those if you want to use them:
36+
- on a different cluster
37+
- with a different version of `R`
38+
- with an `R` compiled with a different version of toolchain
39+
- if the operational system is changed/updated.
40+

0 commit comments

Comments
 (0)