Ignore:
Timestamp:
11/21/17 10:47:57 (6 years ago)
Author:
yushan
Message:

dev_omp

File:
1 edited

Legend:

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

    r1334 r1338  
    596596 
    597597      bool isCollective = par_access.isEmpty() || par_access == par_access_attr::collective; 
    598  
    599       if (isOpen) data_out->closeFile(); 
    600       if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective)); 
    601       else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, time_counter_name)); 
    602       isOpen = true; 
     598      #ifdef _usingEP 
     599        //printf("multifile was %d\n", multifile); 
     600        //multifile = true; 
     601        if (isOpen) data_out->closeFile(); 
     602        if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective)); 
     603        else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, time_counter_name)); 
     604        isOpen = true; 
     605      #elif _usingMPI 
     606        if (isOpen) data_out->closeFile(); 
     607        if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective)); 
     608        else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, time_counter_name)); 
     609        isOpen = true; 
     610      #endif 
    603611    } 
    604612  } 
     
    655663 
    656664     // Now everything is ok, close it 
    657      close(); 
     665     //close(); 
    658666   } 
    659667 
Note: See TracChangeset for help on using the changeset viewer.