Changeset 1893
- Timestamp:
- 06/11/20 16:58:59 (4 years ago)
- Location:
- XIOS/trunk/xios_test_suite/TEST_SUITE
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay.sh
r1818 r1893 1 1 #!/bin/bash 2 2 ##SBATCH --nodes=2 3 #SBATCH --ntasks= 8# Nombre total de processus MPI4 # SBATCH --ntasks-per-node=163 #SBATCH --ntasks=32 # Nombre total de processus MPI 4 ##SBATCH --ntasks-per-node=16 5 5 ##SBATCH --cpus-per-task=1 6 6 #SBATCH --hint=nomultithread … … 22 22 export mode=prod 23 23 24 ./run_test24 time ./run_test 25 25 26 26 … … 30 30 export mode=debug 31 31 32 ./run_test32 time ./run_test -
XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay_local.sh
r1833 r1893 1 1 #!/bin/bash 2 2 ##SBATCH --nodes=2 3 #SBATCH --ntasks= 8# Nombre total de processus MPI3 #SBATCH --ntasks=32 # Nombre total de processus MPI 4 4 #SBATCH --ntasks-per-node=16 5 5 ##SBATCH --cpus-per-task=1 … … 22 22 export mode=prod 23 23 24 ./run_test_local24 time ./run_test_local 25 25 26 26 … … 30 30 export mode=debug 31 31 32 ./run_test_local32 time ./run_test_local -
XIOS/trunk/xios_test_suite/TEST_SUITE/my_prod.sh
r1892 r1893 16 16 17 17 python3 step1.py 18 cmd=$(ccc_msub full_job_${arch}_${mode}.sh)19 jobid="${cmd//[!0-9]/}"20 #jobid=999999921 18 22 i=023 output=$(ccc_mpp | grep ${jobid})24 while [ ! -z "$output" ]25 do26 echo "job" $jobid "running for about" ${i} seconds27 sleep 528 ((i+=5))29 output=$(ccc_mpp | grep ${jobid})30 done31 19 32 python3 step2.py 20 if [[ ${xios_machine_name} == "irene" ]]; then 21 cmd=$(ccc_msub full_job_${arch}_${mode}.sh) 22 jobid="${cmd//[!0-9]/}" 23 #jobid=9999999 24 25 i=0 26 output=$(ccc_mpp | grep ${jobid}) 27 while [ ! -z "$output" ] 28 do 29 echo "job" $jobid "running for about" ${i} seconds 30 sleep 5 31 ((i+=5)) 32 output=$(ccc_mpp | grep ${jobid}) 33 done 34 fi 35 36 if [[ ${xios_machine_name} == "jeanzay" ]]; then 37 cmd=$(sbatch full_job_${arch}_${mode}.sh) 38 jobid="${cmd//[!0-9]/}" 39 #jobid=99999 40 i=0 41 output=$(squeue -u rpsl954 | grep ${jobid}) 42 while [ ! -z "$output" ] 43 do 44 echo "job" $jobid "running for about" ${i} seconds 45 sleep 5 46 ((i+=5)) 47 output=$(squeue -u rpsl954 | grep ${jobid}) 48 done 49 fi 50 51 52 #python3 step2.py -
XIOS/trunk/xios_test_suite/TEST_SUITE/run_test
r1886 r1893 81 81 82 82 cmake . 83 ctest -V 83 ctest -V -j16 84 84 #ctest --output-on-failure 85 85 make report -
XIOS/trunk/xios_test_suite/TEST_SUITE/run_test_jeanzay
r1887 r1893 1 1 #!/bin/bash 2 module load subversion 3 module load python/3.7.3 2 4 3 sbatch --wait job_jeanzay.sh 5 export arch=X64_JEANZAY 6 export mode=prod 7 export build_dir=xios_test_suite/RUN_TEST_SUITE/build_${arch}_${mode} 8 export svnR=$(svn info --show-item revision ../../) 9 export ref_location=/gpfswork/rech/psl/rpsl954/cron_xios 10 export ref_file=reference.tar.gz 11 12 echo "Start Building XIOS ... " 13 bash -c "cd ../.. && ./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --build_dir ${build_dir} --job 4" 14 15 export build_status=$? 16 if [[ ${build_status} == 0 ]] 17 then 18 echo "XIOS Build Finished. Start Unit Tests" 19 bash ./my_prod.sh 20 rundir=${xios_test_suite_repository}/RUN 21 mkdir -p $rundir ; CHMOD $rundir 22 mkdir -p ${rundir}/test_${xios_machine_name} ; CHMOD ${rundir}/test_${xios_machine_name} 23 24 cp report_${svnR}_${arch}_${mode}.txt ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt 25 26 CHMOD ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt 27 28 mkdir -p ${rundir}/def_files ; CHMOD ${rundir}/def_files 29 mkdir -p ${rundir}/def_files/${svnR} ; CHMOD ${rundir}/def_files/${svnR} 30 31 for i in $(ls -d test_*/) 32 do 33 mkdir -p ${rundir}/def_files/${svnR}/${i%%} 34 cp ${i%%}/user_param.json ${rundir}/def_files/${svnR}/${i%%} 35 for j in $(ls -d ${i%%/}/CONFIG_*) 36 do 37 mkdir -p ${rundir}/def_files/${svnR}/${j%%} 38 cp ${j%%}/all_param.def ${rundir}/def_files/${svnR}/${j%%} 39 done 40 CHMOD ${rundir}/def_files 41 done 42 43 44 else 45 echo "XIOS Build Failed. Skip Unit Tests" 46 fi 47 48 49 #sbatch --wait job_jeanzay.sh 4 50 5 51 #bash -c "python generate_test.py" -
XIOS/trunk/xios_test_suite/TEST_SUITE/setup.py
r1841 r1893 115 115 f.write("set_tests_properties("+foldername+"_config"+repr(x)+" PROPERTIES\n") 116 116 f.write(" FAIL_REGULAR_EXPRESSION \"check.py failed;execution failed;failed;setup.sh failed; machine unknown\")\n\n") 117 117 118 118 g=open("run_test_"+repr(x)+".py", "w") 119 119 g.write("##############################\n") -
XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py
r1891 r1893 12 12 mode=os.getenv("mode") 13 13 arch=os.getenv("arch") 14 machine=os.getenv("xios_machine_name") 15 my_counter=1 16 portion=0 17 18 nb_proc_irene=20 # this must be >= NumberClients+NumberServers for all configs for all test folders 19 nb_proc_jz=36 # this must be >= sum(NumberClients+NumberServers) for each test folder 14 20 15 21 def OSinfo(runthis): … … 34 40 return default_param[0] 35 41 36 def generate_job_irene(fn, n): 37 with open(fn, "w") as fh: 38 fh.write("#!/bin/bash\n") 39 fh.write("#MSUB -r XIOS\n") 40 fh.write("#MSUB -eo\n") 41 fh.write("#MSUB -o client_output.out\n") 42 fh.write("#MSUB -e client_error.out\n") 43 fh.write("#MSUB -c 1\n") 44 fh.write("#MSUB -n 24\n") 45 fh.write("#MSUB -X\n") 46 fh.write("#MSUB -x\n") 47 fh.write("#MSUB -T 1800\n") 48 fh.write("#MSUB -q skylake\n") 49 fh.write("#MSUB -A gen0826\n") 50 fh.write("#MSUB -Q test\n") 51 fh.write("#MSUB -m work,scratch\n") 52 fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 53 fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n") 42 def generate_job(fn, n): 43 if machine=="irene": 44 with open(fn, "w") as fh: 45 fh.write("#!/bin/bash\n") 46 fh.write("#MSUB -r XIOS\n") 47 fh.write("#MSUB -eo\n") 48 fh.write("#MSUB -o client_output.out\n") 49 fh.write("#MSUB -e client_error.out\n") 50 fh.write("#MSUB -c 1\n") 51 fh.write("#MSUB -n "+str(n)+"\n") 52 fh.write("#MSUB -X\n") 53 fh.write("#MSUB -x\n") 54 fh.write("#MSUB -T 1800\n") 55 fh.write("#MSUB -q skylake\n") 56 fh.write("#MSUB -A gen0826\n") 57 fh.write("#MSUB -Q test\n") 58 fh.write("#MSUB -m work,scratch\n") 59 fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 60 fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n") 61 62 if machine=="jeanzay": 63 with open(fn, "w") as fh: 64 fh.write("#!/bin/bash\n") 65 fh.write("#SBATCH --ntasks="+str(n)+"\n") 66 fh.write("#SBATCH --hint=nomultithread\n") 67 fh.write("#SBATCH -o output.out\n") 68 fh.write("#SBATCH -e error.out\n") 69 fh.write("#SBATCH -t 00:10:00\n") 70 fh.write("#SBATCH --account=psl@cpu\n") 71 fh.write("ulimit -c 0\n") 72 fh.write("cd ${SLURM_SUBMIT_DIR}\n") 73 fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 74 fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt") 75 fh.write("srun generic_testcase.exe") 54 76 55 77 56 78 def update_full_job(location, n): 57 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 79 global my_counter 80 if machine=="irene": 81 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 58 82 fh.write("\ncd ${location}/"+location+"; ccc_mprun -E \'--exclusive\' -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n") 59 83 fh.write("PIDS+=($!)\n") 60 84 fh.write("CONFIGS+=("+location+")\n") 61 85 if machine=="jeanzay": 86 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 87 fh.write("\ncd ${location}/"+location+"; srun --exclusive -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n") 88 #fh.write("echo \"test progress "+str(my_counter*portion)+"% \"\n") 89 #my_counter = my_counter+1 62 90 63 91 def main(): 64 with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 65 fh.write("#!/bin/bash\n") 66 fh.write("#MSUB -r XIOS\n") 67 fh.write("#MSUB -eo\n") 68 fh.write("#MSUB -o client_output.out\n") 69 fh.write("#MSUB -e client_error.err\n") 70 fh.write("#MSUB -c 1\n") 71 fh.write("#MSUB -n 24\n") 72 fh.write("#MSUB -X\n") 73 fh.write("#MSUB -x\n") 74 fh.write("#MSUB -T 1800\n") 75 fh.write("#MSUB -q skylake\n") 76 fh.write("#MSUB -A gen0826\n") 77 fh.write("#MSUB -Q test\n") 78 fh.write("#MSUB -m work,scratch\n") 79 fh.write("export location="+os.getcwd()+"\n") 80 fh.write("export log_location="+os.getcwd()+"\n") 81 fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 82 fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 83 fh.write("date >> ${log_location}/Log.txt\n") 84 92 global portion 93 tmp_list=glob.glob("test_*/CONFIG_*") 94 nb_configs = len(tmp_list) 95 portion = 100.0/nb_configs 96 97 if machine=="irene": 98 with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 99 fh.write("#!/bin/bash\n") 100 fh.write("#MSUB -r XIOS\n") 101 fh.write("#MSUB -eo\n") 102 fh.write("#MSUB -o client_output.out\n") 103 fh.write("#MSUB -e client_error.err\n") 104 fh.write("#MSUB -c 1\n") 105 fh.write("#MSUB -n "+str(nb_proc_irene)+"\n") 106 fh.write("#MSUB -X\n") 107 fh.write("#MSUB -x\n") 108 fh.write("#MSUB -T 1800\n") 109 fh.write("#MSUB -q skylake\n") 110 fh.write("#MSUB -A gen0826\n") 111 fh.write("#MSUB -Q test\n") 112 fh.write("#MSUB -m work,scratch\n") 113 fh.write("export location="+os.getcwd()+"\n") 114 fh.write("export log_location="+os.getcwd()+"\n") 115 fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 116 fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 117 fh.write("date >> ${log_location}/Log.txt\n") 118 119 if machine=="jeanzay": 120 with open("full_job_"+arch+"_"+mode+".sh", "w") as fh: 121 fh.write("#!/bin/bash\n") 122 fh.write("#SBATCH --ntasks="+str(nb_proc_jz)+"\n") 123 fh.write("#SBATCH --hint=nomultithread\n") 124 fh.write("#SBATCH -t 00:10:00\n") 125 fh.write("#SBATCH --account=psl@cpu\n") 126 fh.write("ulimit -c 0\n") 127 fh.write("cd ${SLURM_SUBMIT_DIR}\n") 128 fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n") 129 fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt\n") 130 fh.write("export location="+os.getcwd()+"\n") 131 fh.write("export log_location="+os.getcwd()+"\n") 132 fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n") 133 fh.write("date >> ${log_location}/Log.txt\n") 134 135 136 85 137 test_folder_list = glob.glob('test_*') 86 138 all_config=dict() … … 153 205 fh.write("/\n") 154 206 155 generate_job _irene(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers'])207 generate_job(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers']) 156 208 update_full_job(test_folder+"/CONFIG_"+mystr, full_config['NumberClients']+full_config['NumberServers']) 157 209 158 210 #print(config_name) 211 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 212 fh.write("wait\nwait\n") 213 fh.write("echo \"tests in "+test_folder+" finished\"\n") 159 214 all_config[test_folder] = config_name 160 161 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 162 fh.write("\nfor pid in ${PIDS[@]}; do\n") 163 fh.write("wait ${pid}\n") 164 fh.write("STATUS+=($?)\ndone\n") 165 fh.write("\ni=0\n") 166 fh.write("#for st in ${STATUS[@]}; do\n") 167 fh.write("#if [[ ${st} -ne 0 ]]; then\n") 168 fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n") 169 fh.write("#else\n") 170 fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n") 171 fh.write("#fi\n") 172 fh.write("#((i+=1))\n") 173 fh.write("#done\n\n") 174 fh.write("#wait\n") 175 fh.write("date >> ${log_location}/Log.txt\n") 176 215 216 217 if machine=="irene": 218 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 219 fh.write("\nfor pid in ${PIDS[@]}; do\n") 220 fh.write("wait ${pid}\n") 221 fh.write("STATUS+=($?)\ndone\n") 222 fh.write("\ni=0\n") 223 fh.write("#for st in ${STATUS[@]}; do\n") 224 fh.write("#if [[ ${st} -ne 0 ]]; then\n") 225 fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n") 226 fh.write("#else\n") 227 fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n") 228 fh.write("#fi\n") 229 fh.write("#((i+=1))\n") 230 fh.write("#done\n\n") 231 fh.write("#wait\n") 232 fh.write("date >> ${log_location}/Log.txt\n") 233 if machine=="jeanzay": 234 with open("full_job_"+arch+"_"+mode+".sh", "a") as fh: 235 fh.write("date >> ${log_location}/Log.txt\n") 236 237 177 238 #print(all_config) 178 239
Note: See TracChangeset
for help on using the changeset viewer.