Install OpenMpi on windows 10
Asked Answered
J

1

8

I am a computer science student and this season we have a course in MPI programming in C language. I don't have enough hard disk space to install visual studio on my computer and I have installed codeblocks, and MinGW as compiler, and I also installed Microsoft MPI to run mpi .exe code. Now I think that I need to install Open mpi to compile my code to exe and run it using MSMPI. Please correct me if I'm wrong until now :)

In OpenMPI download page we just have binary codes, and I don't know how to install binary code in windows...

Thanks all

Jiminez answered 10/1, 2018 at 18:13 Comment(4)
I don't know if this will work for your circumstance, but to compile C code on Windows, I enabled the Linux Subsystem for Ubuntu which is available on Windows 10, then I installed gcc with sudo apt-get install gcc which allows for compiling code via the Linux Subsystem. This let me avoid having to deal with things like CodeBlocks and MinGW entirely.Bragg
If you use the Linux Subsystem for Ubuntu on Windows 10, then this Stack Overflow question shows how to compile C code as .exe files for windows, which may work for what you desire, though I am not completely sure if it will work for all the mpi programming you want to do.Bragg
@DavyM I already have gcc and I can run regular c programs by it, but I need mpicc to compile a mpi code...Jiminez
Since you are learning the C language, I recommend staying away from C++. They are two distinct languages. For example, C++ has std::string which can dynamically grow. The C language uses fixed length character arrays, which must be compared using strcmp. Please adjust your tags.Dedrick
S
4

If you plan to build your code with Open MPI and then run it with Microsoft MPI, then just drop that idea ! MPI is standard in a sense that a code can be built with any MPI implementation. There is no guarantee a binary can be ran with any MPI implementation.

Open MPI is not supported under windows, but you can use cygwin and install the openmpi packages. Linux subsystem for Ubuntu is an option i never tried but that might work too.

School answered 11/1, 2018 at 2:15 Comment(4)
Interestingly, there are efforts being made on this front, especially in implementations of the same family! Of course MSMPI isn't part of it, but I wonder where we'll be in 10 years. mpich.org/abiTelephony
Open MPI does not break ABI compatibility within the same major version. github.com/cea-hpc/wi4mpi can be used if you want/need to mix Open MPI and MPICHSchool
How do you install Open MPI with Cygwin?Nutting
Select it from the list of packagesSchool

© 2022 - 2024 — McMap. All rights reserved.