Ignore:
Timestamp:
09/06/18 18:55:44 (6 years ago)
Author:
oabramkina
Message:

Taking care of cases when a process doesn't possess a grid (its domain or axe size is zero).

Tested with CMIP6 toy models and IPSL model.

To do: remove grid mask from transformations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/domain.cpp

    r1570 r1571  
    18481848          // Even if a client has no index, it must connect to at least one server and 
    18491849          // send an "empty" data to this server 
     1850//          if (connectedServerRank_[nbServer].empty()) 
     1851//            connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize); 
     1852 
     1853          // Trying instead: send empty data to all servers 
    18501854          if (connectedServerRank_[nbServer].empty()) 
    1851             connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize); 
     1855            for (int i = 0; i < client->serverSize; ++i) 
     1856            connectedServerRank_[nbServer].push_back(i); 
     1857 
    18521858 
    18531859          nbSenders[nbServer] = clientServerMap->computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]); 
     
    19041910        { 
    19051911          localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo]; 
    1906           ++nbWritten; 
    19071912        } 
    19081913        else 
    19091914        { 
    1910           localIndexToWriteOnServer(nbWritten) = 0; 
    1911           ++nbWritten; 
    1912         } 
     1915          localIndexToWriteOnServer(nbWritten) = -1; 
     1916        } 
     1917        ++nbWritten; 
    19131918      } 
    19141919       
     
    25122517           nbIndLoc = iIndex + ni * jIndex; 
    25132518//           if (nbIndLoc < nbIndexGlobMax)  // THIS CONDITION IMPEDES THE CASE OF A HOLE 
    2514            { 
    2515              i_index(nbIndLoc) = index % ni_glo; 
    2516              j_index(nbIndLoc) = index / ni_glo; 
    2517              globalLocalIndexMap_[index] = nbIndLoc;   
    2518              ++nbIndGlob; 
    2519            } 
    2520            // i_index(nbIndGlob) = index % ni_glo; 
    2521            // j_index(nbIndGlob) = index / ni_glo; 
    2522            // globalLocalIndexMap_[index] = nbIndGlob;   
    2523            // ++nbIndGlob; 
     2519//           { 
     2520//             i_index(nbIndLoc) = index % ni_glo; 
     2521//             j_index(nbIndLoc) = index / ni_glo; 
     2522//             globalLocalIndexMap_[index] = nbIndLoc; 
     2523//             ++nbIndGlob; 
     2524//           } 
     2525            i_index(nbIndGlob) = index % ni_glo; 
     2526            j_index(nbIndGlob) = index / ni_glo; 
     2527            globalLocalIndexMap_[index] = nbIndGlob; 
     2528            ++nbIndGlob; 
    25242529         }  
    25252530      }  
Note: See TracChangeset for help on using the changeset viewer.