Can we replace all MPI functions with Unified Memory functions

Dear all,

I’ve read some papers about implementations of checkpoint/restart with MPI.
The reason why they used MPI is that there are lots of distributed applications written in MPI.
However, I’ve also studied Unified Memory for a long time and found that the relation between UM and MPI is just like shared memory and message passing.
In addition, UM provides a more user-friendly interface that makes developers easier to program without much more domain knowledge, meanwhile guarantees acceptable performance.

Here comes my questions:

  1. Can we replace all the usage of MPI with UM?
  2. Is there anything that MPI can do but UM cannot?

Best wishes,

I doubt it, not without significant additional programming effort on your own.

  1. MPI_Allreduce
  2. Inter-node communication

There are probably other things as well. Certain MPI constructs carry certain kinds of synchronization, which guarantees the consistency of data. I have no doubt that you could do this with a raw shared memory interface like UM, plus additional programming on your part. Same comments apply to Allreduce. If you have a raw shared memory interface like UM, and you want to build your own synchronization primitives on that (or use some other provider for synchronization primitives) and you want to build your own reduction code (or use some other provider for reduction) then you could certainly make it work.

I don’t think you can solve the inter-node communication problem without MPI, or something like it. And UM today doesn’t contribute anything meaningful to inter-node communication.

Hi @Robert_Crovella ,

First, thanks for your fast and clear response.
Please let me conclude what you’ve said in short.
UM provides the raw shared memory inter-nodes but lacks the active inter-node synchronized method, so we have to leverage MPI functions to implement additional synchronized mechanisms like lock or semaphore.
It’s more convenient to use MPI to reduce the hands-on efforts.

Best wishes,