Changeset 1909
- Timestamp:
- 06/19/20 18:57:59 (5 years ago)
- Location:
- XIOS/trunk/xios_test_suite
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/xios_test_suite/ENV/irene.env
r1907 r1909 10 10 export xios_thredds_dir=/ccc/work/cont003/thredds/p86yann/XIOS_TEST_SUITE 11 11 export xios_reference_dir=/ccc/work/cont003/gen0826/gen0826/XIOS_TEST_SUITE_REPOSITORY 12 export ref_location=/ccc/cont003/home/gencmip6/wangyush/ cron_xios12 export ref_location=/ccc/cont003/home/gencmip6/wangyush/reference_dir 13 13 export ref_file=reference.tar.gz 14 14 -
XIOS/trunk/xios_test_suite/TEST_SUITE/default_param.json
r1906 r1909 1 1 [ 2 { 3 "ATMdomain": "lmdz", 4 "UsingServer2": "true", 5 "RatioServer2": 50, 6 "NumberPoolsServer2": 1, 7 "Duration": "1d", 8 "NumberClients": 4, 9 "NumberServers": 4 10 } 2 { 3 "ATMdomain": "lmdz", 4 "UsingServer2": "true", 5 "RatioServer2": 50, 6 "NumberPoolsServer2": 1, 7 "Duration": "1d", 8 "NumberClients": 4, 9 "NumberServers": 4, 10 "InfoLevel": 100 11 } 11 12 ] -
XIOS/trunk/xios_test_suite/TEST_SUITE/iodef.xml
r1888 r1909 53 53 <variable_group id="parameters" > 54 54 <variable id="using_server" type="bool">true</variable> 55 <variable id="info_level" type="int"> 100</variable>55 <variable id="info_level" type="int">XIOS::InfoLevel</variable> 56 56 <variable id="print_file" type="bool">true</variable> 57 57 <variable id="using_server2" type="bool">XIOS::UsingServer2</variable> -
XIOS/trunk/xios_test_suite/TEST_SUITE/run_test
r1908 r1909 25 25 for i in $(ls -d test_*/) 26 26 do 27 mkdir -p ${rundir}/def_files/${svnR}/${i%%} 27 mkdir -p ${rundir}/def_files/${svnR}/${i%%} ; CHMOD ${rundir}/def_files/${svnR}/${i%%} 28 28 cp ${i%%}/user_param.json ${rundir}/def_files/${svnR}/${i%%} 29 29 for j in $(ls -d ${i%%/}/CONFIG_*) 30 30 do 31 mkdir -p ${rundir}/def_files/${svnR}/${j%%} 31 mkdir -p ${rundir}/def_files/${svnR}/${j%%} ; CHMOD ${rundir}/def_files/${svnR}/${j%%} 32 32 cp ${j%%}/all_param.def ${rundir}/def_files/${svnR}/${j%%} 33 33 done -
XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py
r1907 r1909 7 7 import copy 8 8 9 param_list = ["ATMdomain", "UsingServer2", "NumberClients", "NumberServers", "RatioServer2", "NumberPoolsServer2", "Duration" ]10 param_short_list = ["ATMdom", "Srv2", "NbClnt", "NbSrv", "RatioSrv2", "NbPlSrv2", "Duration" ]9 param_list = ["ATMdomain", "UsingServer2", "NumberClients", "NumberServers", "RatioServer2", "NumberPoolsServer2", "Duration", "InfoLevel"] 10 param_short_list = ["ATMdom", "Srv2", "NbClnt", "NbSrv", "RatioSrv2", "NbPlSrv2", "Duration", "Info"] 11 11 12 12 mode=os.getenv("mode") … … 38 38 default_param = json.load(f) 39 39 f.close() 40 return default_param[0] 40 l = list(default_param[0].items()) 41 l.sort() 42 def_param=dict(l) 43 return def_param 41 44 42 45 def generate_job(fn, n): … … 62 65 fh.write("#MSUB -Q test\n") 63 66 fh.write("#MSUB -m work,scratch\n") 64 fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 67 fh.write("cp ../../build_"+arch+"_"+mode+"/bin/generic_testcase.exe ./\n") 68 fh.write("source ../../build_"+arch+"_"+mode+"/arch.env\n") 65 69 fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n") 66 70 … … 81 85 fh.write("ulimit -c 0\n") 82 86 fh.write("cd ${SLURM_SUBMIT_DIR}\n") 83 fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 87 fh.write("cp ../../build_"+arch+"_"+mode+"/bin/generic_testcase.exe ./\n") 88 fh.write("source ../../build_"+arch+"_"+mode+"/arch.env\n") 84 89 fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt\n") 85 90 fh.write("srun generic_testcase.exe") … … 90 95 if machine=="irene": 91 96 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 92 fh.write("\ncd ${location}/"+location+"; ccc_mprun -E \'--exclusive\' -n "+str(n)+" generic_testcase.exe > output .out 2> error.out &\n")97 fh.write("\ncd ${location}/"+location+"; ccc_mprun -E \'--exclusive\' -n "+str(n)+" generic_testcase.exe > output_"+arch+"_"+mode+".out 2> error_"+arch+"_"+mode+".out &\n") 93 98 fh.write("PIDS+=($!)\n") 94 99 fh.write("CONFIGS+=("+location+")\n") 95 100 if machine=="jeanzay": 96 101 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 97 fh.write("\ncd ${location}/"+location+"; srun --exclusive -n "+str(n)+" generic_testcase.exe > output .out 2> error.out &\n")102 fh.write("\ncd ${location}/"+location+"; srun --exclusive -n "+str(n)+" generic_testcase.exe > output_"+arch+"_"+mode+".out 2> error_"+arch+"_"+mode+".out &\n") 98 103 99 104 def main(): … … 108 113 fh.write("#MSUB -r XIOS\n") 109 114 fh.write("#MSUB -eo\n") 110 fh.write("#MSUB -o client_output.out\n")111 fh.write("#MSUB -e client_error.err\n")115 fh.write("#MSUB -o output_"+arch+"_"+mode+".out\n") 116 fh.write("#MSUB -e error_"+arch+"_"+mode+".err\n") 112 117 fh.write("#MSUB -c 1\n") 113 118 fh.write("#MSUB -n "+str(nb_proc_irene)+"\n") … … 121 126 fh.write("export location="+os.getcwd()+"\n") 122 127 fh.write("export log_location="+os.getcwd()+"\n") 123 fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n")128 fh.write("source build_"+arch+"_"+mode+"/arch.env\n") 124 129 fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 125 130 fh.write("date >> ${log_location}/Log.txt\n") … … 133 138 fh.write("#====================================================\n") 134 139 fh.write("#SBATCH --ntasks="+str(nb_proc_jz)+"\n") 140 fh.write("#SBATCH -o output_"+arch+"_"+mode+".out\n") 141 fh.write("#SBATCH -e error_"+arch+"_"+mode+".out\n") 135 142 fh.write("#SBATCH --hint=nomultithread\n") 136 143 fh.write("#SBATCH -t 00:10:00\n") … … 138 145 fh.write("ulimit -c 0\n") 139 146 fh.write("cd ${SLURM_SUBMIT_DIR}\n") 140 fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n")147 fh.write("source build_"+arch+"_"+mode+"/arch.env\n") 141 148 fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt\n") 142 149 fh.write("export location="+os.getcwd()+"\n") … … 179 186 mystr = mystr.replace(":", "") 180 187 mystr = mystr.replace("u'", "") 188 mystr = mystr.replace("b'", "") 181 189 mystr = mystr.replace("'", "") 182 190 mystr = mystr.replace(" ", "_") -
XIOS/trunk/xios_test_suite/TEST_SUITE/step2.py
r1891 r1909 7 7 import copy 8 8 9 param_list = ["ATMdomain", "UsingServer2", "NumberClients", "NumberServers", "RatioServer2", "NumberPoolsServer2", "Duration"]10 param_short_list = ["ATMdom", "Srv2", "NbClnt", "NbSrv", "RatioSrv2", "NbPlSrv2", "Duration"]11 9 12 10 mode=os.getenv("mode") … … 15 13 ref_location=os.getenv("ref_location") 16 14 ref_file=os.getenv("ref_file") 15 16 17 17 18 18 def OSinfo(runthis): … … 26 26 27 27 28 def get_default_param():29 f=open("default_param.json", 'r')30 default_param = json.load(f)31 f.close()32 return default_param[0]33 28 34 29 def nonblank_lines(f): … … 39 34 40 35 def main(): 41 OSinfo("cp "+ref_location+"/"+ref_file+" ./") 42 OSinfo("tar -zxvf "+ref_file) 36 ref_list = glob.glob(ref_location+"/*") 37 for i in range(len(ref_list)): 38 tmp = ref_list[i].split("/") 39 rev = tmp[len(tmp)-1] 40 ref_list[i] = int(rev) 41 ref_list.sort(reverse=True) #ref_list in descending order 42 43 print(ref_list) 44 45 ref_rev = "0" 46 for ref in ref_list: 47 if int(svnr) >= ref : 48 ref_rev = str(rev) 49 break 50 51 if not int(ref_rev): 52 print("no available reference found ... exit") 53 return 54 55 OSinfo("cp "+ref_location+"/"+ref_rev+"/"+ref_file+" ./") 56 OSinfo("tar -zxvf "+ref_location+"/"+ref_rev+"/"+ref_file) 43 57 OSinfo("rm -f "+ref_file) 58 59 44 60 test_folder_list = glob.glob('test_*') 45 61 46 62 for test_folder in test_folder_list: 47 63 config_list = glob.glob(test_folder+"/CONFIG_*") 48 #print(*config_list, sep = "\n")49 64 50 65
Note: See TracChangeset
for help on using the changeset viewer.