related to #1398
I am trying to get torch working with CUDA on the Rorqual supercomputer (Linux).
I followed the instructions on https://torch.mlverse.org/docs/dev/articles/installation#pre-built and installation works but loading fails.
[thocking@rorqual3 ~]$ TORCH_INSTALL_DEBUG=1 R -e "torch::torch_tensor(pi)"
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Loading required namespace: data.table
> torch::torch_tensor(pi)
Torch libraries are installed but loading them was unsuccessful.
Torch libraries are installed but loading them was unsuccessful.
Error in torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory) :
Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
Calls: <Anonymous> -> <Anonymous> -> <Anonymous> -> torch_tensor_cpp
Execution halted
so I used ldd to look for loading issues.
[thocking@rorqual3 ~]$ ldd R/x86_64-pc-linux-gnu-library/4.5/torch/lib/liblantern.so
linux-vdso.so.1 (0x00007ffcd03e3000)
libc10.so => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libc10.so (0x00007fcb302fd000)
libc10_cuda.so => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libc10_cuda.so (0x00007fcb301a1000)
libtorch_cpu.so => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libtorch_cpu.so (0x00007fcaf39a4000)
libtorch_cuda.so => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libtorch_cuda.so (0x00007fca71ef8000)
libcudart.so.12 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libcudart.so.12 (0x00007fca71c00000)
libtorch.so => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libtorch.so (0x00007fca71ef1000)
libstdc++.so.6 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libstdc++.so.6 (0x00007fca71a1e000)
libm.so.6 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libm.so.6 (0x00007fca718cf000)
libgcc_s.so.1 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libgcc_s.so.1 (0x00007fca71ed6000)
libc.so.6 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libc.so.6 (0x00007fca716dd000)
/cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/lib64/ld-linux-x86-64.so.2 (0x00007fcb316e3000)
libdl.so.2 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libdl.so.2 (0x00007fca71ece000)
libpthread.so.0 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libpthread.so.0 (0x00007fca716ba000)
librt.so.1 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/librt.so.1 (0x00007fca71ec4000)
libgomp-98b21ff3.so.1 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libgomp-98b21ff3.so.1 (0x00007fca71673000)
libcudart-218eec4c.so.12 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libcudart-218eec4c.so.12 (0x00007fca71200000)
libcublas-f6c022dc.so.12 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libcublas-f6c022dc.so.12 (0x00007fca6a000000)
libcublasLt-4ef47ce6.so.12 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libcublasLt-4ef47ce6.so.12 (0x00007fca36200000)
libcudnn.so.9 => /home/thocking/R/x86_64-pc-linux-gnu-library/4.5/torch/lib/libcudnn.so.9 (0x00007fca35e00000)
nothing obvious above, so I followed the links. liblantern links to librt which seems to have an issue,
[thocking@rorqual3 ~]$ ldd R/x86_64-pc-linux-gnu-library/4.5/torch/lib/librt.so.1
R/x86_64-pc-linux-gnu-library/4.5/torch/lib/librt.so.1: /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by R/x86_64-pc-linux-gnu-library/4.5/torch/lib/librt.so.1)
linux-vdso.so.1 (0x00007ffcd118c000)
libpthread.so.0 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libpthread.so.0 (0x00007f4f015c9000)
libc.so.6 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libc.so.6 (0x00007f4f013f4000)
/cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/lib64/ld-linux-x86-64.so.2 (0x00007f4f01607000)
the link to libpthread seems to not work. Any idea how to fix?
Thanks in advance!!
related to #1398
I am trying to get torch working with CUDA on the Rorqual supercomputer (Linux).
I followed the instructions on https://torch.mlverse.org/docs/dev/articles/installation#pre-built and installation works but loading fails.
so I used ldd to look for loading issues.
nothing obvious above, so I followed the links. liblantern links to librt which seems to have an issue,
the link to libpthread seems to not work. Any idea how to fix?
Thanks in advance!!