Changeset 906 for XIOS/trunk/src/node/domain.cpp
- Timestamp:
- 07/28/16 10:56:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/domain.cpp
r899 r906 532 532 if (bounds_lon_end.isEmpty()) bounds_lon_end=180.-1e-8 ; 533 533 } 534 534 535 535 for(j=0;j<nj;++j) 536 536 for(i=0;i<ni;++i) … … 921 921 size_t zoom_jend=global_zoom_jbegin+global_zoom_nj-1 ; 922 922 923 923 924 924 size_t dn=data_i_index.numElements() ; 925 925 int i,j ; 926 926 size_t k,ind ; 927 927 928 928 for(k=0;k<dn;k++) 929 929 { … … 936 936 { 937 937 i=(data_i_index(k)+data_ibegin)%ni ; 938 j=(data_i_index(k)+data_ibegin)/ni ; 938 j=(data_i_index(k)+data_ibegin)/ni ; 939 939 } 940 940 … … 947 947 } 948 948 } 949 950 951 952 953 954 955 949 950 951 952 953 954 955 956 956 void CDomain::checkEligibilityForCompressedOutput(void) 957 957 { … … 1358 1358 CContextClient* client=context->client ; 1359 1359 int nbServer=client->serverSize; 1360 int rank = client->clientRank; 1360 1361 bool doComputeGlobalIndexServer = true; 1361 1362 … … 1445 1446 for (int i = 0; i < nGlobDomain_.size(); ++i) globalSizeIndex *= nGlobDomain_[i]; 1446 1447 indexBegin = 0; 1447 for (int i = 0; i < clientSize; ++i) 1448 { 1449 range = globalSizeIndex / clientSize; 1450 if (i < (globalSizeIndex%clientSize)) ++range; 1451 if (i == client->clientRank) break; 1452 indexBegin += range; 1453 } 1454 indexEnd = indexBegin + range - 1; 1448 if (globalSizeIndex <= clientSize) 1449 { 1450 indexBegin = rank%globalSizeIndex; 1451 indexEnd = indexBegin; 1452 } 1453 else 1454 { 1455 for (int i = 0; i < clientSize; ++i) 1456 { 1457 range = globalSizeIndex / clientSize; 1458 if (i < (globalSizeIndex%clientSize)) ++range; 1459 if (i == client->clientRank) break; 1460 indexBegin += range; 1461 } 1462 indexEnd = indexBegin + range - 1; 1463 } 1455 1464 1456 1465 CServerDistributionDescription serverDescription(nGlobDomain_, nbServer);
Note: See TracChangeset
for help on using the changeset viewer.