Changeset 1491 for XIOS/dev/branch_openmp/src
- Timestamp:
- 04/23/18 11:18:05 (6 years ago)
- Location:
- XIOS/dev/branch_openmp/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/config/file_attribute.conf
r1460 r1491 21 21 DECLARE_ATTRIBUTE(bool, append) 22 22 DECLARE_ENUM2(mode, read, write) 23 DECLARE_ATTRIBUTE(bool, read_metadata_par) 23 24 DECLARE_ENUM7(time_counter, centered, instant, record, exclusive, centered_exclusive, instant_exclusive, none) 24 25 DECLARE_ATTRIBUTE(StdString, time_counter_name) -
XIOS/dev/branch_openmp/src/io/inetcdf4.cpp
r1463 r1491 7 7 namespace xios 8 8 { 9 CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 9 //CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 10 CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, 11 bool readMetaDataPar /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 10 12 { 11 13 // Don't use parallel mode if there is only one process … … 17 19 comm = NULL; 18 20 } 19 mpi = comm && !multifile; 21 //mpi = comm && !multifile; 22 mpi = comm && !multifile && readMetaDataPar; 20 23 ep_lib::MPI_Info info_null; 21 24 -
XIOS/dev/branch_openmp/src/io/inetcdf4.hpp
r1460 r1491 23 23 /// Constructors /// 24 24 CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm = NULL, bool multifile = true, 25 const StdString& timeCounterName = "time_counter"); 25 bool readMetaDataPar = false, const StdString& timeCounterName = "time_counter"); 26 //const StdString& timeCounterName = "time_counter"); 26 27 CINetCDF4(const CINetCDF4& inetcdf4); // Not implemented. 27 28 CINetCDF4(const CINetCDF4* const inetcdf4); // Not implemented. -
XIOS/dev/branch_openmp/src/io/nc4_data_input.cpp
r1482 r1491 10 10 namespace xios 11 11 { 12 CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 12 //CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 13 CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, 14 bool readMetaDataPar /*= false*/, bool ugridConvention /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 13 15 : SuperClass() 14 , SuperClassWriter(filename, &comm_file, multifile, timeCounterName) 16 , SuperClassWriter(filename, &comm_file, multifile, readMetaDataPar, timeCounterName) 17 //, SuperClassWriter(filename, &comm_file, multifile, timeCounterName) 15 18 , comm_file(comm_file) 16 19 , filename(filename) 17 20 , isCollective(isCollective) 21 , ugridConvention(ugridConvention) 18 22 , readMetaDataDomains_(), readValueDomains_() 19 23 , readMetaDataAxis_(), readValueAxis_() … … 422 426 StdString boundsLonName = this->getBoundsId(lonName); 423 427 424 int nbVertex = this->getNbVertex(fieldId); 428 if (ugridConvention && domain->nvertex.isEmpty()) 429 { 430 ERROR("void CNc4DataInput::readDomainAttributeValueFromFile(...)", 431 << " Attribute nvertex must be specified for domain " << domain->getDomainOutputName() 432 << " read from UGRID file " << this->filename << " ."<< std::endl); 433 } 434 // int nbVertex = this->getNbVertex(fieldId); 435 int nbVertex = (ugridConvention) ? domain->nvertex : this->getNbVertex(fieldId); 436 425 437 if (!domain->nvertex.isEmpty() && (domain->nvertex != nbVertex)) 426 438 { -
XIOS/dev/branch_openmp/src/io/nc4_data_input.hpp
r1328 r1491 25 25 /// Constructors /// 26 26 CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true, 27 const StdString& timeCounterName = "time_counter"); 27 bool readMetaDataPar = false, bool ugridConvention = false, const StdString& timeCounterName = "time_counter"); 28 //const StdString& timeCounterName = "time_counter"); 28 29 CNc4DataInput(const CNc4DataInput& dataInput); // Not implemented. 29 30 CNc4DataInput(const CNc4DataInput* const dataInput); // Not implemented. … … 74 75 const StdString filename; 75 76 bool isCollective; 77 bool ugridConvention; 76 78 }; // class CNc4DataInput 77 79 -
XIOS/dev/branch_openmp/src/node/context.cpp
r1468 r1491 891 891 if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixé à vrai. 892 892 { 893 if (allFiles[i]->output_freq.isEmpty()) 894 { 895 ERROR("CContext::findEnabledFiles()", 896 << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 897 <<" \".") 898 } 893 899 if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 894 900 { … … 903 909 else 904 910 { 911 if (allFiles[i]->output_freq.isEmpty()) 912 { 913 ERROR("CContext::findEnabledFiles()", 914 << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 915 <<" \".") 916 } 905 917 if ( (initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 906 918 { -
XIOS/dev/branch_openmp/src/node/domain.cpp
r1460 r1491 1510 1510 ERROR("CDomain::checkBounds(void)", 1511 1511 << "Since 'bounds_lat_2d' is defined, 'latvalue_2d' must be defined too." << std::endl); 1512 1513 hasBounds = true; 1512 1513 // In case of reading UGRID bounds values are not required 1514 hasBounds = (!bounds_lat_1d.isEmpty() || !bounds_lat_2d.isEmpty() ); 1514 1515 } 1515 1516 else if (hasBoundValues) -
XIOS/dev/branch_openmp/src/node/file.cpp
r1460 r1491 657 657 658 658 bool isCollective = par_access.isEmpty() || par_access == par_access_attr::collective; 659 #ifdef _usingEP 660 if (isOpen) data_out->closeFile(); 661 if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 662 else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 663 isOpen = true; 664 #elif _usingMPI 665 if (isOpen) data_out->closeFile(); 666 if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 667 else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 668 isOpen = true; 669 #endif 659 bool readMetaDataPar = true; 660 if (!context->hasServer) readMetaDataPar = (read_metadata_par.isEmpty()) ? false : read_metadata_par; 661 662 if (isOpen) data_out->closeFile(); 663 //if (time_counter_name.isEmpty()) data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective)); 664 //else data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, time_counter_name)); 665 bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 666 if (time_counter_name.isEmpty()) 667 data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 668 else 669 data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 670 671 isOpen = true; 670 672 } 671 673 } -
XIOS/dev/branch_openmp/src/test/test_remap_omp.f90
r1468 r1491 144 144 ENDDO 145 145 146 print*, "ID = ", rank, "src_ni = ", "src_nvertex = ", src_nvertex, "src_ni_glo = ", src_ni_glo146 print*, "ID = ", rank, "src_ni = ", src_ni, "src_nvertex = ", src_nvertex, "src_ni_glo = ", src_ni_glo 147 147 148 148 ierr=NF90_OPEN(dst_file, NF90_NOWRITE, ncid) … … 228 228 229 229 DO ts=1,1 230 CALL xios_recv_field("src_field_regular", tmp_field_0)231 !CALL xios_recv_field("src_field_curvilinear", tmp_field_1)232 !CALL xios_recv_field("src_field_unstructured", tmp_field_2)233 230 CALL xios_recv_field("src_field_regular", tmp_field_0) 234 231 !CALL xios_recv_field("src_field_curvilinear", tmp_field_1)
Note: See TracChangeset
for help on using the changeset viewer.