I follow the step to compile the MPI, but I meet the error
RuntimeError: the MPI backend is not available; try to recompile the THD package with MPI support at /opt/conda/conda-bld/pytorch_1513368888240/work/torch/lib/THD/process_group/General.cpp:17

When I run the example in your first quesiton.