Skip to Content.
Sympa Menu

charm - Re: [charm] MPI and Charms data exchange

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] MPI and Charms data exchange


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT gmail.com>
  • To: Steve Petruzza <spetruzza AT sci.utah.edu>, charm <charm AT lists.cs.illinois.edu>
  • Subject: Re: [charm] MPI and Charms data exchange
  • Date: Fri, 24 Jun 2016 06:58:23 -0600

Hi Steve,

One way to share data between the MPI and Charm++ portion of you code is via global variables.

Take a look at bool g_charmpass in this example: https://github.com/quinoacomputing/quinoa/blob/master/src/Main/UnitTest.C. Its value is filled in the Charm++ portion (Main::Main) and then later queried in the MPI portion (main).

It is also possible to pass and get back data to and from MPI libraries from Charm++. I do this from Charm++ chare groups, whose elements are guaranteed to exist one per CPU, from which I call MPI-only-library API calls. An example is here https://github.com/quinoacomputing/quinoa/blob/master/src/LinSys/HypreSolver.h#L54, calling hypre, which is called from a charge group here: https://github.com/quinoacomputing/quinoa/blob/master/src/LinSys/LinSysMerger.h#L638.

Please let me know if you have questions.

Jozsef

On Fri, Jun 24, 2016 at 6:29 AM, Steve Petruzza <spetruzza AT sci.utah.edu> wrote:
Hi all,

looking at the interoperability examples I have seen that MPI and Charm++ can coexist. This is great, but is it possible to exchange data between them?
Is reasonable to think that I have some data on an MPI rank X and then launching the RTS with the same communicator I will get the same data in a correspondent charm X?
So basically after I run the Charm Scheduler is there any way to exchange data between the MPI ranks and the charms tasks?

Thank you,
Steve









Archive powered by MHonArc 2.6.16.

Top of Page