Changeset 22376
- Timestamp:
- 01/29/18 10:05:44 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/main/issm_ocean.cpp
r22190 r22376 11 11 int icecommsize; 12 12 int rankzeros[2]; 13 int my_rank ;13 int my_rank,my_local_rank,my_size,my_local_size; 14 14 ISSM_MPI_Comm worldcomm; 15 16 // int modelid;17 // int count=0;18 15 ISSM_MPI_Comm modelcomm; 19 16 ISSM_MPI_Comm frommitgcm; … … 28 25 /*What is my rank?:*/ 29 26 ISSM_MPI_Comm_rank(worldcomm,&my_rank); 27 ISSM_MPI_Comm_size(worldcomm,&my_size); 30 28 31 29 /*First model is ice, second is ocean*/ … … 37 35 rankzeros[1]=icecommsize; 38 36 37 printf("Ice: My global rank: %i My world size: %i \n",my_rank,my_size); 38 39 39 /*Split world into sub-communicators for each and every model:*/ 40 40 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); 41 46 42 47 ISSM_MPI_Intercomm_create( modelcomm, 0, worldcomm, rankzeros[1], 0, &tomitgcmcomm);
Note:
See TracChangeset
for help on using the changeset viewer.