Skip to content

Testing a C++ case with MPI failed.  #1235

Open
@alamj

Description

@alamj

🐛 Describe the bug

I am testing the following example:

https://github.com/pytorch/examples/blob/main/cpp/distributed/dist-mnist.cpp

I get the following error:

[ 50%] Building CXX object CMakeFiles/awcm.dir/xdist.cxx.o
/home/alamj/TestCases/tests/xtorch/xdist/xdist.cxx:1:10: fatal error: c10d/ProcessGroupMPI.hpp: No such file or directory
1 | #include <c10d/ProcessGroupMPI.hpp>

I changed the top line with full path to ensure that hpp file gets available
#include </project/def-alamj/shared/libtorch/include/torch/csrc/distributed/c10d/ProcessGroupMPI.hpp>

The new error indicates something else I need to know, which is given in the tutorial.

[ 50%] Building CXX object CMakeFiles/awcm.dir/xdist.cxx.o
/home/alamj/TestCases/tests/xtorch/xdist/xdist.cxx:38:21: error: ‘c10d’ was not declared in this scope; did you mean ‘c10’?
38 | std::shared_ptrc10d::ProcessGroupMPI pg,
| ^~~~
| c10

Please let me know how do I get a work around to fix this.

Error logs

No response

Minified repro

No response

Versions

I think this field is not needed as I am running C++ code.

cc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions