Changeset 20204


Ignore:
Timestamp:
02/17/16 14:43:11 (9 years ago)
Author:
Mathieu Morlighem
Message:

NEW: created ISSM_MPI_Intercomm_create

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/main/issm_slr.cpp

    r20135 r20204  
    6969
    7070        /*Split world into sub-communicators for each and every model:*/
    71         MPI_Comm_split(worldcomm,modelid, my_rank, &modelcomm);
     71        ISSM_MPI_Comm_split(worldcomm,modelid, my_rank, &modelcomm);
    7272
    7373        /*Build inter communicators:*/
     
    7676                fromicecomms=xNew<ISSM_MPI_Comm>(nummodels-1);
    7777                for(int i=0;i<earthid;i++){
    78                         MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[i], i, fromicecomms+i); //communicate from local erth comm 9rank 0) to ice comm (rank 0) using modelid tag.
     78                        ISSM_MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[i], i, fromicecomms+i); //communicate from local erth comm 9rank 0) to ice comm (rank 0) using modelid tag.
    7979                }
    8080        }
    8181        else{
    82                 MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[earthid], modelid, &toearthcomm); //communicate from local ice comm (rank 0) to earth comm (rank 0) using modelid tag.
     82                ISSM_MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[earthid], modelid, &toearthcomm); //communicate from local ice comm (rank 0) to earth comm (rank 0) using modelid tag.
    8383        }
    8484
  • issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.cpp

    r20151 r20204  
    508508  return rc;
    509509}/*}}}*/
     510int ISSM_MPI_Intercomm_create(ISSM_MPI_Comm comm,int local_leader,ISSM_MPI_Comm peer_comm, int remote_leader, int tag,ISSM_MPI_Comm *newintercomm){ /*{{{*/
     511
     512        int rc=0;
     513#ifdef _HAVE_MPI_
     514#ifdef _HAVE_AMPI_
     515        rc=MPI_Intercomm_create(comm,local_leader,peer_comm,remote_leader,tag,newintercomm);
     516#else
     517        rc=MPI_Intercomm_create(comm,local_leader,peer_comm,remote_leader,tag,newintercomm);
     518#endif
     519#else
     520        // nothing to be done here
     521#endif
     522        return rc;
     523}/*}}}*/
  • issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h

    r20149 r20204  
    138138double ISSM_MPI_Wtime(void);
    139139int ISSM_MPI_Comm_split(ISSM_MPI_Comm comm, int color, int key, ISSM_MPI_Comm *newcomm);
     140int ISSM_MPI_Intercomm_create(ISSM_MPI_Comm comm,int local_leader,ISSM_MPI_Comm peer_comm, int remote_leader, int tag,ISSM_MPI_Comm *newintercomm);
    140141
    141142// special for Adol-C locations when buffers are allocated with new
Note: See TracChangeset for help on using the changeset viewer.