Changeset 20149


Ignore:
Timestamp:
02/12/16 16:11:26 (9 years ago)
Author:
Eric.Larour
Message:

CHG: implemented new comm splitting wrapper

Location:
issm/trunk-jpl/src/c/toolkits/mpi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.cpp

    r17254 r20149  
    494494#endif
    495495}/*}}}*/
     496int ISSM_MPI_Send(void *buf, int count, ISSM_MPI_Datatype datatype, int dest, int tag, ISSM_MPI_Comm comm){ /*{{{*/
     497
     498  int rc=0;
     499#ifdef _HAVE_MPI_
     500# ifdef _HAVE_AMPI_
     501  rc=AMPI_Send(buf,
     502               count,
     503               datatype,
     504               dest,
     505               tag,
     506               AMPI_TO_RECV, // as long as there are no other variants
     507               comm);
     508# else
     509  rc=MPI_Send(buf,
     510              count,
     511              datatype,
     512              dest,
     513              tag,
     514              comm);
     515# endif
     516#else
     517// nothing to be done here
     518#endif
     519  return rc;
     520}/*}}}*/
     521int ISSM_MPI_Comm_split(ISSM_MPI_Comm comm, int color, int key, ISSM_MPI_Comm *newcomm){ /*{{{*/
     522
     523int rc=0;
     524#ifdef _HAVE_MPI_
     525# ifdef _HAVE_AMPI_
     526rc MPI_Comm_split(comm, color, key, newcomm);
     527# else
     528rc MPI_Comm_split(comm, color, key, newcomm);
     529# endif
     530#else
     531// nothing to be done here
     532#endif
     533  return rc;
     534}/*}}}*/
  • issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h

    r19168 r20149  
    137137int ISSM_MPI_Send(void *buf, int count, ISSM_MPI_Datatype datatype, int dest, int tag, ISSM_MPI_Comm comm);
    138138double ISSM_MPI_Wtime(void);
     139int ISSM_MPI_Comm_split(ISSM_MPI_Comm comm, int color, int key, ISSM_MPI_Comm *newcomm);
    139140
    140141// special for Adol-C locations when buffers are allocated with new
Note: See TracChangeset for help on using the changeset viewer.