Installing Pytorch in Orin (libmpi.so.20 issue)

Installing PyTorch from wheel fails.
Followed instructions in

for both 1.11 and 1.12
Also did:
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev
(1) cannot install torchvision :
python3 setup.py (after export BUILD_VERSION=0.12.0)
OSError: libmpi.so.20: cannot open shared object file: No such file or directory
Below exists in the system:
Command:

sudo find . -name libmpi.so*
Result:
./etc/alternatives/libmpi.so-aarch64-linux-gnu
./usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so
./usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so.40.20.3
./usr/lib/aarch64-linux-gnu/libmpi.so
./usr/lib/aarch64-linux-gnu/libmpi.so.40.20.3
./usr/lib/aarch64-linux-gnu/libmpi.so.40

How do I get libmpi.so.20 ? I cant seem to find it from web search.

Moving this post to Jetson forum

Hi @amaunder, which Jetson and version of JetPack-L4T are you using?

libmpi.so.20 is the version that is from Ubuntu 18.04, and libmpi.so.40 is the version from Ubuntu 20.04

Note that you can also run the l4t-pytorch container if you have trouble installing PyTorch.

I am using Orin . Linux 20.04. I downloaded the torch for 5.0.2 as recommend in the link mentioned for this version. Below are the details of my jetson box. I am using Python 3.8

I think, it does look to me that I am using Torch lib that is older. unfortunately, I would not like to use the container deployment.
Is there a torch wheel that uses libmpi.so.40 ?? Shouldnt 1.11 and 1.12 be created with libmpi.so.40!!! Is there a patch you can suggest?

NVIDIA Jetson AGX Orin
L4T 35.1.0 [ JetPack 5.0.2 ]
Ubuntu 20.04.4 LTS
Kernel Version: 5.10.104-tegra
CUDA 11.4.239
CUDA Architecture: 8.7
OpenCV version: 4.5.4
OpenCV Cuda: NO
CUDNN: 8.4.1.50
TensorRT: 8.4.1.5
Vision Works: NOT_INSTALLED
VPI: 2.1.6
Vulcan: 1.3.203

Yes, they were and those are the wheels that I use on JetPack 5 as well (with libmpi.so.40). You could try making a symbolic link from libmpi.so.40 → libmpi.so.20. Or you can use these newer PyTorch wheels for JetPack 5:

(1)
I get the following error:
ERROR: HTTP error 404 while getting https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11

ERROR: Could not install requirement https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11 because of HTTP error 404 Client Error: Not Found for url: https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11 for URL https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11

(2) Is there a problem with the part of the command in the document:
export “LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH”;

(3) I did put a link . It got stuck in OSError: libcublas.so.10: cannot open shared object file: No such file or directory
I unzipped the wheel and the version file (version.py) inside the zip points to Cuda 10 whereas in Orin we have 11.4.
Can this be a problem that all libraries are messed up?

It would seem that the PyTorch wheel you are using was built for JetPack 4, not JetPack 5. Please double-check the URL that you downloaded.

See this directory for the downloads: https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.