Changeset 1128


Ignore:
Timestamp:
05/11/17 16:12:23 (7 years ago)
Author:
yushan
Message:

log OK with threads

Location:
XIOS/dev/branch_yushan
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/arch/arch-CURIE_Intel.fcm

    r1069 r1128  
    33################################################################################ 
    44 
    5 %CCOMPILER      mpicc -openmp -D_intelmpi -D_usingEP  
     5%CCOMPILER      mpicc -openmp -D_intelmpi -D_usingEP   
    66%FCOMPILER      mpif90 -openmp 
    77%LINKER         mpif90 -openmp -Wl,-rpath -Wl,$HOME/lib/netcdf_f_intel/lib 
  • XIOS/dev/branch_yushan/bld.cfg

    r1109 r1128  
    3333#bld::target libxios.a  
    3434#bld::target generate_fortran_interface.exe  
    35 bld::target xios_server.exe  
     35#bld::target xios_server.exe  
    3636#bld::target test_remap.exe 
    3737#bld::target test_new_features.exe test_unstruct_complete.exe  
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_fortran.cpp

    r1087 r1128  
    3131      { 
    3232        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); 
    3434      } 
    3535    } 
     
    5454      MPI_Comm comm_ptr; 
    5555      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); 
    5757      return  comm_ptr; 
    5858    } 
  • XIOS/dev/branch_yushan/src/buffer_client.cpp

    r1094 r1128  
    2626    buffer[1] = new char[bufferSize]; 
    2727    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; 
    2930  } 
    3031 
  • XIOS/dev/branch_yushan/src/calendar.cpp

    r1101 r1128  
    117117      const CDate& CCalendar::update(int step) 
    118118      { 
    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; 
    120121        return (this->currentDate = this->getInitDate() + step * this->timestep); 
    121122      } 
  • XIOS/dev/branch_yushan/src/client.cpp

    r1126 r1128  
    1111#include "timer.hpp" 
    1212#include "buffer_client.hpp" 
     13#include "log.hpp" 
     14 
    1315 
    1416namespace xios 
    1517{ 
     18    extern int test_omp_rank; 
     19    #pragma omp threadprivate(test_omp_rank) 
    1620 
    1721    MPI_Comm CClient::intraComm ; 
     
    2428    StdOFStream CClient::m_errorStream; 
    2529 
     30    StdOFStream CClient::array_infoStream[10]; 
     31 
    2632    void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm) 
    2733    { 
     
    103109            MPI_Comm_size(intraComm,&intraCommSize) ; 
    104110            MPI_Comm_rank(intraComm,&intraCommRank) ; 
     111             
    105112            #pragma omp critical(_output) 
    106113            { 
    107               info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 
     114              info(10)<<"intercommCreate::client "<<test_omp_rank<< " "<< &test_omp_rank <<" intraCommSize : "<<intraCommSize 
    108115                 <<" intraCommRank :"<<intraCommRank<<"  serverLeader "<< serverLeader 
    109116                 <<" globalComm : "<< &(CXios::globalComm) << endl ;   
    110117            } 
     118 
     119             
    111120             
    112121            MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; 
     
    162171      MPI_Comm_dup(intraComm,&returnComm) ; 
    163172 
     173       
     174 
    164175    } 
    165176 
     
    167178    void CClient::registerContext(const string& id,MPI_Comm contextComm) 
    168179    { 
    169       //#pragma omp critical(_output) 
    170       //info(50) << "Client "<<getRank() << " start registerContext using info output" << endl; 
    171180 
    172181      CContext::setCurrent(id) ; 
     
    175184      int tmp_rank; 
    176185      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        
    181186       
    182187      StdString idServer(id); 
     
    214219        MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 
    215220         
    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 
    219224 
    220225        MPI_Comm inter ; 
     
    224229         
    225230        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         
    231233        if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 
    232234        contextInterComms_ptr->push_back(contextInterComm); 
     
    251253        if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 
    252254        contextInterComms_ptr->push_back(contextInterComm); 
    253         //contextInterComms->push_back(contextInterComm); 
     255 
    254256      } 
    255257    } 
     
    286288      } 
    287289       
    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*/ 
    299304   } 
    300305 
     
    325330 
    326331      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).");   
    333337       
    334338       
     
    343347    void CClient::openInfoStream(const StdString& fileName) 
    344348    { 
    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       
    350358    } 
    351359 
  • XIOS/dev/branch_yushan/src/client.hpp

    r1087 r1128  
    5959        #pragma omp threadprivate(m_errorStream) 
    6060 
     61        static StdOFStream array_infoStream[10]; 
     62 
    6163        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb); 
    6264    }; 
  • XIOS/dev/branch_yushan/src/context_server.cpp

    r1094 r1128  
    221221    { 
    222222      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; 
    224225      std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(), 
    225226                                             iteMap = mapBufferSize_.end(), itMap; 
  • XIOS/dev/branch_yushan/src/cxios.cpp

    r1126 r1128  
    1414namespace xios 
    1515{ 
     16 
     17  extern int test_omp_rank; 
     18  #pragma omp threadprivate(test_omp_rank) 
     19 
    1620  const string CXios::rootFile="./iodef.xml" ; 
    1721  const string CXios::xiosCodeId="xios.x" ; 
    1822  const string CXios::clientFile="./xios_client"; 
    1923  const string CXios::serverFile="./xios_server"; 
    20   //#pragma omp threadprivate(CXios::rootFile, CXios::xiosCodeId, CXios::clientFile, CXios::serverFile) 
     24 
    2125 
    2226  bool CXios::isClient ; 
    2327  bool CXios::isServer ; 
    24   //#pragma omp threadprivate(CXios::isServer, CXios::isClient) 
     28 
    2529 
    2630  MPI_Comm CXios::globalComm ; 
    27   //#pragma omp threadprivate(CXios::globalComm) 
     31 
    2832   
    2933  bool CXios::usingOasis ; 
    3034  bool CXios::usingServer = false; 
    31  // #pragma omp threadprivate(CXios::usingOasis, CXios::usingServer) 
     35 
    3236 
    3337  double CXios::bufferSizeFactor = 1.0; 
    3438  const double CXios::defaultBufferSizeFactor = 1.0; 
    3539  StdSize CXios::minBufferSize = 1024 * sizeof(double); 
    36   //#pragma omp threadprivate(CXios::bufferSizeFactor, CXios::defaultBufferSizeFactor, CXios::minBufferSize) 
     40 
    3741 
    3842  bool CXios::printLogs2Files; 
    3943  bool CXios::isOptPerformance = true; 
    4044  CRegistry* CXios::globalRegistry = 0; 
    41   //#pragma omp threadprivate(CXios::printLogs2Files, CXios::isOptPerformance) 
     45 
    4246 
    4347 
     
    4650  {     
    4751    set_new_handler(noMemory); 
     52     
    4853     
    4954    #pragma omp critical 
     
    8085    bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 
    8186    minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 
     87 
    8288  
    8389    int num_ep; 
     
    8591    {  
    8692      num_ep = omp_get_num_threads(); 
    87       //printf("Client %d: num_ep = %d\n", omp_get_thread_num(), num_ep); 
    8893    } 
    8994     
     
    9196    {  
    9297      num_ep = omp_get_num_threads(); 
    93       //printf("Server %d: num_ep = %d\n", omp_get_thread_num(), num_ep);  
    9498    } 
    9599     
     
    109113    int tmp_rank; 
    110114    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; 
    115118     
    116119  } 
     
    136139    isServer = !usingServer; 
    137140     
    138     //printf("CXios::initClientSide OK, printLogs2Files = %d\n", printLogs2Files); 
    139      
    140141    if (printLogs2Files) 
    141142    { 
     143      #pragma omp critical 
    142144      CClient::openInfoStream(clientFile); 
    143       //CClient::openErrorStream(clientFile); 
     145      CClient::openErrorStream(clientFile); 
    144146    } 
    145147    else 
     
    157159     if (CClient::getRank()==0) 
    158160     { 
    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 ; 
    160163       globalRegistry->toFile("xios_registry.bin") ; 
    161164       delete globalRegistry ; 
    162165     } 
    163166     CClient::closeInfoStream(); 
     167 
    164168   
    165169 
     
    189193 
    190194    xml::CXMLParser::ParseFile(rootFile, parseList); 
    191  
     195     
    192196    parseXiosConfig(); 
    193197  } 
  • XIOS/dev/branch_yushan/src/cxios.hpp

    r1095 r1128  
    55#include "mpi.hpp" 
    66#include "registry.hpp" 
    7 #ifdef _usingEP 
    8 //#include "ep_declaration.hpp" 
    9 #endif 
    10  
     7#include "log.hpp" 
    118 
    129namespace xios 
  • XIOS/dev/branch_yushan/src/log.cpp

    r523 r1128  
    11#include "log.hpp" 
     2#include <string> 
     3#include <iostream> 
     4#include <string> 
    25 
    36namespace xios 
    47{ 
     8 
     9  std::filebuf* info_FB[10]; 
     10 
     11 
    512  CLog info("info") ; 
    613  CLog report("report") ; 
    714  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 
    838} 
  • XIOS/dev/branch_yushan/src/log.hpp

    r1081 r1128  
    55#include <iostream> 
    66#include <string> 
     7#include <stdio.h> 
     8#include <omp.h> 
    79 
    810namespace xios 
     
    1416    public : 
    1517    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)  
    1819    { 
    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; 
    2623    } 
     24 
     25    ~CLog() 
     26    { 
     27      omp_destroy_lock( &mutex ); 
     28    } 
     29 
     30 
     31    CLog& operator()(int l); 
    2732    void setLevel(int l) {level=l; } 
    2833    int  getLevel() {return level ;} 
     
    4651     * \param [in] pointer to new streambuf 
    4752    */ 
    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    } 
    4959 
    5060    int level ; 
    5161    string name ; 
    5262    std::streambuf* strBuf_; 
     63    std::streambuf* strBuf_array[10]; 
     64    omp_lock_t mutex; 
    5365  }; 
    5466 
     
    5668  extern CLog report; 
    5769  extern CLog error; 
     70 
     71 
     72  extern std::filebuf* info_FB[10]; 
     73 
     74 
    5875} 
    5976#endif 
  • XIOS/dev/branch_yushan/src/node/context.cpp

    r1115 r1128  
    247247     hasClient=true; 
    248248      
    249      #pragma omp critical 
     249 
    250250     client = new CContextClient(this, intraComm, interComm, cxtServer); 
    251251 
     
    253253     MPI_Comm_rank(intraComm, &tmp_rank); 
    254254     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) ; 
    258255      
    259      #pragma omp critical 
     256 
    260257     registryIn=new CRegistry(intraComm); 
    261       
    262  
     258     
    263259     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    
    267261 
    268262     if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ; 
     
    825819     MPI_Comm_rank(MPI_COMM_WORLD, &myRank); 
    826820 
    827      //printf("myRank = %d, in postProcessing, isPostProcessed = %d\n", myRank, isPostProcessed); 
    828821     if (isPostProcessed) return; 
    829822 
     
    834827        ERROR("CContext::postProcessing()", << "A timestep must be defined for the context \"" << getId() << "!\"") 
    835828      // 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);  
    837830 
    838831      // Find all inheritance in xml structure 
    839       this->solveAllInheritance();  //printf("myRank = %d, this->solveAllInheritance OK\n", myRank); 
     832      this->solveAllInheritance();   
    840833 
    841834      // Check if some axis, domains or grids are eligible to for compressed indexed output. 
    842835      // 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();  
    844837 
    845838      // Check if some automatic time series should be generated 
    846839      // 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();  
    848841 
    849842      //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(); 
    852845 
    853846      // 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(); 
    856849 
    857850     if (hasClient && !hasServer) 
    858851     { 
    859852      // 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();  
    861854     } 
    862855 
    863856      // 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);   
    865858 
    866859      // 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);   
    868861 
    869862      // Find all fields with read access from the public API 
    870       findFieldsWithReadAccess();  //printf("myRank = %d, findFieldsWithReadAccess OK\n", myRank); 
     863      findFieldsWithReadAccess();  
    871864      // and solve the all reference for them 
    872       solveAllRefOfFieldsWithReadAccess();  //printf("myRank = %d, solveAllRefOfFieldsWithReadAccess OK\n", myRank); 
     865      solveAllRefOfFieldsWithReadAccess();   
    873866 
    874867      isPostProcessed = true; 
     
    11591152   void CContext::updateCalendar(int step) 
    11601153   { 
    1161       //info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl; 
    11621154      calendar->update(step); 
    1163       //info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl; 
    11641155 
    11651156      if (hasClient) 
  • XIOS/dev/branch_yushan/src/node/transformation.hpp

    r1109 r1128  
    3434      typedef CTransformation<T>* (*CreateTransformationCallBack)(const StdString&, xml::CXMLNode*); 
    3535      typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap; 
    36       static CallBackMap* transformationCreationCallBacks_; 
     36      static CallBackMap* transformationCreationCallBacks_;   
    3737      //#pragma omp threadprivate(transformationCreationCallBacks_) 
    3838 
     
    4545 
    4646  template<typename T> 
    47   typename CTransformation<T>::CallBackMap* CTransformation<T>::transformationCreationCallBacks_ = 0; //CTransformation<T>::CallBackMap(); 
     47  typename CTransformation<T>::CallBackMap* CTransformation<T>::transformationCreationCallBacks_ = 0;//CTransformation<T>::CallBackMap(); 
    4848 
    4949  template<typename T> 
  • XIOS/dev/branch_yushan/src/test/test_omp.f90

    r1115 r1128  
    8383    field_A(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:) 
    8484 
    85     print*, "xios init OK", rank, size 
     85    !print*, "xios init OK", rank, size 
    8686 
    8787    CALL xios_context_initialize("test",comm) 
    8888 
    89     print*, "xios_context_initialize OK", rank, size 
     89    !print*, "xios_context_initialize OK", rank, size 
    9090 
    9191    CALL xios_get_handle("test",ctx_hdl) 
     
    9494   
    9595    CALL xios_get_calendar_type(calendar_type) 
    96     print*, "xios_get_calendar_type OK", rank, size 
     96    !print*, "xios_get_calendar_type OK", rank, size 
    9797 
    9898    CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 
     
    101101    CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 
    102102    CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 
    103      print*, "test block OK", rank, size 
     103    !print*, "test block OK", rank, size 
    104104 
    105105    CALL xios_get_handle("field_definition",fieldgroup_hdl) 
     
    113113    dtime%second = 3600 
    114114    CALL xios_set_timestep(dtime) 
    115     print*, "xios_set_timestep OK", rank, size     
     115    !print*, "xios_set_timestep OK", rank, size     
    116116 
    117117   ! The calendar is created as soon as the calendar type is defined. This way 
    118118   ! calendar operations can be used before the context definition is closed 
    119119   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() 
    122122   CALL xios_date_convert_to_string(date, date_str) 
    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) 
     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) 
    129129   dtime%timestep = 1 
    130130   dtime = 0.5 * dtime 
    131131   CALL xios_duration_convert_to_string(dtime, dtime_str) 
    132    PRINT *, "duration = ", dtime_str 
     132   !PRINT *, "duration = ", dtime_str 
    133133   date = date + 3 * (dtime + dtime) 
    134134   CALL xios_date_convert_to_string(date, date_str) 
    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) 
     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) 
    138138 
    139139   ni=0 ; lonvalue(:,:)=0; 
    140140   CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue) 
    141    print *,"ni",ni 
     141   !print *,"ni",ni 
    142142   !print *,"lonvalue",lonvalue; 
    143143 
    144144   CALL xios_is_defined_field_attr("field_A",enabled=ok) 
    145    PRINT *,"field_A : attribute enabled is defined ? ",ok  
     145   !PRINT *,"field_A : attribute enabled is defined ? ",ok  
    146146 
    147147   CALL xios_close_context_definition() 
    148    print*, "xios_close_context_definition OK"   
     148   !print*, "xios_close_context_definition OK"   
    149149 
    150150   PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 
     
    157157 
    158158    CALL xios_context_finalize() 
    159     print*, "xios_context_finalize OK", rank, size 
     159    !print*, "xios_context_finalize OK", rank, size 
    160160 
    161161    CALL xios_finalize() 
     
    170170     !$omp barrier 
    171171 
    172      print*, "MPI_COMM_FREE OK", rank, size 
     172     !print*, "MPI_COMM_FREE OK", rank, size 
    173173 
    174174 
Note: See TracChangeset for help on using the changeset viewer.