Changeset 1128
- Timestamp:
- 05/11/17 16:12:23 (7 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/arch/arch-CURIE_Intel.fcm
r1069 r1128 3 3 ################################################################################ 4 4 5 %CCOMPILER mpicc -openmp -D_intelmpi -D_usingEP 5 %CCOMPILER mpicc -openmp -D_intelmpi -D_usingEP 6 6 %FCOMPILER mpif90 -openmp 7 7 %LINKER mpif90 -openmp -Wl,-rpath -Wl,$HOME/lib/netcdf_f_intel/lib -
XIOS/dev/branch_yushan/bld.cfg
r1109 r1128 33 33 #bld::target libxios.a 34 34 #bld::target generate_fortran_interface.exe 35 bld::target xios_server.exe35 #bld::target xios_server.exe 36 36 #bld::target test_remap.exe 37 37 #bld::target test_new_features.exe test_unstruct_complete.exe -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_fortran.cpp
r1087 r1128 31 31 { 32 32 fc_comm_map.insert(std::make_pair( std::make_pair( fint, omp_get_thread_num()) , comm)); 33 printf("EP_Comm_c2f : MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), comm.ep_comm_ptr);33 //printf("EP_Comm_c2f : MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), comm.ep_comm_ptr); 34 34 } 35 35 } … … 54 54 MPI_Comm comm_ptr; 55 55 comm_ptr = it->second; 56 printf("EP_Comm_f2c : MAP find: %d, %d, %p\n", it->first.first, it->first.second, comm_ptr.ep_comm_ptr);56 //printf("EP_Comm_f2c : MAP find: %d, %d, %p\n", it->first.first, it->first.second, comm_ptr.ep_comm_ptr); 57 57 return comm_ptr; 58 58 } -
XIOS/dev/branch_yushan/src/buffer_client.cpp
r1094 r1128 26 26 buffer[1] = new char[bufferSize]; 27 27 retBuffer = new CBufferOut(buffer[current], bufferSize); 28 //info(10) << "CClientBuffer: allocated 2 x " << bufferSize << " bytes for server " << serverRank << " with a maximum of " << maxBufferedEvents << " buffered events" << endl; 28 #pragma omp critical (_output) 29 info(10) << "CClientBuffer: allocated 2 x " << bufferSize << " bytes for server " << serverRank << " with a maximum of " << maxBufferedEvents << " buffered events" << endl; 29 30 } 30 31 -
XIOS/dev/branch_yushan/src/calendar.cpp
r1101 r1128 117 117 const CDate& CCalendar::update(int step) 118 118 { 119 //info(20) << "update step : " << step << " timestep " << this->timestep << std::endl; 119 #pragma omp critical (_output) 120 info(80)<< "update step : " << step << " timestep " << this->timestep << std::endl; 120 121 return (this->currentDate = this->getInitDate() + step * this->timestep); 121 122 } -
XIOS/dev/branch_yushan/src/client.cpp
r1126 r1128 11 11 #include "timer.hpp" 12 12 #include "buffer_client.hpp" 13 #include "log.hpp" 14 13 15 14 16 namespace xios 15 17 { 18 extern int test_omp_rank; 19 #pragma omp threadprivate(test_omp_rank) 16 20 17 21 MPI_Comm CClient::intraComm ; … … 24 28 StdOFStream CClient::m_errorStream; 25 29 30 StdOFStream CClient::array_infoStream[10]; 31 26 32 void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm) 27 33 { … … 103 109 MPI_Comm_size(intraComm,&intraCommSize) ; 104 110 MPI_Comm_rank(intraComm,&intraCommRank) ; 111 105 112 #pragma omp critical(_output) 106 113 { 107 info( 50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize114 info(10)<<"intercommCreate::client "<<test_omp_rank<< " "<< &test_omp_rank <<" intraCommSize : "<<intraCommSize 108 115 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader 109 116 <<" globalComm : "<< &(CXios::globalComm) << endl ; 110 117 } 118 119 111 120 112 121 MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; … … 162 171 MPI_Comm_dup(intraComm,&returnComm) ; 163 172 173 174 164 175 } 165 176 … … 167 178 void CClient::registerContext(const string& id,MPI_Comm contextComm) 168 179 { 169 //#pragma omp critical(_output)170 //info(50) << "Client "<<getRank() << " start registerContext using info output" << endl;171 180 172 181 CContext::setCurrent(id) ; … … 175 184 int tmp_rank; 176 185 MPI_Comm_rank(contextComm,&tmp_rank) ; 177 178 // #pragma omp critical (_output)179 //printf("Client %d : client.cpp Client::registerContext %s context add = %p\n", tmp_rank, id, &(*context));180 181 186 182 187 StdString idServer(id); … … 214 219 MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 215 220 216 //#pragma omp critical(_output)217 //info(10)<<"Register new Context : "<<id<<endl ;218 221 #pragma omp critical(_output) 222 info(10)<<" RANK "<< tmp_rank<<" Register new Context : "<<id<<endl ; 223 219 224 220 225 MPI_Comm inter ; … … 224 229 225 230 context->initClient(contextComm,contextInterComm) ; 226 227 // #pragma omp critical (_output) 228 // printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 229 230 //contextInterComms->push_back(contextInterComm); 231 232 231 233 if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 232 234 contextInterComms_ptr->push_back(contextInterComm); … … 251 253 if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 252 254 contextInterComms_ptr->push_back(contextInterComm); 253 //contextInterComms->push_back(contextInterComm); 255 254 256 } 255 257 } … … 286 288 } 287 289 288 289 //info(20) << "Client "<<rank<<" : Client side context is finalized "<< endl ; 290 // report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 291 // report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 292 // report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ; 293 // report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 294 // // report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 295 // report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 296 // report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 297 298 290 #pragma omp critical (_output) 291 info(20) << "Client "<<rank<<" : Client side context is finalized "<< endl ; 292 293 /* #pragma omp critical (_output) 294 { 295 report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 296 report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 297 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ; 298 report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 299 report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 300 report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 301 report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 302 } 303 */ 299 304 } 300 305 … … 325 330 326 331 fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 327 //printf("getrank() = %d, file name = %s\n", getRank(), fileNameClient.str().c_str()); 328 329 fb->open(fileNameClient.str().c_str(), std::ios::out); 330 if (!fb->is_open()) 331 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 332 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 332 333 fb->open(fileNameClient.str().c_str(), std::ios::out); 334 if (!fb->is_open()) 335 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 336 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 333 337 334 338 … … 343 347 void CClient::openInfoStream(const StdString& fileName) 344 348 { 345 std::filebuf* fb = m_infoStream.rdbuf(); 346 openStream(fileName, ".out", fb); 347 348 info.write2File(fb); 349 report.write2File(fb); 349 //std::filebuf* fb = m_infoStream.rdbuf(); 350 351 info_FB[omp_get_thread_num()] = array_infoStream[omp_get_thread_num()].rdbuf(); 352 353 openStream(fileName, ".out", info_FB[omp_get_thread_num()]); 354 355 info.write2File(info_FB[omp_get_thread_num()]); 356 report.write2File(info_FB[omp_get_thread_num()]); 357 350 358 } 351 359 -
XIOS/dev/branch_yushan/src/client.hpp
r1087 r1128 59 59 #pragma omp threadprivate(m_errorStream) 60 60 61 static StdOFStream array_infoStream[10]; 62 61 63 static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb); 62 64 }; -
XIOS/dev/branch_yushan/src/context_server.cpp
r1094 r1128 221 221 { 222 222 finished=true; 223 //info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl; 223 #pragma omp critical (_output) 224 info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl; 224 225 std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(), 225 226 iteMap = mapBufferSize_.end(), itMap; -
XIOS/dev/branch_yushan/src/cxios.cpp
r1126 r1128 14 14 namespace xios 15 15 { 16 17 extern int test_omp_rank; 18 #pragma omp threadprivate(test_omp_rank) 19 16 20 const string CXios::rootFile="./iodef.xml" ; 17 21 const string CXios::xiosCodeId="xios.x" ; 18 22 const string CXios::clientFile="./xios_client"; 19 23 const string CXios::serverFile="./xios_server"; 20 //#pragma omp threadprivate(CXios::rootFile, CXios::xiosCodeId, CXios::clientFile, CXios::serverFile) 24 21 25 22 26 bool CXios::isClient ; 23 27 bool CXios::isServer ; 24 //#pragma omp threadprivate(CXios::isServer, CXios::isClient) 28 25 29 26 30 MPI_Comm CXios::globalComm ; 27 //#pragma omp threadprivate(CXios::globalComm) 31 28 32 29 33 bool CXios::usingOasis ; 30 34 bool CXios::usingServer = false; 31 // #pragma omp threadprivate(CXios::usingOasis, CXios::usingServer) 35 32 36 33 37 double CXios::bufferSizeFactor = 1.0; 34 38 const double CXios::defaultBufferSizeFactor = 1.0; 35 39 StdSize CXios::minBufferSize = 1024 * sizeof(double); 36 //#pragma omp threadprivate(CXios::bufferSizeFactor, CXios::defaultBufferSizeFactor, CXios::minBufferSize) 40 37 41 38 42 bool CXios::printLogs2Files; 39 43 bool CXios::isOptPerformance = true; 40 44 CRegistry* CXios::globalRegistry = 0; 41 //#pragma omp threadprivate(CXios::printLogs2Files, CXios::isOptPerformance) 45 42 46 43 47 … … 46 50 { 47 51 set_new_handler(noMemory); 52 48 53 49 54 #pragma omp critical … … 80 85 bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 81 86 minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 87 82 88 83 89 int num_ep; … … 85 91 { 86 92 num_ep = omp_get_num_threads(); 87 //printf("Client %d: num_ep = %d\n", omp_get_thread_num(), num_ep);88 93 } 89 94 … … 91 96 { 92 97 num_ep = omp_get_num_threads(); 93 //printf("Server %d: num_ep = %d\n", omp_get_thread_num(), num_ep);94 98 } 95 99 … … 109 113 int tmp_rank; 110 114 MPI_Comm_rank(CXios::globalComm, &tmp_rank); 111 if(isClient) printf("client thread %d/%d, globalComm = %p, passage = %p\n", 112 omp_get_thread_num(), tmp_rank, 113 &(CXios::globalComm), passage); 114 //if(isServer) printf("server thread %d/%d, globalComm = %p\n", omp_get_thread_num(), tmp_rank, &globalComm); 115 116 117 test_omp_rank = tmp_rank; 115 118 116 119 } … … 136 139 isServer = !usingServer; 137 140 138 //printf("CXios::initClientSide OK, printLogs2Files = %d\n", printLogs2Files);139 140 141 if (printLogs2Files) 141 142 { 143 #pragma omp critical 142 144 CClient::openInfoStream(clientFile); 143 //CClient::openErrorStream(clientFile);145 CClient::openErrorStream(clientFile); 144 146 } 145 147 else … … 157 159 if (CClient::getRank()==0) 158 160 { 159 //info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ; 161 #pragma omp critical (_output) 162 info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ; 160 163 globalRegistry->toFile("xios_registry.bin") ; 161 164 delete globalRegistry ; 162 165 } 163 166 CClient::closeInfoStream(); 167 164 168 165 169 … … 189 193 190 194 xml::CXMLParser::ParseFile(rootFile, parseList); 191 195 192 196 parseXiosConfig(); 193 197 } -
XIOS/dev/branch_yushan/src/cxios.hpp
r1095 r1128 5 5 #include "mpi.hpp" 6 6 #include "registry.hpp" 7 #ifdef _usingEP 8 //#include "ep_declaration.hpp" 9 #endif 10 7 #include "log.hpp" 11 8 12 9 namespace xios -
XIOS/dev/branch_yushan/src/log.cpp
r523 r1128 1 1 #include "log.hpp" 2 #include <string> 3 #include <iostream> 4 #include <string> 2 5 3 6 namespace xios 4 7 { 8 9 std::filebuf* info_FB[10]; 10 11 5 12 CLog info("info") ; 6 13 CLog report("report") ; 7 14 CLog error("error", cerr.rdbuf()) ; 15 16 17 CLog& CLog::operator()(int l) 18 { 19 if (l<=level) 20 { 21 omp_set_lock( &mutex ); 22 //rdbuf(strBuf_); 23 rdbuf(strBuf_array[omp_get_thread_num()]); 24 *this<<"-> "<<name<<" : " ; 25 omp_unset_lock( &mutex ); 26 } 27 else rdbuf(NULL) ; 28 return *this; 29 } 30 31 32 33 int test_omp_rank; 34 #pragma omp threadprivate(test_omp_rank) 35 36 37 8 38 } -
XIOS/dev/branch_yushan/src/log.hpp
r1081 r1128 5 5 #include <iostream> 6 6 #include <string> 7 #include <stdio.h> 8 #include <omp.h> 7 9 8 10 namespace xios … … 14 16 public : 15 17 CLog(const string& name_, std::streambuf* sBuff = cout.rdbuf()) 16 : ostream(sBuff), level(0), name(name_), strBuf_(sBuff) {} 17 CLog& operator()(int l) 18 : ostream(cout.rdbuf()), level(0), name(name_), strBuf_(sBuff) 18 19 { 19 if (l<=level) 20 { 21 rdbuf(strBuf_); 22 *this<<"-> "<<name<<" : " ; 23 } 24 else rdbuf(NULL) ; 25 return *this; 20 omp_init_lock( &mutex ); 21 for(int i=0; i<10; i++) 22 strBuf_array[i] = sBuff; 26 23 } 24 25 ~CLog() 26 { 27 omp_destroy_lock( &mutex ); 28 } 29 30 31 CLog& operator()(int l); 27 32 void setLevel(int l) {level=l; } 28 33 int getLevel() {return level ;} … … 46 51 * \param [in] pointer to new streambuf 47 52 */ 48 void changeStreamBuff(std::streambuf* sBuff) { strBuf_ = sBuff; rdbuf(sBuff); } 53 void changeStreamBuff(std::streambuf* sBuff) 54 { 55 strBuf_ = sBuff; 56 strBuf_array[omp_get_thread_num()] = sBuff; 57 rdbuf(sBuff); 58 } 49 59 50 60 int level ; 51 61 string name ; 52 62 std::streambuf* strBuf_; 63 std::streambuf* strBuf_array[10]; 64 omp_lock_t mutex; 53 65 }; 54 66 … … 56 68 extern CLog report; 57 69 extern CLog error; 70 71 72 extern std::filebuf* info_FB[10]; 73 74 58 75 } 59 76 #endif -
XIOS/dev/branch_yushan/src/node/context.cpp
r1115 r1128 247 247 hasClient=true; 248 248 249 #pragma omp critical 249 250 250 client = new CContextClient(this, intraComm, interComm, cxtServer); 251 251 … … 253 253 MPI_Comm_rank(intraComm, &tmp_rank); 254 254 MPI_Barrier(intraComm); 255 256 // #pragma omp critical (_output)257 // printf("Client %d : context.cpp client = new CContextClient, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ;258 255 259 #pragma omp critical 256 260 257 registryIn=new CRegistry(intraComm); 261 262 258 263 259 registryIn->setPath(getId()) ; 264 265 // #pragma omp critical (_output) 266 // printf("Client %d : context.cpp registryIn->setPath, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 260 267 261 268 262 if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ; … … 825 819 MPI_Comm_rank(MPI_COMM_WORLD, &myRank); 826 820 827 //printf("myRank = %d, in postProcessing, isPostProcessed = %d\n", myRank, isPostProcessed);828 821 if (isPostProcessed) return; 829 822 … … 834 827 ERROR("CContext::postProcessing()", << "A timestep must be defined for the context \"" << getId() << "!\"") 835 828 // Calendar first update to set the current date equals to the start date 836 calendar->update(0); //printf("myRank = %d, calendar->update(0) OK\n", myRank);829 calendar->update(0); 837 830 838 831 // Find all inheritance in xml structure 839 this->solveAllInheritance(); //printf("myRank = %d, this->solveAllInheritance OK\n", myRank);832 this->solveAllInheritance(); 840 833 841 834 // Check if some axis, domains or grids are eligible to for compressed indexed output. 842 835 // Warning: This must be done after solving the inheritance and before the rest of post-processing 843 checkAxisDomainsGridsEligibilityForCompressedOutput(); //printf("myRank = %d, checkAxisDomainsGridsEligibilityForCompressedOutput OK\n", myRank);836 checkAxisDomainsGridsEligibilityForCompressedOutput(); 844 837 845 838 // Check if some automatic time series should be generated 846 839 // Warning: This must be done after solving the inheritance and before the rest of post-processing 847 prepareTimeseries(); //printf("myRank = %d, prepareTimeseries OK\n", myRank);840 prepareTimeseries(); 848 841 849 842 //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers sortir. 850 this->findEnabledFiles(); //printf("myRank = %d, this->findEnabledFiles OK\n", myRank);851 this->findEnabledReadModeFiles(); //printf("myRank = %d, this->findEnabledReadModeFiles OK\n", myRank);843 this->findEnabledFiles(); 844 this->findEnabledReadModeFiles(); 852 845 853 846 // Find all enabled fields of each file 854 this->findAllEnabledFields(); //printf("myRank = %d, this->findAllEnabledFields OK\n", myRank);855 this->findAllEnabledFieldsInReadModeFiles(); //printf("myRank = %d, this->findAllEnabledFieldsInReadModeFiles OK\n", myRank);847 this->findAllEnabledFields(); 848 this->findAllEnabledFieldsInReadModeFiles(); 856 849 857 850 if (hasClient && !hasServer) 858 851 { 859 852 // Try to read attributes of fields in file then fill in corresponding grid (or domain, axis) 860 this->readAttributesOfEnabledFieldsInReadModeFiles(); //printf("myRank = %d, this->readAttributesOfEnabledFieldsInReadModeFiles OK\n", myRank);853 this->readAttributesOfEnabledFieldsInReadModeFiles(); 861 854 } 862 855 863 856 // Only search and rebuild all reference objects of enable fields, don't transform 864 this->solveOnlyRefOfEnabledFields(false); //printf("myRank = %d, this->solveOnlyRefOfEnabledFields(false) OK\n", myRank);857 this->solveOnlyRefOfEnabledFields(false); 865 858 866 859 // Search and rebuild all reference object of enabled fields 867 this->solveAllRefOfEnabledFields(false); //printf("myRank = %d, this->solveAllRefOfEnabledFields(false) OK\n", myRank);860 this->solveAllRefOfEnabledFields(false); 868 861 869 862 // Find all fields with read access from the public API 870 findFieldsWithReadAccess(); //printf("myRank = %d, findFieldsWithReadAccess OK\n", myRank);863 findFieldsWithReadAccess(); 871 864 // and solve the all reference for them 872 solveAllRefOfFieldsWithReadAccess(); //printf("myRank = %d, solveAllRefOfFieldsWithReadAccess OK\n", myRank);865 solveAllRefOfFieldsWithReadAccess(); 873 866 874 867 isPostProcessed = true; … … 1159 1152 void CContext::updateCalendar(int step) 1160 1153 { 1161 //info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;1162 1154 calendar->update(step); 1163 //info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;1164 1155 1165 1156 if (hasClient) -
XIOS/dev/branch_yushan/src/node/transformation.hpp
r1109 r1128 34 34 typedef CTransformation<T>* (*CreateTransformationCallBack)(const StdString&, xml::CXMLNode*); 35 35 typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap; 36 static CallBackMap* transformationCreationCallBacks_; 36 static CallBackMap* transformationCreationCallBacks_; 37 37 //#pragma omp threadprivate(transformationCreationCallBacks_) 38 38 … … 45 45 46 46 template<typename T> 47 typename CTransformation<T>::CallBackMap* CTransformation<T>::transformationCreationCallBacks_ = 0; 47 typename CTransformation<T>::CallBackMap* CTransformation<T>::transformationCreationCallBacks_ = 0;//CTransformation<T>::CallBackMap(); 48 48 49 49 template<typename T> -
XIOS/dev/branch_yushan/src/test/test_omp.f90
r1115 r1128 83 83 field_A(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:) 84 84 85 print*, "xios init OK", rank, size85 !print*, "xios init OK", rank, size 86 86 87 87 CALL xios_context_initialize("test",comm) 88 88 89 print*, "xios_context_initialize OK", rank, size89 !print*, "xios_context_initialize OK", rank, size 90 90 91 91 CALL xios_get_handle("test",ctx_hdl) … … 94 94 95 95 CALL xios_get_calendar_type(calendar_type) 96 print*, "xios_get_calendar_type OK", rank, size96 !print*, "xios_get_calendar_type OK", rank, size 97 97 98 98 CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; … … 101 101 CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 102 102 CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 103 103 !print*, "test block OK", rank, size 104 104 105 105 CALL xios_get_handle("field_definition",fieldgroup_hdl) … … 113 113 dtime%second = 3600 114 114 CALL xios_set_timestep(dtime) 115 print*, "xios_set_timestep OK", rank, size115 !print*, "xios_set_timestep OK", rank, size 116 116 117 117 ! The calendar is created as soon as the calendar type is defined. This way 118 118 ! calendar operations can be used before the context definition is closed 119 119 CALL xios_get_time_origin(date) 120 PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year)121 PRINT *, "--> day length = ", xios_get_day_length_in_seconds()120 !PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year) 121 !PRINT *, "--> day length = ", xios_get_day_length_in_seconds() 122 122 CALL xios_date_convert_to_string(date, date_str) 123 PRINT *, "time_origin = ", date_str124 PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date)125 PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date)126 PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date)127 PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date)128 PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date)123 !PRINT *, "time_origin = ", date_str 124 !PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date) 125 !PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date) 126 !PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date) 127 !PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date) 128 !PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date) 129 129 dtime%timestep = 1 130 130 dtime = 0.5 * dtime 131 131 CALL xios_duration_convert_to_string(dtime, dtime_str) 132 PRINT *, "duration = ", dtime_str132 !PRINT *, "duration = ", dtime_str 133 133 date = date + 3 * (dtime + dtime) 134 134 CALL xios_date_convert_to_string(date, date_str) 135 PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str136 PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date)137 PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour)135 !PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str 136 !PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date) 137 !PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour) 138 138 139 139 ni=0 ; lonvalue(:,:)=0; 140 140 CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue) 141 print *,"ni",ni141 !print *,"ni",ni 142 142 !print *,"lonvalue",lonvalue; 143 143 144 144 CALL xios_is_defined_field_attr("field_A",enabled=ok) 145 PRINT *,"field_A : attribute enabled is defined ? ",ok145 !PRINT *,"field_A : attribute enabled is defined ? ",ok 146 146 147 147 CALL xios_close_context_definition() 148 print*, "xios_close_context_definition OK"148 !print*, "xios_close_context_definition OK" 149 149 150 150 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") … … 157 157 158 158 CALL xios_context_finalize() 159 print*, "xios_context_finalize OK", rank, size159 !print*, "xios_context_finalize OK", rank, size 160 160 161 161 CALL xios_finalize() … … 170 170 !$omp barrier 171 171 172 print*, "MPI_COMM_FREE OK", rank, size172 !print*, "MPI_COMM_FREE OK", rank, size 173 173 174 174
Note: See TracChangeset
for help on using the changeset viewer.