Changeset 276


Ignore:
Timestamp:
09/18/11 23:56:48 (13 years ago)
Author:
hozdoba
Message:

Corrections de bugs

Location:
XMLIO_V2/dev/dev_rv
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/Makefile.wk

    r269 r276  
    1313MCOLOR    = no 
    1414SHOWCMD   = yes 
    15 VTK       = yes 
     15VTK       = no 
    1616GUI       = no 
    17 NPROC     = 1 
     17NPROC     = 2 
    1818#VERSION   = 4 
    1919CSUITE    = gnu 
  • XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp

    r214 r276  
    1616   CClient::~CClient(void) 
    1717   {  
    18       this->finalize(); 
     18      //this->finalize(); 
    1919   }  
    2020    
     
    2727   boost::shared_ptr<CClient> CClient::CreateClient(MPIComm comm_client_server) 
    2828   { 
    29       if (CClient::Client.get() != NULL) 
     29      if (CClient::Client.get() == NULL) 
    3030         CClient::Client = boost::shared_ptr<CClient>(new CClient(comm_client_server)); 
    3131      return (CClient::GetClient()); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/client.hpp

    r214 r276  
    2424         ~CClient(void);   
    2525          
    26       protected :  
     26      public :  
    2727       
    2828         /// Accesseur /// 
  • XMLIO_V2/dev/dev_rv/src/xmlio/config/context_attribute.conf

    r271 r276  
    11DECLARE_ATTRIBUTE(StdString, calendar_type) 
    22DECLARE_ATTRIBUTE(StdString, start_date) 
    3  
     3DECLARE_ATTRIBUTE(StdString, timestep) 
    44DECLARE_ATTRIBUTE(StdString, output_dir) 
    55 
  • XMLIO_V2/dev/dev_rv/src/xmlio/data_treatment.cpp

    r265 r276  
    5050         // Mise à jour cÃŽté client 
    5151         this->currentContext->getCalendar()->setTimeStep(duration); 
     52         this->currentContext->timestep.setValue(duration.toString()); 
    5253         std::cout << "timestep :" << duration << std::endl; 
    5354         if (CXIOSManager::GetStatus() == CXIOSManager::LOC_CLIENT) 
     
    7980            { 
    8081               if (field->updateDataServer(currDate, data)) 
     82               { 
    8183                  file->getDataOutput()->writeFieldData(field); 
     84               } 
    8285               return; 
    8386            } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/data_treatment.hpp

    r271 r276  
    4747 
    4848            /// Création des sorties /// 
    49             template <class T> void createDataOutput(void); 
     49            template <class T> void createDataOutput(comm::MPIComm comm_server = CXIOSManager::Comm_Server); 
    5050 
    5151            /// Destructeur /// 
     
    7272 
    7373      template <class T> 
    74          void CDataTreatment::createDataOutput(void) 
     74         void CDataTreatment::createDataOutput(comm::MPIComm comm_server ) 
    7575      { 
    7676         std::vector<boost::shared_ptr<CFile> >::const_iterator 
     
    7979         for (; it != end; it++) 
    8080         { 
     81            CXIOSManager::Comm_Server = comm_server; 
    8182            boost::shared_ptr<CFile> file = *it; 
    8283            StdString filename = (!file->name.isEmpty()) 
     
    8990            if (!file->name_suffix.isEmpty()) 
    9091                oss << file->name_suffix.getValue(); 
    91             if (comm::CMPIManager::GetCommSize() > 1) 
    92                 oss << "_node" << comm::CMPIManager::GetCommRank(); 
    93             oss << ".nc"; 
     92            if (comm::CMPIManager::GetCommSize(comm_server) > 1) 
     93                     oss << "." << comm::CMPIManager::GetCommRank(comm_server); 
     94                 oss << ".nc"; 
    9495            boost::shared_ptr<io::CDataOutput> dout(new T(oss.str(), false)); 
    9596            file->initializeDataOutput(dout); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/exception.cpp

    r152 r276  
    2323 
    2424   CException::~CException(void) 
    25    { if (desc_rethrow) throw (*this); } 
     25   {  
     26      if (desc_rethrow) 
     27#ifdef __XIOS_NOABORT 
     28        throw (*this);  
     29#else 
     30      std::cerr << this->getMessage() << std::endl; 
     31      abort(); 
     32#endif 
     33   } 
    2634 
    2735   //--------------------------------------------------------------- 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/fieldgroup_interface.f90

    r270 r276  
    9898      END SUBROUTINE xios_set_fieldgroup_default_value 
    9999       
    100       SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C) 
     100      SUBROUTINE xios_fieldgroup_handle_create(ret, idt, idt_size) BIND(C) 
    101101         import C_CHAR, C_INTPTR_T, C_INT 
    102102         INTEGER  (kind = C_INTPTR_T)               :: ret 
    103103         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt 
    104104         INTEGER  (kind = C_INT)     , VALUE        :: idt_size 
    105       END SUBROUTINE xios_domaingroup_handle_create 
     105      END SUBROUTINE xios_fieldgroup_handle_create 
    106106    
    107107   END INTERFACE 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/file_interface.f90

    r270 r276  
    1717         INTEGER  (kind = C_INT)     , VALUE        :: description_size 
    1818      END SUBROUTINE xios_set_file_description 
     19       
     20      SUBROUTINE xios_set_file_name_suffix(file_hdl, name_suffix, name_suffix_size) BIND(C) 
     21         USE ISO_C_BINDING 
     22         INTEGER  (kind = C_INTPTR_T), VALUE        :: file_hdl 
     23         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix 
     24         INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size 
     25      END SUBROUTINE xios_set_file_name_suffix 
    1926 
    2027      SUBROUTINE xios_set_file_output_freq(file_hdl, output_freq, output_freq_size) BIND(C) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/filegroup_interface.f90

    r270 r276  
    1717         INTEGER  (kind = C_INT)     , VALUE        :: description_size 
    1818      END SUBROUTINE xios_set_filegroup_description 
     19       
     20      SUBROUTINE xios_set_filegroup_name_suffix(filegroup_hdl, name_suffix ,name_suffix_size) BIND(C) 
     21         USE ISO_C_BINDING 
     22         INTEGER  (kind = C_INTPTR_T), VALUE        :: filegroup_hdl 
     23         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix 
     24         INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size 
     25      END SUBROUTINE xios_set_filegroup_name_suffix 
    1926 
    2027      SUBROUTINE xios_set_filegroup_output_freq(filegroup_hdl, output_freq ,output_freq_size) BIND(C) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icdata.cpp

    r271 r276  
    3939         CTreeManager::PrintTreeToFile(oss.str()); 
    4040         oss.str(""); 
    41  
    4241         boost::shared_ptr<CDataTreatment> dt(new CDataTreatment (context)); 
    4342         context->setDataTreatment(dt); 
     
    6766               CMPIManager::Wait(request);  // Pas encore en mode RPC 
    6867            } 
     68            CXIOSManager::RunClient(false, CMPIManager::GetCommWorld()); 
     69            CClient::CreateClient(comm_client_server); 
    6970         } 
    7071         else 
    7172         { 
    72             dt->createDataOutput<CNc4DataOutput>(); 
     73            dt->createDataOutput<CNc4DataOutput>(CMPIManager::GetCommWorld()); 
    7374         } 
    7475      } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icdate.cpp

    r270 r276  
    3030            (CObjectFactory::GetCurrentContextId()); 
    3131         boost::shared_ptr<xmlioserver::data::CDataTreatment> dtreat = context->getDataTreatment(); 
    32          dtreat->set_timestep(dur); 
     32         if (dtreat.get() != 0) 
     33         { 
     34            dtreat->set_timestep(dur);      
     35         } 
     36         else 
     37         { 
     38            context->solveCalendar(); 
     39            context->timestep.setValue(dur.toString()); 
     40            context->getCalendar()->setTimeStep(dur); 
     41         }        
    3342      } 
    3443      catch (xmlioserver::CException & exc) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icfile.cpp

    r271 r276  
    4141   }  
    4242    
     43   void xios_set_file_name_suffix(XFilePtr file_hdl, const char * name_suffix, int name_suffix_size) 
     44   { 
     45      std::string name_suffix_str;  
     46      if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; 
     47 
     48      file_hdl->name_suffix.setValue(name_suffix_str); 
     49   }  
     50    
    4351   void xios_set_file_output_freq(XFilePtr file_hdl, const char * output_freq, int output_freq_size) 
    4452   { 
     
    7684 
    7785      filegroup_hdl->description.setValue(description_str); 
     86   }  
     87    
     88   void xios_set_filegroup_name_suffix(XFileGroupPtr filegroup_hdl, const char * name_suffix, int name_suffix_size) 
     89   { 
     90      std::string name_suffix_str;  
     91      if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; 
     92 
     93      filegroup_hdl->name_suffix.setValue(name_suffix_str); 
    7894   }  
    7995    
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/idata.f90

    r271 r276  
    7070   END INTERFACE 
    7171    
     72   INTERFACE write_data 
     73      MODULE PROCEDURE write_data_k81,write_data_k82,write_data_k83,write_data_k41,write_data_k42,write_data_k43 
     74   END INTERFACE 
     75    
    7276   CONTAINS ! Fonctions disponibles pour les utilisateurs. 
    7377 
     
    7882    
    7983   SUBROUTINE dtreatment_start(context_hdl, filetype, comm_client_server, comm_server) 
    80       TYPE(XContextHandle), INTENT(IN), VALUE    :: context_hdl 
     84      TYPE(XContextHandle), INTENT(IN)           :: context_hdl 
    8185      INTEGER             , INTENT(IN), OPTIONAL :: filetype , comm_client_server , comm_server 
    8286      INTEGER                                    :: filetype_, comm_client_server_, comm_server_ 
     
    101105    
    102106   SUBROUTINE dtreatment_end(context_hdl) 
    103       TYPE(XContextHandle), INTENT(IN), VALUE :: context_hdl 
     107      TYPE(XContextHandle), INTENT(IN), OPTIONAL :: context_hdl 
    104108      CALL context_set_current(context_hdl) 
    105109      CALL xios_dtreatment_end() 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/idomain.f90

    r270 r276  
    2525    
    2626   SUBROUTINE set_domaingroup_attributes_id                                                                        & 
    27    ( domaingroup_id, name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  & 
     27   ( domaingroup_id, name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,       & 
    2828     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   & 
    2929     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 & 
    3030     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_) 
    3131      IMPLICIT NONE 
    32       TYPE(XDomainGroupHandle)                                   :: domaingroup_hdl 
     32      TYPE(XDomainGroupHandle)                              :: domaingroup_hdl 
    3333      CHARACTER(len = *)                       , INTENT(IN) :: domaingroup_id 
    3434      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: name_ 
    3535      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: standard_name_ 
    3636      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: long_name_ 
    37       CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: domaingroup_group_ref_ 
     37      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: domain_group_ref_ 
    3838      INTEGER                        , OPTIONAL, INTENT(IN) :: ni_glo_ 
    3939      INTEGER                        , OPTIONAL, INTENT(IN) :: nj_glo_ 
     
    6666      CALL domaingroup_handle_create(domaingroup_hdl, domaingroup_id) 
    6767      CALL set_domaingroup_attributes_hdl                                                                          & 
    68    ( domaingroup_hdl, name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_, & 
     68   ( domaingroup_hdl, name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,      & 
    6969     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   & 
    7070     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 & 
     
    7474    
    7575   SUBROUTINE set_domaingroup_attributes_hdl                                                                       & 
    76    ( domaingroup_hdl,name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  & 
     76   ( domaingroup_hdl,name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,       & 
    7777     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   & 
    7878     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 & 
     
    8383      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: standard_name_ 
    8484      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: long_name_ 
    85       CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: domaingroup_group_ref_ 
     85      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: domain_group_ref_ 
    8686      INTEGER                          , OPTIONAL, INTENT(IN) :: ni_glo_ 
    8787      INTEGER                          , OPTIONAL, INTENT(IN) :: nj_glo_ 
     
    122122         CALL xios_set_domaingroup_long_name(domaingroup_hdl%daddr, long_name_, len(long_name_)) 
    123123       END IF 
    124       IF (PRESENT(domaingroup_group_ref_)) THEN 
    125          CALL xios_set_domaingroup_domaingroup_group_ref(domaingroup_hdl%daddr, domaingroup_group_ref_, len(domaingroup_group_ref_)) 
     124      IF (PRESENT(domain_group_ref_)) THEN 
     125         CALL xios_set_domaingroup_domain_group_ref(domaingroup_hdl%daddr, domain_group_ref_, len(domain_group_ref_)) 
    126126      END IF 
    127127      IF (PRESENT(ni_glo_))           THEN 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/ifield.f90

    r270 r276  
    2626   SUBROUTINE set_fieldgroup_attributes_id                                                 & 
    2727   (fieldgroup_id, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, & 
    28     prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_) 
     28    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_) 
    2929     
    3030      IMPLICIT NONE 
     
    4343      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_ 
    4444      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_ 
    45       CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: fieldgroup_ref_ 
     45      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: field_ref_ 
    4646      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_ 
    4747         
     
    4949      CALL set_fieldgroup_attributes_hdl                                                          & 
    5050         (fieldgroup_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, & 
    51           prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_) 
     51          prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_) 
    5252 
    5353   END SUBROUTINE set_fieldgroup_attributes_id 
     
    5555   SUBROUTINE set_fieldgroup_attributes_hdl                                                 & 
    5656   (fieldgroup_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, & 
    57     prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_) 
     57    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_) 
    5858      IMPLICIT NONE 
    5959      TYPE(XFieldgroupHandle)          , INTENT(IN) :: fieldgroup_hdl 
     
    7171      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_ 
    7272      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_ 
    73       CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: fieldgroup_ref_ 
     73      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: field_ref_ 
    7474      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_ 
    7575       
     
    111111         CALL xios_set_fieldgroup_grid_ref(fieldgroup_hdl%daddr, grid_ref_, len(grid_ref_)) 
    112112      END IF 
    113       IF (PRESENT(fieldgroup_ref_))      THEN 
    114          CALL xios_set_fieldgroup_fieldgroup_ref(fieldgroup_hdl%daddr, fieldgroup_ref_, len(fieldgroup_ref_)) 
     113      IF (PRESENT(field_ref_))      THEN 
     114         CALL xios_set_fieldgroup_field_ref(fieldgroup_hdl%daddr, field_ref_, len(field_ref_)) 
    115115      END IF 
    116116      IF (PRESENT(default_value_))  THEN 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/ifile.f90

    r270 r276  
    2424   CONTAINS ! Fonctions disponibles pour les utilisateurs. 
    2525    
    26    SUBROUTINE set_file_attributes_id(file_id, name_ , description_, output_freq_, output_level_, enabled_) 
     26   SUBROUTINE set_file_attributes_id(file_id, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    2727      IMPLICIT NONE 
    2828      TYPE(XFileHandle)                        :: file_hdl 
     
    3030      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_ 
    3131      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_ 
     32      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_ 
    3233      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_ 
    3334      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_ 
     
    3536       
    3637      CALL file_handle_create(file_hdl, file_id) 
    37       CALL set_file_attributes_hdl(file_hdl, name_ , description_, output_freq_, output_level_, enabled_) 
     38      CALL set_file_attributes_hdl(file_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    3839       
    3940   END SUBROUTINE set_file_attributes_id 
    4041    
    41    SUBROUTINE set_file_attributes_hdl(file_hdl, name_ , description_, output_freq_, output_level_, enabled_) 
     42   SUBROUTINE set_file_attributes_hdl(file_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    4243      TYPE(XFileHandle)           , INTENT(IN) :: file_hdl 
    4344      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_ 
    4445      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_ 
     46      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_ 
    4547      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_ 
    4648      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_ 
     
    5456      IF (PRESENT(description_))  THEN 
    5557         CALL xios_set_file_description(file_hdl%daddr, description_, len(description_)) 
     58      END IF 
     59      IF (PRESENT(name_suffix_))  THEN 
     60         CALL xios_set_file_name_suffix(file_hdl%daddr, name_suffix_, len(name_suffix_)) 
    5661      END IF 
    5762      IF (PRESENT(output_freq_))  THEN 
     
    6772   END SUBROUTINE set_file_attributes_hdl 
    6873    
    69    SUBROUTINE set_filegroup_attributes_id(filegroup_id, name_ , description_, output_freq_, output_level_, enabled_) 
     74   SUBROUTINE set_filegroup_attributes_id(filegroup_id, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    7075      IMPLICIT NONE 
    7176      TYPE(XFileGroupHandle)                   :: filegroup_hdl 
     
    7378      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_ 
    7479      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_ 
     80      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_ 
    7581      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_ 
    7682      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_ 
     
    7884       
    7985      CALL filegroup_handle_create(filegroup_hdl, filegroup_id) 
    80       CALL set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, output_freq_, output_level_, enabled_) 
     86      CALL set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    8187       
    8288   END SUBROUTINE set_filegroup_attributes_id 
    8389    
    84    SUBROUTINE set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, output_freq_, output_level_, enabled_) 
     90   SUBROUTINE set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_) 
    8591      IMPLICIT NONE 
    8692      TYPE(XFileGroupHandle)      , INTENT(IN) :: filegroup_hdl 
    8793      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_ 
    8894      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_ 
     95      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_ 
    8996      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_ 
    9097      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_ 
     
    98105      IF (PRESENT(description_))  THEN 
    99106         CALL xios_set_filegroup_description(filegroup_hdl%daddr, description_, len(description_)) 
     107      END IF 
     108      IF (PRESENT(name_suffix_))  THEN 
     109         CALL xios_set_filegroup_name_suffix(filegroup_hdl%daddr, name_suffix_, len(name_suffix_)) 
    100110      END IF 
    101111      IF (PRESENT(output_freq_))  THEN 
  • XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp

    r271 r276  
    77#include "client.hpp" 
    88#include "server.hpp" 
    9  
     9extern "C" 
     10{ 
     11   void xios_dtreatment_start(tree::CContext * context_hdl, int filetype, int comm_client_server, int comm_server); 
     12   void xios_set_timestep(double ts_year, double ts_month,  double ts_day, 
     13                          double ts_hour, double ts_minute, double ts_second); 
     14   void xios_write_data_k83(const char * fieldid, int fieldid_size, double * data_k8, int data_Xsize, int data_Ysize, int data_Zsize); 
     15   void xios_update_calendar(int step); 
     16} 
    1017// Point d'entrée du programme principal 
    1118 
     
    1522   { 
    1623      MPIComm comm_client, comm_client_server, comm_server; 
    17       comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté 
    18        
    19       CTreeManager::ParseFile  ("test/iodef_simple_test.xml"); 
    20       CTreeManager::PrintTreeToFile("wk/def/test.xml"); 
    21       
    22       comm::CMPIManager::Finalize();               // < seulement en mode connecté 
    23  
    24       //CXIOSManager::Initialise (CXIOSManager::CLIENT_SERVER, &argc, &argv); 
    25       //CMPIManager::DispatchClient(true, comm_client, comm_client_server,  comm_server); 
    26       //CXIOSManager::RunServer("Nemo", comm_client_server, comm_server); 
    27       //CXIOSManager::Finalize (); 
     24      CXIOSManager::Initialise (CXIOSManager::CLIENT_SERVER, &argc, &argv); 
     25      if (CMPIManager::GetCommRank() == 0) 
     26      {          
     27         CMPIManager ::DispatchClient(true, comm_client, comm_client_server,  comm_server); 
     28         CXIOSManager::RunServer("Nemo", comm_client_server, comm_server);  
     29         CServer::CreateServer(comm_client_server)->run(); 
     30      } 
     31      else 
     32      { 
     33         ARRAY_CREATE(data, double, 3, [20][30][20]); 
     34          
     35         CMPIManager ::DispatchClient(false, comm_client, comm_client_server,  comm_server); 
     36         CTreeManager::ParseFile("iodef.xml"); 
     37         boost::shared_ptr<CContext> context = 
     38             CObjectFactory::GetObject<CContext>("context1"); 
     39         xios_set_timestep(0, 0, 0, 1, 0, 0); 
     40         xios_dtreatment_start(context.get(), 0, comm_client_server, -1); 
     41         for (int i = 0; i < 200; i++) 
     42         { 
     43            xios_update_calendar(i); 
     44            for (int i = 0, l=0; i < 20; i++) 
     45               for (int j = 0; j < 30; j++) 
     46                  for (int k = 0; k < 20; k++, l++)    
     47                     (*data)[i][j][k] = l*10+i; 
     48            xios_write_data_k83("champ1", 6, data->data(), 20, 30, 20); 
     49         } 
     50         CClient::GetClient()->finalize(); 
     51      } 
     52      CXIOSManager::Finalize (); 
     53          
    2854   } 
    2955   catch (CException & exc) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.cpp

    r271 r276  
    2727      { 
    2828         if (CXIOSManager::Type != CLIENT) 
     29 
    2930         { 
    3031            // Finalisation de la biliothÚque MPI si nécessaire 
     
    5354      { 
    5455         using namespace comm; 
     56         CXIOSManager::Comm_Client_Server = comm_client_server; 
     57         CXIOSManager::Comm_Server        = comm_server; 
     58         CXIOSManager::Status             = LOC_SERVER; 
    5559          
    5660         // Reconstruction de l'arborescence d'objet à l'aide des données envoyées par chacun des 
     
    6771         StdString main_data_tree = clientBuffer[0]->getString(0);         
    6872         tree::CTreeManager::FromBinary(main_data_tree); 
    69          std::cout << "main_data_tree" << main_data_tree.size() << std::endl; 
    7073          
    7174         // Obtention des sous-domaines clients. 
     
    156159         using namespace comm; 
    157160         typedef std::pair<StdString, XIOSClient> StdPairStrClient; 
     161         CXIOSManager::Comm_Client_Server = comm_client_server; 
     162         CXIOSManager::Comm_Server        = comm_client_server; 
    158163          
    159164         CXIOSManager::ShowInformation_CS(comm_client_server); 
     
    244249         if (launch) 
    245250         { 
    246             CXIOSManager::Status  = LOC_CLIENT_SERVER;          
     251            CXIOSManager::Status       = LOC_CLIENT_SERVER;     
     252            CXIOSManager::Comm_Server  = comm_client;     
    247253            (CXIOSManager::Clients.begin()->second.entry) 
    248254               (comm_client, comm_client, comm_client); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.hpp

    r271 r276  
    5555         static StdString  GetClientName(void); 
    5656          
    57       protected : 
     57      public : 
    5858          
    5959         static StdSize GetNbClient(void); 
     
    6363         static StdSize GetNbLocServer(const StdString & clientName = CXIOSManager::ClientName); 
    6464          
    65       private : 
     65      public : 
    6666       
    6767         /// Information /// 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp

    r271 r276  
    88 
    99#include "calendar_type.hpp" 
     10#include "duration.hpp" 
    1011 
    1112#include "data_treatment.hpp" 
     
    8283               << "Impossible de définir un calendrier (un attribut est manquant)."); 
    8384 
    84 #define DECLARE_CALENDAR(MType  , mtype)                        \ 
    85    if (calendar_type.getValue().compare(#mtype) == 0)           \ 
    86    {                                                            \ 
    87       this->calendar =  boost::shared_ptr<date::CCalendar>      \ 
    88          (new date::C##MType##Calendar(start_date.getValue())); \ 
    89       return;                                                   \ 
     85#define DECLARE_CALENDAR(MType  , mtype)                            \ 
     86   if (calendar_type.getValue().compare(#mtype) == 0)               \ 
     87   {                                                                \ 
     88      this->calendar =  boost::shared_ptr<date::CCalendar>          \ 
     89         (new date::C##MType##Calendar(start_date.getValue()));     \ 
     90      if (!this->timestep.isEmpty())                                \ 
     91       this->calendar->setTimeStep                                  \ 
     92          (date::CDuration::FromString(this->timestep.getValue())); \ 
     93      return;                                                       \ 
    9094   } 
    9195#include "calendar_type.conf" 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp

    r271 r276  
    2020      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 
    2121      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
    22       , ibegin_zoom_sub(), jbegin_zoom_sub() 
     22      , ibegin_zoom_sub(), jbegin_zoom_sub(), ni_zoom_sub(), nj_zoom_sub() 
    2323      , lonvalue_sub(), latvalue_sub() 
    2424   { /* Ne rien faire de plus */ } 
     
    2828      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 
    2929      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
    30       , ibegin_zoom_sub(), jbegin_zoom_sub() 
     30      , ibegin_zoom_sub(), jbegin_zoom_sub(),ni_zoom_sub(), nj_zoom_sub() 
    3131      , lonvalue_sub(), latvalue_sub() 
    3232   { /* Ne rien faire de plus */ } 
     
    100100         this->ibegin_zoom_sub.push_back(this->zoom_ibegin_loc.getValue()); 
    101101         this->jbegin_zoom_sub.push_back(this->zoom_jbegin_loc.getValue()); 
     102         this->ni_zoom_sub.push_back(this->zoom_ni_loc.getValue()); 
     103         this->nj_zoom_sub.push_back(this->zoom_nj_loc.getValue()); 
    102104       
    103105         this->latvalue_sub.push_back(this->latvalue.getValue()); 
     
    151153          (nj_glo.isEmpty() || nj_glo.getValue() <= 0 )) 
    152154      { 
    153          abort(); 
    154155         ERROR("CDomain::checkAttributes(void)", 
    155156               << "[ Id = " << this->getId() << " ] " 
     
    454455            for (int j = 0; j < zoom_nj_client; j++) 
    455456            { 
    456                (*lonvalue_temp)[i + j * zoom_ni_client] = (*lonvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()];               
    457                (*latvalue_temp)[i + j * zoom_ni_client] = (*latvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()]; 
     457               (*lonvalue_temp)[i + j * zoom_ni_client] = 
     458               (*lonvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()];               
     459               (*latvalue_temp)[i + j * zoom_ni_client] = 
     460               (*latvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()]; 
    458461            } 
    459462         } 
     
    488491      ARRAY_CREATE(latvalue_temp, double, 1, [0]); 
    489492       
    490       const int ibegin_serv  = ibegin.getValue(), 
    491                 jbegin_serv  = jbegin.getValue(), 
    492                 zoom_ni_serv = zoom_ni_loc.getValue(), 
    493                 zoom_nj_serv = zoom_nj_loc.getValue(); 
     493      const int ibegin_serv     = ibegin.getValue(), 
     494                jbegin_serv     = jbegin.getValue(), 
     495                zoom_ni_serv    = zoom_ni_loc.getValue(), 
     496                zoom_nj_serv    = zoom_nj_loc.getValue(), 
     497                ibegin_zoom_srv = zoom_ibegin_loc.getValue(), 
     498                jbegin_zoom_srv = zoom_jbegin_loc.getValue(); 
    494499                       
    495500      /*std::cout << "Rang du serveur :" << comm::CMPIManager::GetCommRank()   << std::endl 
     
    498503                << "Zoom_loc begin : " << zoom_ibegin_loc << ", " << zoom_jbegin_loc <<  std::endl 
    499504                << "Zoom_loc size : "  << zoom_ni_loc << ", " << zoom_nj_loc <<  std::endl;*/ 
    500        
    501        
    502       ARRAY(double, 1) lonvalue_ = this->lonvalue.getValue(), 
    503                        latvalue_ = this->latvalue.getValue(); 
    504505                        
    505506      if (this->data_dim.getValue() == 2) 
    506507      { 
    507          StdSize dm = zoom_ni_serv * zoom_nj_serv; 
    508          StdSize dn = this->ni.getValue() * this->nj.getValue(); 
    509           
    510          lonvalue_->resize(boost::extents[dn]); 
    511          latvalue_->resize(boost::extents[dn]); 
     508         StdSize dm = zoom_ni_serv * zoom_nj_serv;       
     509          
    512510         lonvalue_temp->resize(boost::extents[dm]); 
    513511         latvalue_temp->resize(boost::extents[dm]); 
     
    515513         for (StdSize k = 0; k < lonvalue_sub.size(); k++) 
    516514         { 
    517             int l = 0; 
    518515            ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k], 
    519516                             latvalue_loc = this->latvalue_sub[k]; 
    520             const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k], 
    521                       jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k]; 
     517            const int zoom_ibegin_cl = ibegin_zoom_sub[k], zoom_ni_cl = ni_zoom_sub[k], 
     518                      zoom_jbegin_cl = jbegin_zoom_sub[k], zoom_nj_cl = nj_zoom_sub[k], 
     519                      ni_cl = iend_sub[k] - ibegin_sub[k] + 1; 
    522520                       
    523             for (int i = ibegin_loc - ibegin_serv; i < (iend_loc - ibegin_serv + 1); i++) 
     521            for (int i = zoom_ibegin_cl - 1; i < zoom_ibegin_cl + zoom_ni_cl - 1; i++) 
    524522            { 
    525                for (int j = jbegin_loc - jbegin_serv; j < (jend_loc - jbegin_serv + 1); j++) 
     523               for (int j = zoom_jbegin_cl-1; j < zoom_jbegin_cl + zoom_nj_cl - 1; j++) 
    526524               { 
    527                   (*lonvalue_)[i + j * this->ni.getValue()] = (*lonvalue_loc)[l];      // erreur         
    528                   (*latvalue_)[i + j * this->ni.getValue()] = (*latvalue_loc)[l++];    // erreur 
     525                  int ii = i - (ibegin_serv - 1) + (zoom_ibegin_cl - 1) - (ibegin_zoom_srv - 1); 
     526                  int jj = j - (jbegin_serv - 1) + (zoom_jbegin_cl - 1) - (jbegin_zoom_srv - 1); 
     527                  (*lonvalue_temp)[ii + jj * zoom_ni_serv] = 
     528                  (*lonvalue_loc)[i + j * ni_cl];               
     529                  (*latvalue_temp)[ii + jj * zoom_ni_serv] =  
     530                  (*latvalue_loc)[i + j * ni_cl]; 
    529531               } 
    530532            } 
     
    535537      else 
    536538      { 
    537          lonvalue_->resize(boost::extents[this->ni.getValue()]); 
    538          latvalue_->resize(boost::extents[this->nj.getValue()]); 
    539539         lonvalue_temp->resize(boost::extents[zoom_ni_serv]); 
    540540         latvalue_temp->resize(boost::extents[zoom_nj_serv]); 
     
    542542         for (StdSize k = 0; k < lonvalue_sub.size(); k++) 
    543543         { 
    544             int l = 0; 
    545544            ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k], 
    546545                             latvalue_loc = this->latvalue_sub[k]; 
    547             const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k], 
    548                       jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k]; 
     546            const int zoom_ibegin_cl = ibegin_zoom_sub[k], zoom_ni_cl = ni_zoom_sub[k], 
     547                      zoom_jbegin_cl = jbegin_zoom_sub[k], zoom_nj_cl = nj_zoom_sub[k]; 
    549548                       
    550             for (int i = ibegin_loc - ibegin_serv; i < (iend_loc - ibegin_loc + 1); i++) 
    551                (*lonvalue_)[i] = (*lonvalue_loc)[l++]; 
     549            for (int i = zoom_ibegin_cl - 1; i < zoom_ibegin_cl + zoom_ni_cl - 1; i++) 
     550               (*lonvalue_temp)[i - (ibegin_serv - 1) + (zoom_ibegin_cl - 1) - (ibegin_zoom_srv - 1)] = 
     551               (*lonvalue_loc)[i]; 
    552552                
    553             for (int j = jbegin_loc - jbegin_serv; j < (jend_loc - jbegin_loc + 1); j++) 
    554                (*latvalue_)[j] = (*latvalue_loc)[l++]; 
     553            for (int j = zoom_jbegin_cl-1; j < zoom_jbegin_cl + zoom_nj_cl - 1; j++) 
     554               (*latvalue_temp)[j - (jbegin_serv - 1) + (zoom_jbegin_cl - 1) - (jbegin_zoom_srv - 1)] = 
     555               (*latvalue_loc)[j]; 
    555556         }        
    556557         this->lonvalue.setValue(lonvalue_temp); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp

    r271 r276  
    113113 
    114114         std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub; 
    115          std::vector<int> ibegin_zoom_sub, jbegin_zoom_sub; 
     115         std::vector<int> ibegin_zoom_sub, jbegin_zoom_sub, ni_zoom_sub, nj_zoom_sub; 
    116116         std::vector<ARRAY(double, 1)> lonvalue_sub, latvalue_sub; 
    117117 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp

    r265 r276  
    4747 
    4848   bool CField::updateDataServer 
    49       (const date::CDate & currDate, const std::deque<ARRAY(double, 1)> storedClient) 
    50    { 
    51       if ((*last_operation + freq_operation) >= currDate) 
    52       { 
    53          ARRAY_CREATE(input, double, 1, [0]); 
    54          this->grid->inputFieldServer(storedClient, input); 
     49      (const date::CDate & currDate, 
     50       const std::deque<ARRAY(double, 1)> storedClient) 
     51   { 
     52      const date::CDate opeDate      = *last_operation + freq_operation; 
     53      const date::CDate writeDate    = *last_Write     + freq_write;  
     54       
     55      if (opeDate <= currDate) 
     56      { 
     57         if (this->data->num_elements() != this->grid->storeIndex[0]->num_elements()) 
     58         { 
     59            this->data->resize(boost::extents[this->grid->storeIndex[0] ->num_elements()]); 
     60         }   
     61         ARRAY_CREATE(input, double, 1, [this->data->num_elements()]); 
     62         this->grid->inputFieldServer(storedClient, input);           
    5563         (*this->foperation)(input); 
    5664         *last_operation = currDate; 
    5765      } 
    58  
    59       if ((*last_Write + freq_write) >= currDate) 
    60       { 
    61          *last_Write = currDate; 
    62          return (true); 
     66      if (writeDate < (currDate + freq_operation)) 
     67      { 
     68         this->foperation->final(); 
     69         this->incrementNStep(); 
     70         *last_Write = writeDate; 
     71         return (true);         
    6372      } 
    6473      return (false); 
     
    232241               << "Impossible de définir une opération pour le champ !"); 
    233242      } 
     243       
     244      CDuration freq_offset_ = NoneDu; 
     245      if (!freq_offset.isEmpty()) 
     246      { 
     247         freq_offset_ = CDuration::FromString(freq_offset.getValue()); 
     248      } 
     249      else 
     250      { 
     251         freq_offset.setValue(NoneDu.toString()); 
     252      }   
    234253 
    235254      if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER) 
     
    245264         this->foperation     = 
    246265             boost::shared_ptr<func::CFunctor>(new CInstant(this->data)); 
     266              
     267         const CDuration toffset = this->freq_operation - freq_offset_ - _context->getCalendar()->getTimeStep();  
     268         *this->last_operation   = *this->last_operation - toffset;  
    247269      } 
    248270      else 
    249       { 
    250          CDuration freq_offset_ = NoneDu; 
    251          if (!freq_offset.isEmpty()) 
    252          { 
    253             freq_offset_ = CDuration::FromString(freq_offset.getValue()); 
    254          } 
    255          else 
    256          { 
    257             freq_offset.setValue(NoneDu.toString()); 
    258          }    
    259                    
     271      {                   
    260272         this->freq_operation = CDuration::FromString(freq_op.getValue()); 
    261273         this->freq_write     = CDuration::FromString(this->file->output_freq.getValue()); 
     
    264276         this->last_operation = boost::shared_ptr<xmlioserver::date::CDate> 
    265277                        (new date::CDate(_context->getCalendar()->getInitDate())); 
     278                         
    266279         const CDuration toffset = this->freq_operation - freq_offset_ - _context->getCalendar()->getTimeStep();  
    267          *this->last_operation  = *this->last_operation - toffset;   
     280         *this->last_operation   = *this->last_operation - toffset;   
    268281          
    269282#define DECLARE_FUNCTOR(MType, mtype)              \ 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp

    r267 r276  
    170170      { 
    171171         //std::cout << "> " << currDate << ": Operation du champs" << this->getBaseFieldId() << std::endl; 
    172           
    173172         if (this->data->num_elements() != this->grid->storeIndex[0]->num_elements()) 
    174173         { 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp

    r271 r276  
    463463         ARRAY(int, 1) out_j_index_cl  =  this->out_j_index[i + 1]; 
    464464         ARRAY(int, 1) out_l_index_cl  =  this->out_l_index[i + 1]; 
    465           
    466          const int ibegin_cl = ibegin[i]; 
    467          const int jbegin_cl = jbegin[i]; 
    468           
     465                  
    469466         int ibegin_zoom_cl = ibegin[i]; //ibegin_zoom[i]; 
    470467         int jbegin_zoom_cl = jbegin[i]; //jbegin_zoom[i]; 
     
    532529      this->out_i_index[0] = out_i_index_srv; 
    533530      this->out_j_index[0] = out_j_index_srv; 
    534       this->out_l_index[0] = out_l_index_srv; 
    535        
    536       this->storeIndex.resize(1); 
    537       this->out_i_index.resize(1); 
    538       this->out_j_index.resize(1); 
    539       this->out_l_index.resize(1); 
    540        
     531      this->out_l_index[0] = out_l_index_srv;       
    541532   } 
    542533    
     
    552543                << "Les données d'un client sont manquantes !") ; 
    553544      if (storedServer.get() != NULL) 
    554          storedServer->resize(boost::extents[this->storeIndex.size()-1]); 
     545         storedServer->resize(boost::extents[this->storeIndex[0]->num_elements()]); 
    555546      else  
    556          ARRAY_ASSIGN(storedServer, double, 1, [this->storeIndex.size()-1]); 
     547         ARRAY_ASSIGN(storedServer, double, 1, [this->storeIndex[0]->num_elements()]); 
    557548          
    558549      for (StdSize i = 0, n = 0; i < storedClient.size(); i++) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/output/nc4_data_output.cpp

    r272 r276  
    88#include "file.hpp" 
    99#include "calendar.hpp" 
     10#include "xios_manager.hpp" 
     11#include "context.hpp" 
    1012 
    1113namespace xmlioserver 
     
    104106               SuperClassWriter::addDimension(lonid_loc, domain->zoom_ni_loc.getValue()); 
    105107               SuperClassWriter::addDimension(latid_loc, domain->zoom_nj_loc.getValue()); 
    106                this->writeLocalAttributes(domain->zoom_ibegin_loc.getValue(), 
    107                                           domain->zoom_ni_loc.getValue(), 
    108                                           domain->zoom_jbegin_loc.getValue(), 
    109                                           domain->zoom_nj_loc.getValue(), 
    110                                           domid); 
     108               if (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Server) > 1) 
     109               { 
     110                  this->writeLocalAttributes(domain->zoom_ibegin_loc.getValue(), 
     111                                             domain->zoom_ni_loc.getValue(), 
     112                                             domain->zoom_jbegin_loc.getValue(), 
     113                                             domain->zoom_nj_loc.getValue(), 
     114                                             domid); 
     115               } 
     116                
    111117               if (isCurvilinear) 
    112118               { 
     
    128134               dim0.push_back(lonid_loc); 
    129135 
    130                SuperClassWriter::addVariable(maskid, NC_INT, dim0); 
    131  
    132                this->writeMaskAttributes(maskid, 
    133                   domain->data_dim.getValue()/*, 
    134                   domain->data_ni.getValue(), 
    135                   domain->data_nj.getValue(), 
    136                   domain->data_ibegin.getValue(), 
    137                   domain->data_jbegin.getValue()*/); 
     136               if (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Server) > 1) 
     137               { 
     138                  SuperClassWriter::addVariable(maskid, NC_INT, dim0); 
     139 
     140                  this->writeMaskAttributes(maskid, 
     141                     domain->data_dim.getValue()/*, 
     142                     domain->data_ni.getValue(), 
     143                     domain->data_nj.getValue(), 
     144                     domain->data_ibegin.getValue(), 
     145                     domain->data_jbegin.getValue()*/); 
     146               } 
    138147                   
    139148               //SuperClassWriter::setDefaultValue(maskid, &dvm); 
     
    142151               SuperClassWriter::writeData(domain->latvalue.getValue(), latid, true, 0); 
    143152               SuperClassWriter::writeData(domain->lonvalue.getValue(), lonid, true, 0); 
    144                SuperClassWriter::writeData(mask, maskid); 
     153               if (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Server) > 1) 
     154                  SuperClassWriter::writeData(mask, maskid); 
    145155               SuperClassWriter::definition_start(); 
    146156 
     
    169179         switch (SuperClass::type) 
    170180         { 
     181            case (ONE_FILE) : 
    171182            case (MULTI_FILE) : 
    172183            { 
     
    376387                             ? field->name.getValue()  
    377388                             : field->getBaseFieldReference()->getId(); 
     389         boost::shared_ptr<xmlioserver::tree::CContext> context = 
     390            CObjectFactory::GetObject<xmlioserver::tree::CContext> 
     391               (CObjectFactory::GetCurrentContextId()); 
     392                              
     393         StdOStringStream oss; 
     394         oss << "time_" << field->operation.getValue() 
     395             << "_" << field->getRelFile()->output_freq.getValue(); 
     396              
    378397         ARRAY(double, 1) field_data = field->getData(); 
     398         ARRAY_CREATE(time_data, double, 1, [1]); 
     399         (*time_data)[0] = date::Time(*field->getLastWriteDate()); 
    379400          
    380401         if (grid->hasAxis()) // 3D 
     
    383404            grid->outputField(field_data, field_data3D); 
    384405            SuperClassWriter::writeData(field_data3D, fieldid, true, field->getNStep()-1); 
     406            SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1); 
    385407             
    386408         } 
     
    390412            grid->outputField(field_data,  field_data2D); 
    391413            SuperClassWriter::writeData(field_data2D, fieldid, true, field->getNStep()-1); 
     414            SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1); 
    392415         } 
    393416      } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/server.cpp

    r272 r276  
    3333   boost::shared_ptr<CServer> CServer::CreateServer(MPIComm comm_client_server) 
    3434   { 
    35       if (CServer::Server.get() != NULL) 
     35      if (CServer::Server.get() == NULL) 
    3636         CServer::Server = boost::shared_ptr<CServer>(new CServer(comm_client_server)); 
    3737      return (CServer::GetServer()); 
     
    140140   void CServer::initialize(void) // manager 0, method 0 
    141141   { 
    142       // Ne rien faire de plus 
     142      std::cout << "initialize" << std::endl; 
    143143   } 
    144144    
     
    147147   void CServer::finalize(void) // manager 0, method 1 
    148148   { 
     149      std::cout << "finalize" << std::endl; 
    149150       comm::CMPIManager::Barrier(); 
    150151   }    
Note: See TracChangeset for help on using the changeset viewer.