Changeset 22376


Ignore:
Timestamp:
01/29/18 10:05:44 (7 years ago)
Author:
seroussi
Message:

NEW: implementing coupling with MITgcm

File:
1 edited

Legend:

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

    r22190 r22376  
    1111        int    icecommsize;
    1212        int    rankzeros[2];
    13         int    my_rank;
     13        int    my_rank,my_local_rank,my_size,my_local_size;
    1414        ISSM_MPI_Comm worldcomm;
    15 
    16 //      int    modelid;
    17 //      int    count=0;
    1815        ISSM_MPI_Comm modelcomm;
    1916        ISSM_MPI_Comm frommitgcm;
     
    2825        /*What is my rank?:*/
    2926        ISSM_MPI_Comm_rank(worldcomm,&my_rank);
     27        ISSM_MPI_Comm_size(worldcomm,&my_size);
    3028
    3129        /*First model is ice, second is ocean*/
     
    3735        rankzeros[1]=icecommsize;
    3836
     37        printf("Ice: My global rank: %i My world size: %i \n",my_rank,my_size);
     38
    3939        /*Split world into sub-communicators for each and every model:*/
    4040        ISSM_MPI_Comm_split(worldcomm,0, my_rank, &modelcomm);
     41
     42        ISSM_MPI_Comm_rank(modelcomm,&my_local_rank);
     43        ISSM_MPI_Comm_size(modelcomm,&my_local_size);
     44
     45        printf("Ice: My global rank: %i My local rank: %i My world size: %i My local size: %i\n",my_rank,my_local_rank,my_size,my_local_size);
    4146
    4247        ISSM_MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[1], 0, &tomitgcmcomm);
Note: See TracChangeset for help on using the changeset viewer.