Build from source with MVAPICH

I want to build pytorch from source with MVAPICH, and I am sure the MVAPICH is installed correctly. I meet the problem when I run the test script,

       `RuntimeError: the MPI backend is not available; try to recompile the THD package with MPI support at /home/*/Downloads/pytorch/torch/lib/THD/process_group/General.cpp:17`RuntimeError: the MPI backend is not available; try to recompile the THD package with MPI support at /home/*/Downloads/pytorch/torch/lib/THD/process_group/General.cpp:17

test script

   import torch.distributed as dist
   dist.init_process_group(init_method='env://', backend='mpi')

I follow the setting in this pages https://discuss.pytorch.org/t/segfault-using-cuda-with-openmpi/11140, which I can build pytorch with openmpi correctly. However, I cannot use MVAPICH as backend.

Any help will be appreciated! Thank you!

1 Like

I also met this problem, so could any give me some help? Thank you very much!