Add new flesh APIs for mapping between processes and hosts

Create issue
Issue #746 closed
Jian Tao created an issue

To support parallel programming on heterogeneous systems, it will be convenient to have the following APIs provided via flesh. These APIs will be helpful for properly handling the matching between devices (e.g. GPUs) and MPI processes.

// return a unique id for the local host; int CCTK_MyHost(cGH *cctkGH);

// return total number of nodes; int CCTK_nHosts(cGH *cctkGH);

// return number of mpi processes on a given host int CCTK_nProcsOnHost(const int host);

// return a list of process on a given host void CCTK_ProcsOnHost(const int host, int *procs);

Regards, Jian


Comments (6)

  1. Ian Hinder
    • changed status to open
    • removed comment

    It was not a duplicate - I changed the summary to be more descriptive and the second TRAC email notification did not indicate that this was a summary-change rather than a new ticket . Unless you think there is already a ticket with this content?

  2. Erik Schnetter
    • removed comment

    Yes, I opened #744 two days ago.

    The API suggested above is incomplete -- it is e.g. missing a function to find out which of the n processes on the current host I am. It also doesn't provide information about other hosts, which may be interesting (e.g. to combine MPI communication).

    That's why I asked Jian to implement what he needs, and we'll derive a good API from that.

  3. Log in to comment