Ignore:
Timestamp:
06/02/17 17:53:25 (7 years ago)
Author:
yushan
Message:

save modif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/node/file.cpp

    r1149 r1153  
    578578      bool isCollective = par_access.isEmpty() || par_access == par_access_attr::collective; 
    579579 
     580      #ifdef _usingEP 
     581      if(omp_get_num_threads() != 1 ) multifile = true; 
     582      #endif 
     583 
    580584      if (isOpen) data_out->closeFile(); 
    581585      if (time_counter_name.isEmpty()) data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), static_cast< ::MPI_Comm >(fileComm.mpi_comm), multifile, isCollective)); 
     
    609613 
    610614     // It would probably be better to call initFile() somehow 
     615      
    611616     MPI_Comm_dup(client->intraComm, &fileComm); 
    612617     if (time_counter_name.isEmpty()) time_counter_name = "time_counter"; 
    613618 
    614      //#pragma omp critical (_checkFile) 
    615      checkFile(); 
     619     //#pragma omp critical (_readAttributesOfEnabledFieldsInReadMode_) 
     620     //{ 
     621     checkFile(); // calls nc_open 
    616622 
    617623     for (int idx = 0; idx < enabledFields.size(); ++idx) 
     
    627633 
    628634        // Read necessary value from file 
    629         this->data_in->readFieldAttributesValues(enabledFields[idx]); 
    630  
     635        #pragma omp critical (_func) 
     636        { 
     637          //checkFile(); 
     638          this->data_in->readFieldAttributesValues(enabledFields[idx]); 
     639          //close(); 
     640        } 
     641         
    631642        // Fill attributes for base reference 
    632643        enabledFields[idx]->solveGridDomainAxisBaseRef(); 
     
    634645 
    635646     // Now everything is ok, close it 
    636      //close(); 
     647     close(); 
     648     //} 
     649      
     650     //if (fileComm != MPI_COMM_NULL) MPI_Comm_free(&fileComm); 
     651      
    637652   } 
    638653 
Note: See TracChangeset for help on using the changeset viewer.