Changeset 2218


Ignore:
Timestamp:
09/06/21 16:38:42 (3 years ago)
Author:
jderouillat
Message:

Update trunk test suite with the same protocol that on COUPLING

Location:
XIOS/trunk/xios_test_suite
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/xios_test_suite/COMPILE/compile_irene

    r1945 r2218  
    11#!/bin/bash 
    22 
    3 set -x  
     3#set -x  
    44 
    55export revision=$(svn info --show-item revision .. 2>&1) 
  • XIOS/trunk/xios_test_suite/COMPILE/compile_jeanzay

    r1945 r2218  
    11#!/bin/bash 
    2 set -x  
     2#set -x  
    33export revision=$(svn info --show-item revision .. 2>&1) 
    44python 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 
     1module load subversion    2>&1 
     2module load cmake         2>&1 
     3module load python3/3.7.5 2>&1 
     4module load cdo/1.9.5     2>&1 
    45 
    56CHMOD() { 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 
     1module load subversion   2>&1 
     2module load cmake        2>&1 
     3module load python/3.7.5 2>&1 
     4module load cdo/1.9.8    2>&1 
    55 
    66CHMOD() { 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  
    197197                config_name.append(mystr) 
    198198            #print(mystr) 
     199            if ( os.path.isdir( test_folder+"/CONFIG_"+mystr ) ) : 
     200                OSinfo("rm -rf "+test_folder+"/CONFIG_"+mystr) 
    199201            OSinfo("mkdir -p "+test_folder+"/CONFIG_"+mystr) 
    200202            OSinfo("cp build_"+arch+"_"+mode+"/bin/generic_testcase.exe "+test_folder+"/CONFIG_"+mystr) 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/step2.py

    r1915 r2218  
    77import copy 
    88 
     9import netCDF4 
     10from netCDF4 import Dataset 
     11import numpy as np 
    912 
    1013mode=os.getenv("mode") 
     
    1821def OSinfo(runthis): 
    1922    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: 
    2326        print(red(runthis+" FAILED")) 
    24         print(theInfo) 
     27        print(theErr) 
    2528        sys.exit() 
    2629 
     
    7275                for checkfile in checkfiles: 
    7376                    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 
    78105                        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 
    79109                    
    80110 
  • XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/context_atm.xml

    r1972 r2218  
    77    <domain id="domain" /> 
    88    <domain id="other_domain" /> 
    9     <domain id="square_domain" ni_glo="36" nj_glo="36" type="rectilinear"/> 
     9    <domain id="square_domain" ni_glo="34" nj_glo="38" type="rectilinear"/> 
    1010  </domain_definition> 
    1111 
     
    7373      <domain domain_ref="square_domain"> 
    7474      <generate_rectilinear_domain lon_start="-175"/> 
    75       <interpolate_domain /> 
     75      <interpolate_domain order="1" /> 
    7676      </domain>  
    7777    </grid> 
Note: See TracChangeset for help on using the changeset viewer.