When it comes to parallel programming, I have only been exposed to multithreading but recently I have been presented with mpi I tried to make sense of what the difference is through searching online but was to no avail. I think they are both libraries for the sake of parallelizing your code correct? If so how are they different?or are they even comparable like an apple and an orange. Can someone clarify?
Multithreading is strictly on the same computer, same program and same memory space. MPI is basically multiprocessing, which is different programs that communicate together. MPI has the advantage that you can parallelize its programs and run it on cluster systems, so, different computers. Multithreading is considered much simpler. C++ doesn't have a standard implementation of multiprocessing, which is why MPI libraries are used for that purpose.
More information here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With