Changeset 1624
- Timestamp:
- 12/14/18 11:20:33 (6 years ago)
- Location:
- XIOS/branchs/xios-2.5/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-2.5/src/io/nc4_data_output.cpp
r1509 r1624 154 154 */ 155 155 156 CArray< size_t, 1>& indexToWrite = domain->localIndexToWriteOnServer;156 CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer; 157 157 int nbWritten = indexToWrite.numElements(); 158 158 CArray<double,1> writtenLat, writtenLon; … … 166 166 for (int idx = 0; idx < nbWritten; ++idx) 167 167 { 168 if (idx < domain->latvalue.numElements())169 170 writtenLat(idx) = domain->latvalue(indexToWrite(idx));171 writtenLon(idx) = domain->lonvalue(indexToWrite(idx));172 173 174 175 writtenLat(idx) = 0.;176 writtenLon(idx) = 0.;177 168 if (indexToWrite(idx) < 0) 169 { 170 writtenLat(idx) = -1.; // hole 171 writtenLon(idx) = -1.; 172 } 173 else 174 { 175 writtenLat(idx) = domain->latvalue(indexToWrite(idx)); 176 writtenLon(idx) = domain->lonvalue(indexToWrite(idx)); 177 } 178 178 } 179 180 179 181 180 if (domain->hasBounds) … … 189 188 for (int nv = 0; nv < nvertex; ++nv) 190 189 { 191 if (idx < boundslat.columns()) 192 { 190 if (indexToWrite(idx) < 0) 191 { 192 writtenBndsLat(nv, idx) = -1.; // hole 193 writtenBndsLon(nv, idx) = -1.; 194 } 195 else 196 { 193 197 writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx))); 194 198 writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx))); 195 } 196 else 197 { 198 writtenBndsLat(nv, idx) = 0.; 199 writtenBndsLon(nv, idx) = 0.; 200 } 199 } 201 200 } 202 201 } … … 208 207 for (int idx = 0; idx < nbWritten; ++idx) 209 208 { 210 if (i dx < domain->areavalue.numElements())211 writtenArea(idx) = domain->areavalue(indexToWrite(idx));209 if (indexToWrite(idx) < 0) 210 writtenArea(idx) = -1.; 212 211 else 213 writtenArea(idx) = 0.;212 writtenArea(idx) = domain->areavalue(indexToWrite(idx)); 214 213 } 215 214 } … … 221 220 case (MULTI_FILE) : 222 221 { 223 // if (domain->isEmpty()) return;224 225 if (server->intraCommSize > 1)226 {227 // SuperClassWriter::addDimension(lonid, domain->zoom_ni.getValue());228 // SuperClassWriter::addDimension(latid, domain->zoom_nj.getValue());229 }230 231 222 switch (domain->type) 232 223 { … … 434 425 std::vector<StdSize> start(2) ; 435 426 std::vector<StdSize> count(2) ; 436 if (domain->isEmpty()) 437 { 438 start[0]=0 ; start[1]=0 ; 439 count[0]=0 ; count[1]=0 ; 440 } 441 else 427 // Comment out because it is not working for a hole 428 // if (domain->isEmpty()) 429 // { 430 // start[0]=0 ; start[1]=0 ; 431 // count[0]=0 ; count[1]=0 ; 432 // } 433 // else 442 434 { 443 435 start[1]=domain->zoom_ibegin-domain->global_zoom_ibegin; … … 883 875 case (MULTI_FILE) : 884 876 { 877 ERROR("CNc4DataOutput::writeDomain(domain)", 878 << "[ type = multiple_file ]" 879 << " is not yet implemented for UGRID files !"); 885 880 break; 886 881 } … … 948 943 int nvertex = (domain->nvertex.isEmpty()) ? 0 : domain->nvertex; 949 944 950 CArray< size_t, 1>& indexToWrite = domain->localIndexToWriteOnServer;945 CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer; 951 946 int nbWritten = indexToWrite.numElements(); 952 947 CArray<double,1> writtenLat, writtenLon; … … 960 955 for (int idx = 0; idx < nbWritten; ++idx) 961 956 { 962 if (i dx < domain->latvalue.numElements())963 {964 writtenLat(idx) = domain->latvalue(indexToWrite(idx));965 writtenLon(idx) = domain->lonvalue(indexToWrite(idx));966 }967 else968 {969 writtenLat(idx) = 0.;970 writtenLon(idx) = 0.;971 }957 if (indexToWrite(idx) < 0) 958 { 959 writtenLat(idx) = -1.; 960 writtenLon(idx) = -1.; 961 } 962 else 963 { 964 writtenLat(idx) = domain->latvalue(indexToWrite(idx)); 965 writtenLon(idx) = domain->lonvalue(indexToWrite(idx)); 966 } 972 967 } 973 968 } … … 984 979 for (int nv = 0; nv < nvertex; ++nv) 985 980 { 986 if (idx < boundslat.columns()) 981 if (indexToWrite(idx) < 0) 982 { 983 writtenBndsLat(nv, idx) = -1.; 984 writtenBndsLon(nv, idx) = -1.; 985 } 986 else 987 987 { 988 988 writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx))); 989 989 writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx))); 990 }991 else992 {993 writtenBndsLat(nv, idx) = 0.;994 writtenBndsLon(nv, idx) = 0.;995 990 } 996 991 } … … 1003 998 for (int idx = 0; idx < nbWritten; ++idx) 1004 999 { 1005 if (idx < domain->areavalue.numElements())1006 writtenArea(idx) = domain->areavalue(indexToWrite(idx));1007 1008 writtenArea(idx) = 0.;1000 if (indexToWrite(idx) < 0) 1001 writtenArea(idx) = -1.; 1002 else 1003 writtenArea(idx) = domain->areavalue(indexToWrite(idx)); 1009 1004 } 1010 1005 } … … 1288 1283 SuperClassWriter::definition_end(); 1289 1284 1290 CArray< size_t, 1>& indexToWrite = axis->localIndexToWriteOnServer;1285 CArray<int, 1>& indexToWrite = axis->localIndexToWriteOnServer; 1291 1286 int nbWritten = indexToWrite.numElements(); 1292 1287 CArray<double,1> axis_value(indexToWrite.numElements()); … … 1295 1290 for (int i = 0; i < nbWritten; i++) 1296 1291 { 1297 if (i < axis->value.numElements()) 1292 if (indexToWrite(i) < 0) 1293 axis_value(i) = -1; // Some value in case of a hole 1294 else 1298 1295 axis_value(i) = axis->value(indexToWrite(i)); 1299 else1300 axis_value(i) = 0.;1301 1296 } 1302 1297 } … … 1308 1303 for (int i = 0; i < nbWritten; i++) 1309 1304 { 1310 if (i < axis->label.numElements()) 1305 if (indexToWrite(i) < 0) 1306 axis_label(i) = boost::lexical_cast<string>(-1); // Some value in case of a hole 1307 else 1311 1308 axis_label(i) = axis->label(indexToWrite(i)); 1312 else1313 axis_label(i) = boost::lexical_cast<string>(0); // Write 0 as a label1314 1309 } 1315 1310 } … … 1329 1324 for (int i = 0; i < nbWritten; ++i) 1330 1325 { 1331 if (i < axis->bounds.columns()) 1326 if (indexToWrite(i) < 0) 1327 { 1328 axis_bounds(0, i) = -1.; // Some value in case of a hole 1329 axis_bounds(1, i) = -1.; 1330 } 1331 else 1332 1332 { 1333 1333 axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i))); 1334 1334 axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i))); 1335 }1336 else1337 {1338 axis_bounds(0, i) = 0.;1339 axis_bounds(1, i) = 0.;1340 1341 1335 } 1342 1336 } … … 1369 1363 for (int i = 0; i < nbWritten; ++i) 1370 1364 { 1371 if (i < axis->bounds.columns()) 1365 if (indexToWrite(i) < 0) 1366 { 1367 axis_bounds(0, i) = -1.; 1368 axis_bounds(1, i) = -1.; 1369 } 1370 else 1372 1371 { 1373 1372 axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i))); 1374 1373 axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i))); 1375 }1376 else1377 {1378 axis_bounds(0, i) = 0.;1379 axis_bounds(1, i) = 0.;1380 1374 } 1381 1375 } … … 2512 2506 if ( wtimeData) 2513 2507 { 2514 // SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);2515 // SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);2516 2508 SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 2517 2509 SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); … … 2519 2511 if (wtimeCounter) 2520 2512 { 2521 // SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);2522 // if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);2523 2513 SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 2524 2514 if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); … … 2596 2586 count.push_back(nZoomSizeServer[idx]); 2597 2587 } 2598 2599 2588 --idxAxis; 2600 2589 --idx; … … 2610 2599 int numElement = axisDomainOrder.numElements(); 2611 2600 int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1; 2612 int idx = domainList.size() * 2 + axisList.size() - 1; // nZoomBeginGlobal.size() - 1;2601 int idx = domainList.size() * 2 + axisList.size() - 1; 2613 2602 2614 2603 start.reserve(nZoomBeginGlobal.size()); … … 2662 2651 if ( wtimeData) 2663 2652 { 2664 // SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);2665 // SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);2666 2653 SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 2667 2654 SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); … … 2669 2656 if (wtimeCounter) 2670 2657 { 2671 // SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);2672 // if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);2673 2658 SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 2674 2659 if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); -
XIOS/branchs/xios-2.5/src/node/axis.cpp
r1566 r1624 657 657 connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize); 658 658 659 659 nbSenders[nbServer] = CClientServerMapping::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]); 660 660 661 661 delete clientServerMap; … … 703 703 } 704 704 } 705 706 // localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements()); 707 // nbWritten = 0; 708 // for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 709 // { 710 // indGlo = *itSrv; 711 // if (ite != globalLocalIndexMap_.find(indGlo)) 712 // { 713 // localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo]; 714 // } 715 // else 716 // { 717 // localIndexToWriteOnServer(nbWritten) = -1; 718 // } 719 // ++nbWritten; 720 // } 705 721 706 722 localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements()); … … 1293 1309 if (0 == globalLocalIndexMap_.count(gloInd)) 1294 1310 { 1295 index(nbIndLoc) = gloInd % n_glo; 1296 globalLocalIndexMap_[gloInd] = nbIndLoc; 1311 index(nbIndexGlob) = gloInd % n_glo; 1312 globalLocalIndexMap_[gloInd] = nbIndexGlob; 1313 // index(nbIndLoc) = gloInd % n_glo; 1314 // globalLocalIndexMap_[gloInd] = nbIndLoc; 1297 1315 ++nbIndexGlob; 1298 1316 } … … 1345 1363 } 1346 1364 1347 int nbCompressedData = 0; 1365 int nbCompressedData = 0; 1348 1366 for (idx = 0; idx < nonCompressedData.numElements(); ++idx) 1349 1367 { 1350 1368 if (0 <= nonCompressedData(idx)) 1351 ++nbCompressedData; 1369 ++nbCompressedData; 1352 1370 } 1353 1371 … … 1359 1377 { 1360 1378 data_index(nbCompressedData) = idx % n; 1361 ++nbCompressedData; 1379 ++nbCompressedData; 1362 1380 } 1363 1381 } … … 1476 1494 clientsSet.insert(contextClient); 1477 1495 } 1478 }1496 } 1479 1497 1480 1498 void CAxis::parse(xml::CXMLNode & node) -
XIOS/branchs/xios-2.5/src/node/axis.hpp
r1371 r1624 124 124 125 125 public: 126 bool hasValue; 127 CArray< size_t,1> localIndexToWriteOnServer;126 bool hasValue; 127 CArray<int,1> localIndexToWriteOnServer; 128 128 129 129 private: -
XIOS/branchs/xios-2.5/src/node/domain.cpp
r1565 r1624 33 33 , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue() 34 34 , globalLocalIndexMap_(), computedWrittenIndex_(false) 35 35 , clients() 36 36 { 37 37 } … … 45 45 , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue() 46 46 , globalLocalIndexMap_(), computedWrittenIndex_(false) 47 47 , clients() 48 48 { 49 49 } … … 160 160 // size estimation for sendIndex (and sendArea which is always smaller or equal) 161 161 size_t sizeIndexEvent = 2 * sizeof(size_t) + 2 * CArray<int,1>::size(idxCount); 162 // if (isCompressible_)163 // {164 // std::map<int, std::vector<int> >::const_iterator itWritten = indWrittenSrv_.find(rank);165 // size_t writtenIdxCount = (itWritten != itWrittenIndexEnd) ? itWritten->second.size() : 0;166 // sizeIndexEvent += CArray<int,1>::size(writtenIdxCount);167 // }168 162 169 163 // size estimation for sendLonLat … … 184 178 bool CDomain::isEmpty(void) const 185 179 { 186 return ((this->zoom_i_index.isEmpty()) || (0 == this->zoom_i_index.numElements())); 187 180 return ((this->i_index.isEmpty()) || (0 == this->i_index.numElements())); 188 181 } 189 182 … … 1455 1448 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1456 1449 << "'bounds_lon_1d' dimension is not compatible with 'nvertex'." << std::endl 1457 << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent( 1)1450 << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(0) 1458 1451 << " but nvertex is " << nvertex.getValue() << "."); 1459 1452 … … 1462 1455 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1463 1456 << "'bounds_lon_2d' dimension is not compatible with 'nvertex'." << std::endl 1464 << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent( 2)1457 << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(0) 1465 1458 << " but nvertex is " << nvertex.getValue() << "."); 1466 1459 … … 1479 1472 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1480 1473 << "'bounds_lat_1d' dimension is not compatible with 'nvertex'." << std::endl 1481 << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent( 1)1474 << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(0) 1482 1475 << " but nvertex is " << nvertex.getValue() << "."); 1483 1476 … … 1486 1479 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1487 1480 << "'bounds_lat_2d' dimension is not compatible with 'nvertex'." << std::endl 1488 << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent( 2)1481 << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(0) 1489 1482 << " but nvertex is " << nvertex.getValue() << "."); 1490 1483 … … 1901 1894 itSrve = writtenGlobalIndex.end(), itSrv; 1902 1895 1903 // for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)1904 // {1905 // indGlo = *itSrv;1906 // if (ite != globalLocalIndexMap_.find(indGlo))1907 // {1908 // ++nbWritten;1909 // }1910 // }1911 1912 // localIndexToWriteOnServer.resize(nbWritten);1913 1896 localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements()); 1914 1915 1897 nbWritten = 0; 1916 1898 for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) … … 1920 1902 { 1921 1903 localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo]; 1922 ++nbWritten;1923 1904 } 1924 1905 else 1925 1906 { 1926 localIndexToWriteOnServer(nbWritten) = 0; 1927 ++nbWritten; 1928 } 1929 } 1930 1931 // if (isCompressible()) 1932 // { 1933 // nbWritten = 0; 1934 // boost::unordered_map<size_t,size_t> localGlobalIndexMap; 1935 // for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 1936 // { 1937 // indGlo = *itSrv; 1938 // if (ite != globalLocalIndexMap_.find(indGlo)) 1939 // { 1940 // localGlobalIndexMap[localIndexToWriteOnServer(nbWritten)] = indGlo; 1941 // ++nbWritten; 1942 // } 1943 // } 1944 1945 // nbWritten = 0; 1946 // for (int idx = 0; idx < data_i_index.numElements(); ++idx) 1947 // { 1948 // if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx))) 1949 // { 1950 // ++nbWritten; 1951 // } 1952 // } 1953 1954 // compressedIndexToWriteOnServer.resize(nbWritten); 1955 // nbWritten = 0; 1956 // for (int idx = 0; idx < data_i_index.numElements(); ++idx) 1957 // { 1958 // if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx))) 1959 // { 1960 // compressedIndexToWriteOnServer(nbWritten) = localGlobalIndexMap[data_i_index(idx)]; 1961 // ++nbWritten; 1962 // } 1963 // } 1964 1965 // numberWrittenIndexes_ = nbWritten; 1966 // if (isDistributed()) 1967 // { 1968 // MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 1969 // MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 1970 // offsetWrittenIndexes_ -= numberWrittenIndexes_; 1971 // } 1972 // else 1973 // totalNumberWrittenIndexes_ = numberWrittenIndexes_; 1974 // } 1907 localIndexToWriteOnServer(nbWritten) = -1; 1908 } 1909 ++nbWritten; 1910 } 1975 1911 } 1976 1912 … … 2510 2446 2511 2447 globalLocalIndexMap_.rehash(std::ceil(nbIndGlob/globalLocalIndexMap_.max_load_factor())); 2512 i_index.resize(nbIndGlob); 2513 j_index.resize(nbIndGlob); 2448 // i_index.resize(nbIndGlob); 2449 // j_index.resize(nbIndGlob); 2450 i_index.resize(ni*nj); 2451 j_index.resize(ni*nj); 2452 i_index = -1; 2453 j_index = -1; 2514 2454 int nbIndexGlobMax = nbIndGlob, nbIndLoc; 2515 2455 … … 2528 2468 jIndex = (jIndex < 0) ? 0 : jIndex; 2529 2469 nbIndLoc = iIndex + ni * jIndex; 2530 if (nbIndLoc < nbIndexGlobMax) 2531 { 2532 i_index(nbIndLoc) = index % ni_glo; 2533 j_index(nbIndLoc) = index / ni_glo; 2534 globalLocalIndexMap_[index] = nbIndLoc; 2535 ++nbIndGlob; 2536 } 2537 // i_index(nbIndGlob) = index % ni_glo; 2538 // j_index(nbIndGlob) = index / ni_glo; 2539 // globalLocalIndexMap_[index] = nbIndGlob; 2540 // ++nbIndGlob; 2470 i_index(nbIndLoc) = index % ni_glo; 2471 j_index(nbIndLoc) = index / ni_glo; 2472 globalLocalIndexMap_[index] = nbIndLoc; 2473 // i_index(nbIndGlob) = index % ni_glo; 2474 // j_index(nbIndGlob) = index / ni_glo; 2475 // globalLocalIndexMap_[index] = nbIndGlob; 2476 ++nbIndGlob; 2477 // if (nbIndLoc < nbIndexGlobMax) 2478 // { 2479 // i_index(nbIndLoc) = index % ni_glo; 2480 // j_index(nbIndLoc) = index / ni_glo; 2481 // globalLocalIndexMap_[index] = nbIndLoc; 2482 // ++nbIndGlob; 2483 // } 2484 // // i_index(nbIndGlob) = index % ni_glo; 2485 // // j_index(nbIndGlob) = index / ni_glo; 2486 // // globalLocalIndexMap_[index] = nbIndGlob; 2487 // // ++nbIndGlob; 2541 2488 } 2542 2489 } 2543 2490 } 2544 2491 2545 if (nbIndGlob==0)2546 {2547 i_index.resize(nbIndGlob);2548 j_index.resize(nbIndGlob);2549 }2550 else2551 {2552 i_index.resizeAndPreserve(nbIndGlob);2553 j_index.resizeAndPreserve(nbIndGlob);2554 }2492 // if (nbIndGlob==0) 2493 // { 2494 // i_index.resize(nbIndGlob); 2495 // j_index.resize(nbIndGlob); 2496 // } 2497 // else 2498 // { 2499 // i_index.resizeAndPreserve(nbIndGlob); 2500 // j_index.resizeAndPreserve(nbIndGlob); 2501 // } 2555 2502 } 2556 2503 … … 2661 2608 2662 2609 nbMaskInd = globalLocalIndexMap_.size(); 2663 mask_1d.resize(nbMaskInd); 2664 domainMask.resize(nbMaskInd); 2610 // mask_1d.resize(nbMaskInd); 2611 // domainMask.resize(nbMaskInd); 2612 mask_1d.resize(ni*nj); 2613 domainMask.resize(ni*nj); 2665 2614 mask_1d = false; 2666 2615 … … 2737 2686 2738 2687 nbLonInd = globalLocalIndexMap_.size(); 2739 lonvalue.resize(nbLonInd); 2688 // lonvalue.resize(nbLonInd); 2689 lonvalue.resize(ni*nj); 2690 lonvalue = -1.0; 2740 2691 if (hasBounds) 2741 2692 { 2742 bounds_lonvalue.resize(nvertex,nbLonInd); 2743 bounds_lonvalue = 0.; 2693 // bounds_lonvalue.resize(nvertex,nbLonInd); 2694 // bounds_lonvalue = 0.; 2695 bounds_lonvalue.resize(nvertex,ni*nj); 2696 bounds_lonvalue = -1.0; 2744 2697 } 2745 2698 … … 2821 2774 2822 2775 nbLatInd = globalLocalIndexMap_.size(); 2823 latvalue.resize(nbLatInd); 2776 // latvalue.resize(nbLatInd); 2777 latvalue.resize(ni*nj); 2824 2778 if (hasBounds) 2825 2779 { 2826 bounds_latvalue.resize(nvertex,nbLatInd); 2827 bounds_latvalue = 0. ; 2780 // bounds_latvalue.resize(nvertex,nbLatInd); 2781 // bounds_latvalue = 0. ; 2782 bounds_latvalue.resize(nvertex,ni*nj); 2783 bounds_latvalue = -1. ; 2828 2784 } 2829 2785 … … 2903 2859 2904 2860 nbAreaInd = globalLocalIndexMap_.size(); 2905 areavalue.resize(nbAreaInd); 2906 nbAreaInd = 0; 2861 // areavalue.resize(nbAreaInd); 2862 // nbAreaInd = 0; 2863 areavalue.resize(ni*nj); 2864 nbAreaInd = -1.0; 2907 2865 for (i = 0; i < nbReceived; ++i) 2908 2866 { … … 3015 2973 dataIIndex(lInd) = (-1 == dataIIndex(lInd)) ? tmpI(ind) : dataIIndex(lInd); // Only fill in dataIndex if there is no data 3016 2974 dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd); 3017 3018 if (!domainMask(lInd)) // Include mask info into data index on the RECEIVE getServerDimensionSizes3019 {3020 dataIIndex(lInd) = dataJIndex(lInd) = -1;3021 }3022 2975 } 3023 2976 } -
XIOS/branchs/xios-2.5/src/node/domain.hpp
r1353 r1624 142 142 CArray<double, 1> areavalue; 143 143 144 CArray< size_t,1> localIndexToWriteOnServer;144 CArray<int,1> localIndexToWriteOnServer; 145 145 146 146 CArray<bool, 1> domainMask; // mask_1d, mask_2d -> domainMask -
XIOS/branchs/xios-2.5/src/node/grid.cpp
r1397 r1624 978 978 979 979 nbIndexOnServer = 0; 980 for (size_t j = 0; j < globalIndexElementOnServerMap.size(); ++j) 980 // for (size_t j = 0; j < globalIndexElementOnServerMap.size(); ++j) 981 for (size_t j = 0; j < globalIndexElementOnClient.numElements(); ++j) 981 982 { 982 983 it = globalIndexElementOnServerMap.find(globalIndexElementOnClient(j)); … … 1305 1306 { 1306 1307 CContext* context = CContext::getCurrent(); 1307 // int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1; // This should be changed soon 1308 // for (int p = 0; p < nbSrvPools; ++p) 1309 { 1310 // CContextClient* client = (context->hasServer) ? (context->hasClient ? context->clientPrimServer[p] : context->client) 1311 // : context->client; 1308 { 1312 1309 CContextClient* client = context->client; 1313 1310
Note: See TracChangeset
for help on using the changeset viewer.