Changeset 1712 for XIOS


Ignore:
Timestamp:
09/13/19 13:49:42 (5 years ago)
Author:
yushan
Message:

Generic_testcase : update iodef configurations

Location:
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/check.py

    r1708 r1712  
    77def main(): 
    88         
    9         configNamePattern=[0, 0, 0, 0, 0, 0] 
     9        configNamePattern=[0]*7 
    1010 
    1111        f=open("user_param.py", "r") 
     
    2424                elif line.startswith("Duration"): 
    2525                        configNamePattern[5] = '_Duration=' + Duration 
     26                elif line.startswith("ATMdomain"): 
     27                        configNamePattern[5] = '_ATMdomain=' + ATMdomain 
    2628        f.close() 
    2729                 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/config.py

    r1708 r1712  
    1616        f.write('NumberServers = ' + repr(NumberServers) + '\n') 
    1717        f.write('duration = ' + repr(Duration) + '\n') 
     18        f.write('ATMdomain = ' + ATMdomain + '\n') 
    1819        f.write('/\n\n') 
    1920 
     
    2223        nb_proc = NumberClients+NumberServers 
    2324 
    24         filein = open("iodef.xml", "r") 
     25        os.rename("iodef.xml", "iodef.xml.bkp") 
     26 
     27        filein = open("iodef.xml.bkp", "r") 
    2528        fileout = open("iodef.xml.tmp", "w") 
    2629        for line in filein: 
    27                 if 'number_pools_server2' in line: 
    28                         fileout.write( "        <variable id=\"number_pools_server2\" type=\"int\">"+repr(NumberPoolsServer2)+"</variable>\n") 
    29                 elif 'using_server2' in line: 
    30                         fileout.write( "        <variable id=\"using_server2\" type=\"bool\">"+UsingServer2+"</variable>\n") 
    31                 elif 'ratio_server2' in line: 
    32                         fileout.write( "        <variable id=\"ratio_server2\" type=\"int\">"+repr(RatioServer2)+"</variable>\n") 
     30                if 'xios::nbplSrv2' in line: 
     31                        line = line.replace("xios::nbplSrv2", repr(NumberPoolsServer2)) 
     32                        fileout.write(line) 
     33                elif 'xios::usingSrv2' in line: 
     34                        line = line.replace("xios::usingSrv2", UsingServer2) 
     35                        fileout.write(line) 
     36                elif 'xios::ratioSrv2' in line: 
     37                        line=line.replace("xios::ratioSrv2", repr(RatioServer2)) 
     38                        fileout.write(line) 
     39                elif 'atm::domain' in line: 
     40                        line=line.replace("atm::domain", ATMdomain) 
     41                        fileout.write(line) 
    3342                else: 
    3443                        fileout.write(line) 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/default_param.py

    r1708 r1712  
    55NumberServers = 4 
    66Duration = '1d' 
     7ATMdomain = 'lmdz' 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/run_sub_test.sh

    r1708 r1712  
    2828mpirun -np $nb_proc ../../build_prod/bin/generic_testcase.exe 
    2929 
    30  
    3130python sub_check.py 
    3231 
     32rm -f iodef.xml 
     33mv iodef.xml.bkp iodef.xml 
     34 
    3335done 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/iodef.xml

    r1707 r1712  
    11<?xml version="1.0"?> 
     2 
    23<simulation> 
    34 
     
    67 
    78      <variable id="timestep"> 1h </variable> 
    8       <variable id="domain"> lmdz </variable> 
    9       <variable id="domain_mask"> false </variable> 
    10       <variable id="axis_mask"> false </variable> 
     9      <variable id="domain"> atm::domain </variable> 
     10      <variable id="domain_mask"> true </variable> 
     11      <variable id="axis_mask"> true </variable> 
    1112      <variable id="init_field2D"> rank </variable> 
    1213      <variable id="ni"> 36 </variable> 
     
    5152 
    5253      <variable_group id="parameters" > 
    53         <variable id="using_server" type="bool">true</variable> 
     54        <variable id="using_server" type="bool">xios::usingSrv2</variable> 
    5455        <variable id="info_level" type="int">100</variable> 
    5556        <variable id="print_file" type="bool">true</variable> 
    56         <variable id="using_server2" type="bool">true</variable> 
    57         <variable id="ratio_server2" type="int">50</variable> 
    58         <variable id="number_pools_server2" type="int">1</variable> 
     57        <variable id="using_server2" type="bool">false</variable> 
     58        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable> 
     59        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable> 
    5960        <variable id="pure_one_sided" type="bool">false</variable> 
    6061        <variable id="check_event_sync" type="bool">true</variable> 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/param.def

    r1706 r1712  
    66NumberServers = 4 
    77duration = '1d' 
     8ATMdomain = lmdz 
    89/ 
    910 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/iodef.xml

    r1701 r1712  
    77 
    88      <variable id="timestep"> 1h </variable> 
    9       <variable id="domain"> lmdz </variable> 
     9      <variable id="domain"> atm::domain </variable> 
    1010      <variable id="domain_mask"> true </variable> 
    1111      <variable id="axis_mask"> true </variable> 
     
    5252 
    5353      <variable_group id="parameters" > 
    54         <variable id="using_server" type="bool">true</variable> 
     54        <variable id="using_server" type="bool">xios::usingSrv2</variable> 
    5555        <variable id="info_level" type="int">100</variable> 
    5656        <variable id="print_file" type="bool">true</variable> 
    57         <variable id="using_server2" type="bool">true</variable> 
    58         <variable id="ratio_server2" type="int">50</variable> 
    59         <variable id="number_pools_server2" type="int">1</variable> 
     57        <variable id="using_server2" type="bool">false</variable> 
     58        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable> 
     59        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable> 
    6060        <variable id="pure_one_sided" type="bool">false</variable> 
    6161        <variable id="check_event_sync" type="bool">true</variable> 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/param.def

    r1705 r1712  
    66NumberServers = 4 
    77duration = '1d' 
     8ATMdomain = lmdz 
    89/ 
    910 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/user_params.def

    r1705 r1712  
    1313NumberServers = 2, 4 
    1414UsingServer2 = 'false', 'true' 
    15 # Duration = '1d', '2d' 
    16 # NumberPoolsServer2 = 1 
     15ATMdomain = 'lmdz' 
  • XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/user_config.py

    r1708 r1712  
    66def main(): 
    77 
     8        default_nb_config = 7 
     9 
    810        nb_config = 1; 
    9         configs = [0, 0, 0, 0, 0, 0] 
    10         configs_arg = [[],[],[],[],[],[]] 
     11        configs = [0]*default_nb_config 
     12          
     13        configs_arg = [[], [], [], [], [], [], []]  
    1114 
    1215        f=open("user_params.def", "r") 
     
    4851                                                configs[5] += 1 
    4952                                                configs_arg[5].append('Duration = '+word) 
     53                                elif line.startswith("ATMdomain"): 
     54                                        line = line.replace("ATMdomain", "") 
     55                                        for word in line.split(): 
     56                                                configs[6] += 1 
     57                                                configs_arg[6].append('ATMdomain = '+word) 
    5058 
    5159                                 
    52          
    53         for x in range(6): 
     60        for x in range(default_nb_config): 
    5461                if configs[x]==0: 
    5562                        configs[x] =1 
     
    6875                                                for i5 in range(configs[5]): 
    6976                                                        hasContent5 = len(configs_arg[5])>0 
    70                                                         filename = "user_param.py."+repr(config_id) 
    71                                                         g = open(filename, "w") 
     77                                                        for i6 in range(configs[6]): 
     78                                                                hasContent6 = len(configs_arg[6])>0 
    7279 
    73                                                         if hasContent0: g.write(configs_arg[0][i0]+'\n') 
    74                                                         if hasContent1: g.write(configs_arg[1][i1]+'\n') 
    75                                                         if hasContent2: g.write(configs_arg[2][i2]+'\n') 
    76                                                         if hasContent3: g.write(configs_arg[3][i3]+'\n') 
    77                                                         if hasContent4: g.write(configs_arg[4][i4]+'\n') 
    78                                                         if hasContent5: g.write(configs_arg[5][i5]+'\n') 
     80                                                                filename = "user_param.py."+repr(config_id) 
     81                                                                g = open(filename, "w") 
     82 
     83                                                                if hasContent0: g.write(configs_arg[0][i0]+'\n') 
     84                                                                if hasContent1: g.write(configs_arg[1][i1]+'\n') 
     85                                                                if hasContent2: g.write(configs_arg[2][i2]+'\n') 
     86                                                                if hasContent3: g.write(configs_arg[3][i3]+'\n') 
     87                                                                if hasContent4: g.write(configs_arg[4][i4]+'\n') 
     88                                                                if hasContent5: g.write(configs_arg[5][i5]+'\n') 
     89                                                                if hasContent6: g.write(configs_arg[6][i6]+'\n') 
    7990                                                         
    80                                                         config_id +=1 
    81                                                         g.close 
     91                                                                config_id +=1 
     92                                                                g.close 
    8293 
    8394 
Note: See TracChangeset for help on using the changeset viewer.