Changeset 2218
- Timestamp:
- 09/06/21 16:38:42 (3 years ago)
- Location:
- XIOS/trunk/xios_test_suite
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/xios_test_suite/COMPILE/compile_irene
r1945 r2218 1 1 #!/bin/bash 2 2 3 set -x3 #set -x 4 4 5 5 export revision=$(svn info --show-item revision .. 2>&1) -
XIOS/trunk/xios_test_suite/COMPILE/compile_jeanzay
r1945 r2218 1 1 #!/bin/bash 2 set -x2 #set -x 3 3 export revision=$(svn info --show-item revision .. 2>&1) 4 4 python config_compile.py -
XIOS/trunk/xios_test_suite/ENV/irene.env
r2157 r2218 1 module load subversion 2 module load cmake 3 module load python3/3.7.5 1 module load subversion 2>&1 2 module load cmake 2>&1 3 module load python3/3.7.5 2>&1 4 module load cdo/1.9.5 2>&1 4 5 5 6 CHMOD() { chmod --quiet ug+rwX,o+rX "$@" ;} -
XIOS/trunk/xios_test_suite/ENV/jeanzay.env
r2155 r2218 1 module load subversion 2 module load cmake 3 module load python/3.7.5 4 module load cdo 1 module load subversion 2>&1 2 module load cmake 2>&1 3 module load python/3.7.5 2>&1 4 module load cdo/1.9.8 2>&1 5 5 6 6 CHMOD() { setfacl -m u::rwX,u:rpsl565:rwX,u:rpsl954:rwX,u:rgzi016:rwX,g::r-X,o::r-X,m::rwX "$@" ;} -
XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py
r1944 r2218 197 197 config_name.append(mystr) 198 198 #print(mystr) 199 if ( os.path.isdir( test_folder+"/CONFIG_"+mystr ) ) : 200 OSinfo("rm -rf "+test_folder+"/CONFIG_"+mystr) 199 201 OSinfo("mkdir -p "+test_folder+"/CONFIG_"+mystr) 200 202 OSinfo("cp build_"+arch+"_"+mode+"/bin/generic_testcase.exe "+test_folder+"/CONFIG_"+mystr) -
XIOS/trunk/xios_test_suite/TEST_SUITE/step2.py
r1915 r2218 7 7 import copy 8 8 9 import netCDF4 10 from netCDF4 import Dataset 11 import numpy as np 9 12 10 13 mode=os.getenv("mode") … … 18 21 def OSinfo(runthis): 19 22 red = lambda text: '\033[0;31m' + text + '\033[0m' 20 osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess. STDOUT, close_fds=True)21 theInfo = osstdout.communicate()[0].strip()22 if osstdout.returncode!=0:23 osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) 24 theInfo, theErr = osstdout.communicate() 25 if theErr: 23 26 print(red(runthis+" FAILED")) 24 print(the Info)27 print(theErr) 25 28 sys.exit() 26 29 … … 72 75 for checkfile in checkfiles: 73 76 if os.path.exists(config+"/"+checkfile) and os.path.exists("reference/ref_"+config+"/"+checkfile): 74 OSinfo("cdo -W diffn "+config+"/"+checkfile+" "+"reference/ref_"+config+"/"+checkfile+" | > diff.txt") 75 if os.stat("diff.txt").st_size==0: 76 report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(1)+"\n") 77 elif os.path.exists(config+"/"+checkfile): 77 #OSinfo("cdo -W diffn "+config+"/"+checkfile+" "+"reference/ref_"+config+"/"+checkfile+" 2>&1 |grep -v 'Found more than one time variable'|grep -v 'cdo diffn: Processed'|grep -v 'cdo diffn: Processed'|grep -v 'Time variable >time_counter< not found!' > diff_"+checkfile+".txt") 78 #if os.stat("diff_"+checkfile+".txt").st_size==0: # if no diff -> set 0 79 # report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(1)+"\n") 80 #else: # if cdo diffn returns diff -> set -1 81 # report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(-1)+"\n") 82 ref = Dataset( "reference/ref_"+config+"/"+checkfile ) 83 res = Dataset( config+"/"+checkfile ) 84 validated = 1 85 for var in res.variables: 86 if (not (var.startswith('lon_'))) and (not (var.startswith('lat_'))) and (not (var.startswith('time_'))) and (not (var.startswith('atm__'))): 87 ref_interp = ref.variables[var] 88 ref_array = ref_interp[:] 89 res_interp = res.variables[var] 90 res_array = res_interp[:] 91 if (res_array.shape == ref_array.shape): 92 diff = np.zeros_like( ref_array ) 93 np.divide(ref_array-res_array,ref_array,diff,where=(ref_array[:]>10**-15)) 94 if ( np.max(np.abs(diff)) > 1*10**-9 ): 95 validated = -1 96 diff = np.zeros_like( ref_array ) 97 np.divide(ref_array-res_array,res_array,diff,where=(ref_array[:]>10**-15)) 98 if ( np.max(np.abs(diff)) > 1*10**-9 ): 99 validated = -1 100 else: 101 validated = -1 102 report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(validated)+"\n") 103 104 elif os.path.exists(config+"/"+checkfile): # if no ref file -> set 0 78 105 report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(0)+"\n") 106 elif os.path.exists("reference/ref_"+config+"/"+checkfile): # if no output file -> set -2 107 report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(-2)+"\n") 108 79 109 80 110 -
XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/context_atm.xml
r1972 r2218 7 7 <domain id="domain" /> 8 8 <domain id="other_domain" /> 9 <domain id="square_domain" ni_glo="3 6" nj_glo="36" type="rectilinear"/>9 <domain id="square_domain" ni_glo="34" nj_glo="38" type="rectilinear"/> 10 10 </domain_definition> 11 11 … … 73 73 <domain domain_ref="square_domain"> 74 74 <generate_rectilinear_domain lon_start="-175"/> 75 <interpolate_domain />75 <interpolate_domain order="1" /> 76 76 </domain> 77 77 </grid>
Note: See TracChangeset
for help on using the changeset viewer.