Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'horovod.torch' has no attribute 'init' #4009

Open
Cow-Kite opened this issue Dec 13, 2023 · 0 comments
Open

AttributeError: module 'horovod.torch' has no attribute 'init' #4009

Cow-Kite opened this issue Dec 13, 2023 · 0 comments
Labels

Comments

@Cow-Kite
Copy link

Cow-Kite commented Dec 13, 2023

Environment:

  1. Framework: (TensorFlow, Keras, PyTorch, MXNet): PyTorch
  2. Framework version: 2.1.1+cu121
  3. Horovod version: v0.28.1
  4. MPI version: X
  5. CUDA version: X
  6. NCCL version: X
  7. Python version: 3.10.12
  8. Spark / PySpark version: X
  9. Ray version: X
  10. OS and version: Ubuntu 22.04.3 LTS
  11. GCC version: 11.4.0
  12. CMake version: 3.27.9

Checklist:

  1. Did you search issues to find if somebody asked this question before? yes
  2. If your question is about hang, did you read this doc? yes
  3. If your question is about docker, did you read this doc? yes
  4. Did you check if you question is answered in the [troubleshooting guide] (https://github.com/horovod/horovod/blob/master/docs/troubleshooting.rst)? yes

Bug report:
Please describe erroneous behavior you're observing and steps to reproduce it.

  1. When I use this code
    import horovod.torch as hvd hvd.init()
    This error occurs
    [0]<stdout>:Extension horovod.torch has not been built: /home/sykang/.local/lib/python3.10/site-packages/horovod/torch/mpi_lib_v2.cpython-310-x86_64-linux-gnu.so not found [0]<stdout>:If this is not expected, reinstall Horovod with HOROVOD_WITH_PYTORCH=1 to debug the build error. [0]<stdout>:Warning! MPI libs are missing, but python applications are still available. [0]<stderr>:Traceback (most recent call last): [0]<stderr>: File "/home/sykang/workspace/Distributed_Training/Horovod/GCN/gcn_main.py", line 16, in <module> [0]<stderr>: hvd.init() [0]<stderr>:AttributeError: module 'horovod.torch' has no attribute 'init'

  2. My installation process is as follows:
    2-1. HOROVOD_WITHOUT_MPI=1 pip install --no-cache-dir horovod
    2-2. pip install torch
    2-3. pip install torch-geometric

  3. When I use "horovodrun --check-build"
    -->
    image

  4. "HOROVOD_WITH_PYTORCH=1 pip install --no-cache-dir horovod"
    I tried executing the command, but a build error occurred.

Is this a compatibility issue between pytorch and horovod?
I have MPI, but I want to use gloo.

@Cow-Kite Cow-Kite added the bug label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant