Changeset 2496


Ignore:
Timestamp:
04/25/23 11:27:34 (14 months ago)
Author:
jderouillat
Message:

Check that the parameters of the XIOS context are valid

Location:
XIOS3/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/generic_testcase/iodef.xml

    r2392 r2496  
    8989        <variable id="min_buffer_size" type="int">10000</variable> 
    9090        <variable id="optimal_buffer_size" type="string">performance</variable> 
    91         <variable id="buffer_factor_size" type="double">0.8</variable>  
    9291      </variable_group> 
    9392 
  • XIOS3/trunk/src/node/variable.cpp

    r1784 r2496  
    3838      SuperClass::parse(node); 
    3939      StdString id = (this->hasId()) ? this->getId() : StdString("undefined"); 
     40      if (CContext::getCurrent()->getId()=="xios") checkInDictionary(id); 
    4041      if (!node.getContent(this->content)) 
    4142      { 
     
    6061      } 
    6162      content = boost::trim_copy(content) ; 
     63   } 
     64 
     65   void CVariable::checkInDictionary(StdString id) 
     66   { 
     67     // $ grep -rw getin ../src/|grep -v template|grep \"|awk -F \" '{ print $2}'|sort|uniq 
     68     set<StdString> dictionary_ = {  
     69                                    "buffer_size_factor", 
     70                                    "call_oasis_enddef", 
     71                                    "check_event_sync", 
     72                                    "checksum_recv_fields", 
     73                                    "checksum_send_fields", 
     74                                    "clients_code_id", 
     75                                    "info_level", 
     76                                    "log_memory", 
     77                                    "log_type", 
     78                                    "max_buffer_size", 
     79                                    "memtrack_blocks", 
     80                                    "memtrack_size", 
     81                                    "min_buffer_size", 
     82                                    "number_pools_server2", 
     83                                    "optimal_buffer_size", 
     84                                    "print_file", 
     85                                    "pure_one_sided", 
     86                                    "ratio_server2", 
     87                                    "recv_field_timeout", 
     88                                    "server2_dist_file_memory", 
     89                                    "server2_dist_file_memory_ratio", 
     90                                    "server_puplish_timeout", 
     91                                    "system_stack", 
     92                                    "transport_protocol", 
     93                                    "using_oasis", 
     94                                    "using_server", 
     95                                    "using_server2", 
     96                                    "xios_stack"                         
     97     }; 
     98     if (dictionary_.find(id)==dictionary_.end()) 
     99     { 
     100       ERROR("CVariable::checkInDictionary(StdString id)", 
     101              << "[ variable id = " << id 
     102              << " ] variable does not exist ! Check the syntax of your context id 'xios' in iodef.xml."); 
     103     } 
    62104   } 
    63105 
  • XIOS3/trunk/src/node/variable.hpp

    r2326 r2496  
    9595         private : 
    9696 
     97            static void checkInDictionary(StdString id); 
    9798            StdString content; 
    9899 
  • XIOS3/trunk/xios_test_suite/TEST_SUITE/iodef.xml

    r2301 r2496  
    5050  <variable id="min_buffer_size" type="int">10000000</variable> 
    5151  <variable id="optimal_buffer_size" type="string">performance</variable> 
    52   <variable id="buffer_factor_size" type="double">0.8</variable>  
     52  <!--variable id="buffer_factor_size" type="double">0.8</variable--> 
    5353      </variable_group> 
    5454 
     
    6363        <variable id="check_event_sync" type="bool">true</variable> 
    6464      </variable_group> 
    65       <variable id="activate_non_distributed_transformation" type="bool">XIOS::NonDistTran</variable> 
     65      <!--variable id="activate_non_distributed_transformation" type="bool">XIOS::NonDistTran</variable--> 
    6666    </variable_definition> 
    6767  </context> 
Note: See TracChangeset for help on using the changeset viewer.