-
Notifications
You must be signed in to change notification settings - Fork 885
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
Open MPI in Xcode #8301
Comments
Interesting. I can't say I've ever tried to launch Open MPI via XCode. If I load Open MPI via Homebrew and compile # The simple way
$ mpicc hello_c.c -o hello
# The explicit way
$ pkg-config --cflags --libs ompi
-I/usr/local/Cellar/open-mpi/4.0.5/include -L/usr/local/Cellar/open-mpi/4.0.5/lib -L/usr/local/opt/libevent/lib -lmpi
$ gcc -I/usr/local/Cellar/open-mpi/4.0.5/include hello_c.c -c
$ gcc hello_c.o -L/usr/local/Cellar/open-mpi/4.0.5/lib -L/usr/local/opt/libevent/lib -lmpi -o hello_c
$ mpirun -np 2 hello
Hello, world, I am 0 of 2, (Open MPI v4.0.5, package: Open MPI brew@Catalina Distribution, ident: 4.0.5, repo rev: v4.0.5, Aug 26, 2020, 108)
Hello, world, I am 1 of 2, (Open MPI v4.0.5, package: Open MPI brew@Catalina Distribution, ident: 4.0.5, repo rev: v4.0.5, Aug 26, 2020, 108) ( I can't imagine why |
@tnorlund what was the resolution? |
I wonder it ,too. |
+1 |
Thanks @tnorlund ! Any idea for mpich? I can't select |
Dealing with this issue and access to https://www.tylernorlund.com/blog/using-libraries-with-xcode/ is denied. Can someone help? |
@hyoklee This github is about Open MPI. I'm afraid we can't answer questions about MPICH -- you'll need to ask them about that. Sorry! |
@jsquyres OK, thanks! |
I'm having trouble running Open MPI in Xcode. I can execute it just find, but when calling
MPI_Init(NULL, NULL);
, I get an error:Failed to retrieve device information! Invalid enumerated value!
.Setup
I used Homebrew to install Open MPI. I then used
pkg-config
to find the libraries, headers, and linker flags required:From here, I added the header and libraries.
and the linker flags.
Finally, I added the executable,
orterun
, with the correct input arguments.I can execute the hello world example fine, but when calling MPI_Init I get some errors. Here is the total output:
How do I get rid of the device information warning?
The text was updated successfully, but these errors were encountered: