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

NameError: name 'MPI' is not defined #34

Closed
RandyWangRaining opened this issue May 22, 2024 · 2 comments
Closed

NameError: name 'MPI' is not defined #34

RandyWangRaining opened this issue May 22, 2024 · 2 comments

Comments

@RandyWangRaining
Copy link

my mpi is ok
when i input mpirun -n 4 python3 owntest.py
i get My rank is 0
My rank is 1
My rank is 2
My rank is 3

but when i run :python demo_som.py
get:

File "/home/randywang/anaconda3/envs/som2/lib/python3.10/site-packages/seem/utils/distributed.py", line 61, in init_distributed
apply_distributed(opt)
File "/home/randywang/anaconda3/envs/som2/lib/python3.10/site-packages/seem/utils/distributed.py", line 20, in apply_distributed
master_address = MPI.COMM_WORLD.bcast(master_address, root=0)
NameError: name 'MPI' is not defined

@abrichr
Copy link
Contributor

abrichr commented May 22, 2024

Related: #12 (comment)

Try:

pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@33f2c898fdc8d7c95dda014a4b9ebe4e413dbb2b 

pip install mpi4py

@RandyWangRaining
Copy link
Author

I soved this problem by adding
import mpi
in /home/anaconda3/envs/som2/lib/python3.10/site-packages/seem/utils/distributed.py"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants