Changeset 1902


Ignore:
Timestamp:
06/16/20 19:12:05 (8 weeks ago)
Author:
yushan
Message:

xios-2.5 : revert the previous commit

Location:
XIOS/branchs/xios-2.5/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • XIOS/branchs/xios-2.5/src/client.cpp

    r1900 r1902  
    247247      } 
    248248 
     249 
     250      /* MPI_Comm_free(&interComm); */ // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    249251      for (std::list<MPI_Comm>::iterator it = contextInterComms.begin(); it != contextInterComms.end(); it++) 
    250         MPI_Comm_free(&(*it)); 
    251       MPI_Comm_free(&interComm); 
     252        /* MPI_Comm_free(&(*it)) */ ; // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    252253      MPI_Comm_free(&intraComm); 
    253254 
     
    310311        fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 
    311312 
     313 
    312314      fb->open(fileNameClient.str().c_str(), std::ios::out); 
    313315      if (!fb->is_open()) 
    314316        ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 
    315               << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the client log(s)."); 
     317              << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 
    316318    } 
    317319 
  • XIOS/branchs/xios-2.5/src/data_output.hpp

    r1900 r1902  
    5959            virtual void writeTimeDimension_(void)           = 0; 
    6060            virtual void writeTimeAxis_ (CField*     field, 
    61                                          const boost::shared_ptr<CCalendar> cal) = 0; 
     61                                         const shared_ptr<CCalendar> cal) = 0; 
    6262 
    6363            /// Propriétés protégées /// 
  • XIOS/branchs/xios-2.5/src/group_factory_decl.cpp

    r1900 r1902  
    55{ 
    66# define  macro(U) \ 
    7   template void CGroupFactory::AddGroup<U>(boost::shared_ptr<U> pgroup,boost::shared_ptr<U> cgroup); \ 
    8   template void CGroupFactory::AddChild<U>(boost::shared_ptr<U> group, boost::shared_ptr<U::RelChild> child); \ 
    9   template boost::shared_ptr<U>  CGroupFactory::GetGroup<U>(boost::shared_ptr<U> group, const StdString & id); \ 
    10   template boost::shared_ptr<U::RelChild> CGroupFactory::GetChild<U>(boost::shared_ptr<U> group, const StdString & id); \ 
    11   template int CGroupFactory::GetGroupNum<U>(boost::shared_ptr<U> group); \ 
    12   template int CGroupFactory::GetGroupIdNum<U>(boost::shared_ptr<U> group); \ 
    13   template int CGroupFactory::GetChildNum<U>(boost::shared_ptr<U> group); \ 
     7  template void CGroupFactory::AddGroup<U>(shared_ptr<U> pgroup,shared_ptr<U> cgroup); \ 
     8  template void CGroupFactory::AddChild<U>(shared_ptr<U> group, shared_ptr<U::RelChild> child); \ 
     9  template shared_ptr<U>  CGroupFactory::GetGroup<U>(shared_ptr<U> group, const StdString & id); \ 
     10  template shared_ptr<U::RelChild> CGroupFactory::GetChild<U>(shared_ptr<U> group, const StdString & id); \ 
     11  template int CGroupFactory::GetGroupNum<U>(shared_ptr<U> group); \ 
     12  template int CGroupFactory::GetGroupIdNum<U>(shared_ptr<U> group); \ 
     13  template int CGroupFactory::GetChildNum<U>(shared_ptr<U> group); \ 
    1414  template int CGroupFactory::GetChildIdNum<U>(boost::shared_ptr<U> group); \ 
    15   template bool CGroupFactory::HasGroup<U>(boost::shared_ptr<U> group, const StdString & id); \ 
     15  template bool CGroupFactory::HasGroup<U>(shared_ptr<U> group, const StdString & id); \ 
    1616  template bool CGroupFactory::HasChild<U>(boost::shared_ptr<U> group, const StdString & id); \ 
    17   template boost::shared_ptr<U> CGroupFactory::CreateGroup<U>(boost::shared_ptr<U> group, const StdString & id ); \ 
    18   template boost::shared_ptr<U::RelChild>  CGroupFactory::CreateChild<U>(boost::shared_ptr<U> group, const StdString & id); 
     17  template shared_ptr<U> CGroupFactory::CreateGroup<U>(shared_ptr<U> group, const StdString & id ); \ 
     18  template shared_ptr<U::RelChild>  CGroupFactory::CreateChild<U>(shared_ptr<U> group, const StdString & id); 
    1919 
    2020  macro(CFieldGroup) 
  • XIOS/branchs/xios-2.5/src/node/axis.cpp

    r1900 r1902  
    623623       
    624624        std::vector<int> serverZeroIndex; 
    625         serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair(indexBegin, indexEnd), 0);       
     625        serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0);       
    626626 
    627627        std::list<int> serverZeroIndexLeader; 
  • XIOS/branchs/xios-2.5/src/node/context.cpp

    r1900 r1902  
    2323namespace xios { 
    2424 
    25   boost::shared_ptr<CContextGroup> CContext::root; 
     25  shared_ptr<CContextGroup> CContext::root; 
    2626 
    2727   /// ////////////////////// Définitions ////////////////////// /// 
     
    6666   CContextGroup* CContext::getRoot(void) 
    6767   { 
    68       if (root.get()==NULL) root=boost::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
     68      if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
    6969      return root.get(); 
    7070   } 
     
    476476         //! Free internally allocated communicators 
    477477         for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    478            MPI_Comm_free(&(*it)); 
     478           /* MPI_Comm_free(&(*it)) */ ; // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    479479         comms.clear(); 
    480480 
     
    518518         //! Free internally allocated communicators 
    519519         for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    520            MPI_Comm_free(&(*it)); 
     520           /* MPI_Comm_free(&(*it)) */;  // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    521521         comms.clear(); 
    522522 
     
    532532   { 
    533533     for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    534        MPI_Comm_free(&(*it)); 
     534       /* MPI_Comm_free(&(*it)) */ ; // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    535535     comms.clear(); 
    536536   } 
  • XIOS/branchs/xios-2.5/src/node/context.hpp

    r1900 r1902  
    241241 
    242242         // Context root 
    243          static boost::shared_ptr<CContextGroup> root; 
     243         static shared_ptr<CContextGroup> root; 
    244244 
    245245         // Determine context on client or not 
  • XIOS/branchs/xios-2.5/src/node/domain.cpp

    r1900 r1902  
    18341834           CServerDistributionDescription serverDescription(nGlobDomain, nbServer); 
    18351835           std::vector<int> serverZeroIndex; 
    1836            if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair(indexBegin, indexEnd), 0); 
    1837            else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair(indexBegin, indexEnd), 1); 
     1836           if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0); 
     1837           else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 1); 
    18381838 
    18391839           std::list<int> serverZeroIndexLeader; 
  • XIOS/branchs/xios-2.5/src/node/file.cpp

    r1900 r1902  
    545545         if (isOpen) data_out->closeFile(); 
    546546 
    547         data_out = boost::shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention, 
     547        data_out = shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention, 
    548548                                                              fileComm, multifile, isCollective, time_counter_name)); 
    549549        isOpen = true; 
     
    669669      bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 
    670670      if (time_counter_name.isEmpty()) 
    671         data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 
     671        data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 
    672672      else 
    673         data_in = boost::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 
     673        data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 
    674674      isOpen = true; 
    675675    } 
  • XIOS/branchs/xios-2.5/src/object_factory_decl.cpp

    r1900 r1902  
    55{ 
    66#define macro(U) \ 
    7   template boost::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id);  \ 
    8   template boost::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \ 
    9   template boost::shared_ptr<U> CObjectFactory::GetObject<U>(const U* const object); \ 
     7  template shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id);  \ 
     8  template shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \ 
     9  template shared_ptr<U> CObjectFactory::GetObject<U>(const U* const object); \ 
    1010  template int CObjectFactory::GetObjectNum<U>(void); \ 
    1111  template int CObjectFactory::GetObjectIdNum<U>(void); \ 
    12   template const std::vector<boost::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 
     12  template const std::vector<shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 
    1313  template bool CObjectFactory::HasObject<U>(const StdString& id); \ 
    1414  template bool CObjectFactory::HasObject<U>(const StdString& context,const StdString& id); \ 
  • XIOS/branchs/xios-2.5/src/object_template.hpp

    r1900 r1902  
    8383         static T* get(const string& contextId, const string& id) ; 
    8484         T* get(void) ; 
    85          boost::shared_ptr<T> getShared(void) ; 
    86          static boost::shared_ptr<T> getShared(const T* ptr) ; 
     85         shared_ptr<T> getShared(void) ; 
     86         static shared_ptr<T> getShared(const T* ptr) ; 
    8787 
    8888         static T* create(const string& id=string("")) ; 
  • XIOS/branchs/xios-2.5/src/object_template_impl.hpp

    r1900 r1902  
    412412 
    413413   template <typename T> 
    414    boost::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
     414   shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
    415415   { 
    416416     return CObjectFactory::GetObject<T>(ptr); 
     
    418418 
    419419   template <typename T> 
    420    boost::shared_ptr<T> CObjectTemplate<T>::getShared(void) 
     420   shared_ptr<T> CObjectTemplate<T>::getShared(void) 
    421421   { 
    422422     return CObjectFactory::GetObject<T>((T*)this); 
     
    426426   const vector<T*> CObjectTemplate<T>::getAll() 
    427427   { 
    428      const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
     428     const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
    429429     vector<T*> vect; 
    430430 
    431      typename vector<boost::shared_ptr<T> >::const_iterator it; 
     431     typename vector<shared_ptr<T> >::const_iterator it; 
    432432     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    433433     return vect; 
     
    437437   const vector<T*> CObjectTemplate<T>::getAll(const string & id) 
    438438   { 
    439      const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
     439     const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
    440440     vector<T*> vect; 
    441441 
    442      typename vector<boost::shared_ptr<T> >::const_iterator it; 
     442     typename vector<shared_ptr<T> >::const_iterator it; 
    443443     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    444444     return vect; 
  • XIOS/branchs/xios-2.5/src/server.cpp

    r1900 r1902  
    404404 
    405405      for (std::list<MPI_Comm>::iterator it = contextInterComms.begin(); it != contextInterComms.end(); it++) 
    406         MPI_Comm_free(&(*it)); 
     406        /* MPI_Comm_free(&(*it)) */; // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    407407 
    408408      for (std::list<MPI_Comm>::iterator it = contextIntraComms.begin(); it != contextIntraComms.end(); it++) 
     
    416416 
    417417        for (std::list<MPI_Comm>::iterator it = interCommRight.begin(); it != interCommRight.end(); it++) 
    418           MPI_Comm_free(&(*it)); 
     418          /* MPI_Comm_free(&(*it)) */ ; // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    419419 
    420420      MPI_Comm_free(&intraComm); 
     
    478478                MPI_Send(&msg,1,MPI_INT,0,0,*itr) ; 
    479479              } 
    480               MPI_Comm_free(&(*it)); 
     480              /* MPI_Comm_free(&(*it)); */ // WARNING remove freeing communicator !! --> deadlock raised, to be checked 
    481481              interCommLeft.erase(it) ; 
    482482              break ; 
     
    791791      if (!fb->is_open()) 
    792792        ERROR("void CServer::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 
    793               << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the server log(s)."); 
     793              << std::endl << "Can not open <" << fileNameClient << "> file to write the server log(s)."); 
    794794    } 
    795795 
Note: See TracChangeset for help on using the changeset viewer.