Changeset 2297


Ignore:
Timestamp:
02/14/22 19:11:31 (2 years ago)
Author:
ymipsl
Message:

Fix problem with global netcdf attribute in multiple file mode when grid is zoomed.
YM

Location:
XIOS/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/nc4_data_output.cpp

    r2200 r2297  
    246246                   SuperClassWriter::addDimension(dimVertId, domain->nvertex); 
    247247 
    248                  if (server->intraCommSize > 1) 
     248                 int commRank ; 
     249                 int commSize ; 
     250                 MPI_Comm_rank(comm_file,&commRank) ; 
     251                 MPI_Comm_size(comm_file,&commSize) ; 
     252                 if (commSize > 1) 
    249253                 { 
    250254                   this->writeLocalAttributes(domain->ibegin, 
     
    261265                                                      domain->nj, 
    262266                                                      domain->ni_glo,domain->nj_glo, 
    263                                                       server->intraCommRank,server->intraCommSize); 
     267                                                      commRank,commSize); 
    264268                 } 
    265269 
     
    24742478        } 
    24752479 
    2476          bool isRoot = (server->intraCommRank == 0); 
     2480         int commRank ; 
     2481         MPI_Comm_rank(comm_file,&commRank) ; 
     2482         bool isRoot = (commRank == 0); 
    24772483 
    24782484         if (!field->scale_factor.isEmpty() || !field->add_offset.isEmpty()) 
  • XIOS/trunk/src/node/file.cpp

    r2250 r2297  
    557557            MPI_Comm_rank(fileComm, &commRank); 
    558558 
    559             if (server->intraCommSize > 1) 
     559            if (commSize > 1) 
    560560            { 
    561561              oss << "_" ; 
Note: See TracChangeset for help on using the changeset viewer.