Changeset 1737
- Timestamp:
- 10/08/19 20:23:21 (5 years ago)
- Location:
- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE
- Files:
-
- 2 added
- 16 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/check.py
r1734 r1737 8 8 9 9 def OSinfo(runthis): 10 red = lambda text: '\033[0;31m' + text + '\033[0m' 10 11 osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) 11 12 theInfo = osstdout.communicate()[0].strip() 12 # print(theInfo)13 # print(osstdout.returncode)14 # return (osstdout.returncode)15 16 13 if osstdout.returncode!=0: 14 print(red(runthis+" FAILED")) 17 15 print >> sys.stderr, osstdout.returncode 18 16 sys.exit() 19 else:20 print(runthis+" OK")17 # else: 18 # print(runthis+" OK") 21 19 22 20 … … 62 60 63 61 62 64 63 configName = "config" 65 64 defaultConfig = True … … 83 82 print blue(" ****************************************************************\n") 84 83 85 # os.mkdir(configName+'/setup') 86 os.system("mkdir "+configName+'/setup') 87 os.mkdir(configName+'/tmp_reference') 88 os.mkdir(configName+'/xios_output') 89 90 os.system('mv param.def '+configName+'/setup/') 91 os.system('mv all_param.def '+configName+'/setup/') 92 os.system('mv user_param.py '+configName+'/setup/') 93 os.system('mv iodef.xml '+configName+'/setup/') 94 os.system('cp context_atm.xml '+configName+'/setup/') 95 os.system('cp context_grid_dynamico.xml '+configName+'/setup/') 96 os.system('cp dynamico_grid.nc '+configName+'/setup/') 97 os.system('mv xios_*.out '+configName+'/xios_output/') 98 os.system('mv xios_*.err '+configName+'/xios_output/') 84 OSinfo("mkdir "+configName+'/setup') 85 OSinfo('mkdir '+configName+'/tmp_reference') 86 OSinfo('mkdir '+configName+'/xios_output') 87 88 OSinfo('mv param.def '+configName+'/setup/') 89 OSinfo('mv all_param.def '+configName+'/setup/') 90 OSinfo('mv user_param.py '+configName+'/setup/') 91 OSinfo('mv iodef.xml '+configName+'/setup/') 92 OSinfo('cp context_atm.xml '+configName+'/setup/') 93 OSinfo('cp context_grid_dynamico.xml '+configName+'/setup/') 94 OSinfo('cp dynamico_grid.nc '+configName+'/setup/') 95 OSinfo('mv xios_*.out '+configName+'/xios_output/') 96 OSinfo('mv xios_*.err '+configName+'/xios_output/') 99 97 100 98 … … 114 112 if thisfile.endswith(".nc") and thisfile!="dynamico_grid.nc": 115 113 cmd = 'mv '+thisfile + ' '+configName+'/tmp_reference/' 116 os.system(cmd)114 OSinfo(cmd) 117 115 118 116 h.write("test for "+lpurple("all NC files")+" \t"+yellow('INITIALIZED')+"\n") … … 126 124 if not line.startswith("#") and len(line) != 0: 127 125 cmd = 'mv '+line + ' '+configName+'/tmp_reference/' 128 os.system(cmd)126 OSinfo(cmd) 129 127 130 128 h.write("test for "+lpurple(line)+" \t"+yellow('INITIALIZED')+"\n") … … 239 237 240 238 if not os.path.exists('current_run'): 241 os.mkdir('current_run')239 OSinfo('mkdir current_run') 242 240 243 241 if not os.path.exists('current_run/'+configName): 244 os.mkdir('current_run/'+configName) 245 os.system('mv -f param.def current_run/'+configName) 246 os.system('mv -f all_param.def current_run/'+configName) 247 os.system('mv -f user_param.py current_run/'+configName) 248 os.system('mv -f iodef.xml current_run/'+configName) 249 os.system('rm -f current_run/'+configName+'/context_atm.xml') 250 os.system('cp -n context_atm.xml current_run/'+configName) 251 os.system('cp -f context_grid_dynamico.xml current_run/'+configName) 252 os.system('cp -f dynamico_grid.nc current_run/'+configName) 253 os.system('mv -f xios_*.out current_run/'+configName) 254 os.system('mv -f xios_*.err current_run/'+configName) 242 OSinfo('mkdir current_run/'+configName) 243 244 OSinfo('mv -f param.def current_run/'+configName) 245 OSinfo('mv -f all_param.def current_run/'+configName) 246 OSinfo('mv -f user_param.py current_run/'+configName) 247 OSinfo('mv -f iodef.xml current_run/'+configName) 248 OSinfo('rm -f current_run/'+configName+'/context_atm.xml') 249 OSinfo('cp -n context_atm.xml current_run/'+configName) 250 OSinfo('cp -f context_grid_dynamico.xml current_run/'+configName) 251 OSinfo('cp -f dynamico_grid.nc current_run/'+configName) 252 OSinfo('mv -f xios_*.out current_run/'+configName) 253 OSinfo('mv -f xios_*.err current_run/'+configName) 255 254 256 255 -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh
r1734 r1737 34 34 35 35 # python user_config.py 36 37 rm -f setup.sh 38 touch setup.sh 39 >setup.sh 40 for i in $(ls -d test_*/) 41 do 42 cp setup.py ${i%%/} 43 cp run_sub_test.sh ${i%%/} 44 echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh 45 echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh 46 done 47 36 48 export output=$(python user_config.py 2>&1 >/dev/null) 37 49 … … 44 56 fi 45 57 58 46 59 cmake . 47 ctest -V 60 # ctest -V 61 ctest --output-on-failure 48 62 make report 63 64 65 rm -f test_*/setup.py 66 rm -f test_*/run_sub_test.sh 67 rm -f test_*/run_test_*.py 68 rm -f test_*/CMakeLists.txt 69 49 70 50 71 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/job_jz.sh
r1729 r1737 33 33 export machine_name=jeanzay 34 34 35 cp ../setup.py ./ 36 cp ../run_sub_test.sh ./ 37 35 38 python setup.py 36 39 37 40 cmake . 38 ctest -V39 41 40 # ./run_sub_test.sh42 #ctest --output-on-failure #enable output only when test failed 41 43 42 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf 43 #srun --mpi=pmi2 ../bin/test_client.exe 44 ctest -V #enable all output 44 45 45 46 rm -f setup.py run_sub_test.sh 47 rm -f run_test_*.py 48 rm -f user_param.py.* -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/job_jz.sh
r1729 r1737 33 33 export machine_name=jeanzay 34 34 35 cp ../setup.py ./ 36 cp ../run_sub_test.sh ./ 37 35 38 python setup.py 36 39 37 40 cmake . 38 ctest -V39 #./run_sub_test.sh40 41 41 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf 42 #srun --mpi=pmi2 ../bin/test_client.exe 42 ctest --output-on-failure #enable output only when test failed 43 43 44 #ctest -V #enable all output 44 45 46 rm -f setup.py run_sub_test.sh 47 rm -f run_test_*.py 48 rm -f user_param.py.* 49 -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/job_jz.sh
r1729 r1737 33 33 export machine_name=jeanzay 34 34 35 cp ../setup.py ./ 36 cp ../run_sub_test.sh ./ 37 35 38 python setup.py 36 39 37 40 cmake . 38 ctest -V39 41 40 #./run_sub_test.sh 42 ctest --output-on-failure #enable output only when test failed 41 43 42 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf 43 #srun --mpi=pmi2 ../bin/test_client.exe 44 #ctest -V #enable all output 44 45 46 rm -f setup.py run_sub_test.sh 47 rm -f run_test_*.py 48 rm -f user_param.py.* 45 49 -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/job_jz.sh
r1729 r1737 6 6 #SBATCH --hint=nomultithread 7 7 #SBATCH -t 00:10:00 # Temps elapsed maximum d'exécution 8 #SBATCH -o test_client %j.out # Nom du fichier de sortie9 #SBATCH -e test_client %j.err # Nom du fichier d'erreur8 #SBATCH -o test_client.out # Nom du fichier de sortie 9 #SBATCH -e test_client.err # Nom du fichier d'erreur 10 10 ##SBATCH -p cpu_port # Nom de la partition d'exécution 11 11 ##SBATCH -A sos@cpu … … 33 33 export machine_name=jeanzay 34 34 35 cp ../setup.py ./ 36 cp ../run_sub_test.sh ./ 37 35 38 python setup.py 39 36 40 cmake . 37 ctest -V38 41 39 #./run_sub_test.sh 42 ctest --output-on-failure #enable output only when test failed 40 43 41 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf 42 #srun --mpi=pmi2 ../bin/test_client.exe 44 #ctest -V #enable all output 43 45 46 rm -f setup.py run_sub_test.sh 47 rm -f run_test_*.py 48 rm -f user_param.py.* 44 49 -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_jz.sh
r1729 r1737 6 6 #SBATCH --hint=nomultithread 7 7 #SBATCH -t 00:10:00 # Temps elapsed maximum d'exécution 8 #SBATCH -o test_client %j.out # Nom du fichier de sortie9 #SBATCH -e test_client %j.err # Nom du fichier d'erreur8 #SBATCH -o test_client.out # Nom du fichier de sortie 9 #SBATCH -e test_client.err # Nom du fichier d'erreur 10 10 ##SBATCH -p cpu_port # Nom de la partition d'exécution 11 11 ##SBATCH -A sos@cpu … … 33 33 export machine_name=jeanzay 34 34 35 cp ../setup.py ./ 36 cp ../run_sub_test.sh ./ 37 35 38 python setup.py 39 36 40 cmake . 37 ctest -V38 #./run_sub_test.sh39 41 40 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf 41 #srun --mpi=pmi2 ../bin/test_client.exe 42 ctest --output-on-failure #enable output only when test failed 42 43 44 #ctest -V #enable all output 43 45 46 rm -f setup.py run_sub_test.sh 47 rm -f run_test_*.py 48 rm -f user_param.py.* -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/user_config.py
r1734 r1737 13 13 if folder.startswith("test_"): 14 14 test_list.append(folder) 15 # os.system('cd '+folder+' && python setup.py') 16 FNULL = open(os.devnull, 'w') 17 retcode = subprocess.call(['cd', folder, ' && python setup.py'], 18 stdout=FNULL, 19 stderr=subprocess.STDOUT) 20 21 if retcode!=0: 22 print >> sys.stderr, retcode 23 sys.exit() 15 FNULL = open(os.devnull, 'w') 16 retcode = subprocess.call(['bash', 'setup.sh'], stdout=FNULL, stderr=subprocess.STDOUT) 17 if retcode!=0: 18 print("setup.sh failed") 19 print >> sys.stderr, retcode 20 sys.exit() 24 21 25 22 26 23 f=open("CMakeLists.txt", "w") 27 24 28 f.write("############################## \n")29 f.write("# file generated by setup.py #\n")30 f.write("# DO NOT modify #\n")31 f.write("############################## \n\n")25 f.write("####################################\n") 26 f.write("# file generated by user_config.py #\n") 27 f.write("# DO NOT modify #\n") 28 f.write("####################################\n\n") 32 29 33 30 f.write("cmake_minimum_required(VERSION 2.8.12.2)\n\n")
Note: See TracChangeset
for help on using the changeset viewer.