Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/CMakeLists.txt
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/CMakeLists.txt	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/CMakeLists.txt	(revision 1734)
@@ -10,5 +10,4 @@
 enable_testing()
 
-add_subdirectory(test_config)
 add_subdirectory(test_domain_algo)
 add_subdirectory(test_scalar_algo)
@@ -23,6 +22,4 @@
                    COMMAND rm -f report.txt
                    COMMAND rm -f report.html
-                   COMMAND cat test_config/report.txt >> report.txt
-                   COMMAND cat test_config/report.html >> report.html
                    COMMAND cat test_domain_algo/report.txt >> report.txt
                    COMMAND cat test_domain_algo/report.html >> report.html
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/check.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/check.py	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/check.py	(revision 1734)
@@ -1,7 +1,23 @@
 import os
 import sys
+import subprocess
 
 
 from user_param import *
+
+
+def OSinfo(runthis):
+	osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
+	theInfo = osstdout.communicate()[0].strip()
+	# print(theInfo)
+	# print(osstdout.returncode)
+	# return (osstdout.returncode)
+
+	if osstdout.returncode!=0:
+		print >> sys.stderr, osstdout.returncode
+		sys.exit()
+	else:
+		print(runthis+" OK")
+
 
 def main():
@@ -57,4 +73,6 @@
 		configName = "config_default"
 
+	check_result=False
+
 
 	if not os.path.exists(configName):
@@ -65,5 +83,6 @@
 		print blue("    ****************************************************************\n")
 
-		os.mkdir(configName+'/setup')
+		# os.mkdir(configName+'/setup')
+		os.system("mkdir "+configName+'/setup')
 		os.mkdir(configName+'/tmp_reference')
 		os.mkdir(configName+'/xios_output')
@@ -85,7 +104,24 @@
 		h.write("Config : "+configName+"\n")		
 		l.write("<p>Config : "+configName+"</p>")	
+		endloop=False
 		for line in f:
 			line=line.strip()
 			line=line.rstrip()
+
+			if line.startswith("all"):
+				allfiles = os.listdir(os.getcwd())
+				for thisfile in allfiles:
+					if thisfile.endswith(".nc") and thisfile!="dynamico_grid.nc":
+						cmd = 'mv '+thisfile + ' '+configName+'/tmp_reference/'
+						os.system(cmd)	
+				
+				h.write("test for "+lpurple("all NC files")+"     \t"+yellow('INITIALIZED')+"\n")		
+				l.write("<p>test for <font color=\"purple\">"+"all NC files"+"</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"darkorange\">INITIALIZED</font></p>")
+				print yellow("\n        ****************************************")
+				print yellow("        ** "+"all NC files"+" is stored as temporal reference !!! **")
+				print yellow("\n        ****************************************")
+
+				break
+
 			if not line.startswith("#") and len(line) != 0:
 				cmd = 'mv '+line + ' '+configName+'/tmp_reference/'
@@ -107,9 +143,9 @@
 		print blue("\n    ********************************************************")
 		print blue("    * Directory " + repr(configName) + " already exists")
-		print blue("    * Start comparing results with (tmp) references")
+		print blue("    * Start comparing results with references")
 		print blue("    ********************************************************\n")
 
 		tmp_ref = os.path.isdir(configName+'/tmp_reference')
-		ref = os.path.isdir(configName+'/reference')
+		ref = os.path.isdir(configName+'/reference') and not tmp_ref
 
 		if ref:
@@ -117,6 +153,4 @@
 			print blue("    | Comparing results with references |")
 			print blue("    =====================================\n")
-			os.system('rm -rf '+configName+'/tmp_reference/')
-			tmp_ref = False
 			path = configName+'/reference/'
 		elif tmp_ref:
@@ -124,5 +158,5 @@
 			print blue("    | Comparing results with NON-Validated references |")
 			print blue("    ===================================================\n")
-			path = ' '+configName+'/tmp_reference/'
+			path = configName+'/tmp_reference/'
 		
 		f=open("checkfile.def", "r")
@@ -138,7 +172,41 @@
 			line=line.rstrip()
 			
-			if not line.startswith("#") and len(line) != 0:
-				cmd = 'cdo diffn '+ line + path + line + ' | tail -1 > diff.txt'
-				os.system(cmd)
+			if line.startswith("all") :
+				for thisfile in os.listdir(path):
+					if thisfile.endswith(".nc"):
+						cmd = 'cdo -W diffn '+ thisfile +' '+ path + thisfile + ' | tail -1 > diff.txt'
+						
+						OSinfo(cmd)
+						
+						if os.stat("diff.txt").st_size==0:
+							h.write("test for "+lpurple(thisfile)+"     \t"+green('PASSED')+"\n")		
+							l.write("<p>test for <font color=\"purple\">"+thisfile+"</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"green\">PASSED</font></p>")		
+							print green("\n        ****************************************")
+							print green("        ** "+thisfile+" is valid !!! **")
+							print green("\n        ****************************************")
+
+						else:	
+							g=open("diff.txt", "r")
+							for gline in g:
+								if gline.strip().startswith("0") or ":" in gline :
+									h.write("test for "+lpurple(thisfile)+"      \t"+green('PASSED')+"\n")		
+									l.write("<p>test for <font color=\"purple\">"+thisfile+"</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"green\">PASSED</font></p>")		
+									print green("\n        ****************************************")
+									print green("        ** "+thisfile+" is valid !!! **")
+									print green("\n        ****************************************")
+								else:
+									h.write("test for "+lpurple(thisfile)+"     \t"+red('FAILED')+"\n")		
+									l.write("<p>test for <font color=\"purple\">"+thisfile+"</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"red\">FAILED</font></p>")		
+									print red("\n        **************************************************")
+									print red("        ** "+thisfile+" is NOT valid. Please debugging.. **")
+									print red("\n        **************************************************")
+							g.close()
+				break
+
+
+			elif not line.startswith("#") and len(line) != 0:
+				cmd = 'cdo -W diffn '+ line +' '+ path + line + ' | tail -1 > diff.txt'
+				
+				OSinfo(cmd)
 
 				if os.stat("diff.txt").st_size==0:
@@ -187,4 +255,6 @@
 
 
+
+
 if __name__== "__main__":
   main()
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/clean_config.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/clean_config.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/clean_config.sh	(revision 1734)
@@ -1,6 +1,3 @@
-bash -c "cd test_function/test_average && rm -rf config_*"
-bash -c "cd test_function/test_maximum && rm -rf config_*"
-bash -c "cd test_function/test_minimum && rm -rf config_*"
-bash -c "cd test_function/test_sum && rm -rf config_*"
+bash -c "cd test_function && rm -rf config_*"
 bash -c "cd test_scalar_algo && rm -rf config_*"
 bash -c "cd test_axis_algo && rm -rf config_*"
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/config.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/config.py	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/config.py	(revision 1734)
@@ -34,8 +34,6 @@
 	nb_proc = NumberClients+NumberServers
 
-	# os.rename("iodef.xml", "iodef.xml.bkp")
-
-	filein = open("iodef.xml.bkp", "r")
-	fileout = open("iodef.xml.tmp", "w")
+	filein = open("../iodef.xml.template", "r")
+	fileout = open("iodef.xml", "w") #this iodef.xml has defined variables, it is not the template
 	for line in filein:
 		if 'xios::nbplSrv2' in line:	line = line.replace("xios::nbplSrv2", repr(NumberPoolsServer2))
@@ -48,5 +46,4 @@
 	filein.close()
 	fileout.close()
-	os.rename("iodef.xml.tmp", "iodef.xml")
 
 
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_from_reference.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_from_reference.py	(revision 1734)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_from_reference.py	(revision 1734)
@@ -0,0 +1,58 @@
+import os
+import sys
+import socket
+
+
+def main():
+
+	black = lambda text: '\033[0;30m' + text + '\033[0m'
+	red = lambda text: '\033[0;31m' + text + '\033[0m'
+	green = lambda text: '\033[0;32m' + text + '\033[0m'
+	yellow = lambda text: '\033[0;33m' + text + '\033[0m'
+	blue = lambda text: '\033[0;34m' + text + '\033[0m'
+	magenta = lambda text: '\033[0;35m' + text + '\033[0m'
+	cyan = lambda text: '\033[0;36m' + text + '\033[0m'
+	lgray = lambda text: '\033[0;37m' + text + '\033[0m'
+	dgray = lambda text: '\033[1;30m' + text + '\033[0m'
+	lred = lambda text: '\033[1;32m' + text + '\033[0m'
+	lgreen = lambda text: '\033[1;32m' + text + '\033[0m'
+	lyellow = lambda text: '\033[1;33m' + text + '\033[0m'
+	lblue = lambda text: '\033[1;34m' + text + '\033[0m'
+	lpurple = lambda text: '\033[1;35m' + text + '\033[0m'
+	lcyan = lambda text: '\033[1;36m' + text + '\033[0m'
+	white = lambda text: '\033[1;37m' + text + '\033[0m'
+
+	hostname=socket.gethostname()
+
+	if hostname.startswith("jean-zay"):
+		print("using JZ")
+		zipdir=os.environ['WORK']+'/JZ_Xios_reference'
+	elif hostname.startswith("irene"):
+		print("using Irene")
+		zipdir=os.environ['CCCWORKDIR']+'/Irene_Xios_reference'
+	else :
+		print("using other machine")
+		sys.exit()
+
+	
+
+	if not os.path.isdir(zipdir):
+		os.system("mkdir "+zipdir)
+
+	my_list = os.listdir(os.getcwd())
+
+	test_list=[]
+	for folder in my_list:
+		if folder.startswith("test_"):
+			test_list.append(folder)
+
+	for folder in test_list:
+		os.system('unzip -oq '+zipdir+'/'+folder+'.zip'+' -d ./' )
+		# print('unzip -oq '+zipdir+'/'+folder+'.zip'+' -d ./' )
+		print(cyan(folder)+' reference retrived from archive in '+zipdir)
+
+
+
+if __name__== "__main__":
+  main()
+# unzip -oq /gpfswork/rech/psl/rpsl954/JZ_Xios_reference/test_function.zip -d ./
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_to_reference.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_to_reference.py	(revision 1734)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/copy_to_reference.py	(revision 1734)
@@ -0,0 +1,64 @@
+import os
+import sys
+import socket
+
+
+def main():
+
+	black = lambda text: '\033[0;30m' + text + '\033[0m'
+	red = lambda text: '\033[0;31m' + text + '\033[0m'
+	green = lambda text: '\033[0;32m' + text + '\033[0m'
+	yellow = lambda text: '\033[0;33m' + text + '\033[0m'
+	blue = lambda text: '\033[0;34m' + text + '\033[0m'
+	magenta = lambda text: '\033[0;35m' + text + '\033[0m'
+	cyan = lambda text: '\033[0;36m' + text + '\033[0m'
+	lgray = lambda text: '\033[0;37m' + text + '\033[0m'
+	dgray = lambda text: '\033[1;30m' + text + '\033[0m'
+	lred = lambda text: '\033[1;32m' + text + '\033[0m'
+	lgreen = lambda text: '\033[1;32m' + text + '\033[0m'
+	lyellow = lambda text: '\033[1;33m' + text + '\033[0m'
+	lblue = lambda text: '\033[1;34m' + text + '\033[0m'
+	lpurple = lambda text: '\033[1;35m' + text + '\033[0m'
+	lcyan = lambda text: '\033[1;36m' + text + '\033[0m'
+	white = lambda text: '\033[1;37m' + text + '\033[0m'
+
+	hostname=socket.gethostname()
+
+	if hostname.startswith("jean-zay"):
+		print("using JZ")
+		zipdir=os.environ['WORK']+'/JZ_Xios_reference'
+	elif hostname.startswith("irene"):
+		print("using Irene")
+		zipdir=os.environ['CCCWORKDIR']+'/Irene_Xios_reference'
+	else :
+		print("using other machine")
+		sys.exit()
+
+	if not os.path.isdir(zipdir):
+		os.system("mkdir "+zipdir)
+
+
+	my_list = os.listdir(os.getcwd())
+
+	test_list=[]
+	for folder in my_list:
+		if folder.startswith("test_"):
+			test_list.append(folder)
+
+	for folder in test_list:
+		# make tmp_reference to reference
+		all_subfolders = os.listdir(folder)
+		for subfolder in all_subfolders:
+			if subfolder.startswith("config_"):
+				os.system("bash -c \"cd "+folder+"/"+subfolder+ " &&  mv tmp_reference reference \" ")
+
+
+
+		os.system('rm -f '+zipdir+'/'+folder+'.zip' )
+		os.system('zip -rq '+zipdir+'/'+folder+'  '+folder+'/config_*' )
+		print(cyan(folder)+' reference stored in '+zipdir)
+
+
+
+if __name__== "__main__":
+  main()
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/iodef.xml.template
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/iodef.xml.template	(revision 1734)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/iodef.xml.template	(revision 1734)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+
+<simulation>
+
+  <context id="atm">
+    <variable_definition>
+
+      <variable id="timestep"> 1h </variable>
+      <variable id="domain"> atm::domain </variable>
+      <variable id="domain_mask"> true </variable>
+      <variable id="axis_mask"> false </variable>
+      <variable id="init_field2D"> rank </variable>
+      <variable id="ni"> 36 </variable>
+      <variable id="nj"> 18 </variable>
+      <variable id="nlev"> 10 </variable>
+      <variable id="pressure_factor"> 0.10 </variable>
+      <variable id="mask3d"> false </variable>
+<!--      <variable id="domain_proc_frac">3</variable>
+      <variable id="axis_proc_frac">2</variable>
+      <variable id="axis_proc_n">2</variable>
+      <variable id="ensemble_proc_n">2</variable> -->
+      
+      <variable id="other_domain"> lmdz </variable>
+      <variable id="other_domain_mask"> false </variable>
+      <variable id="other_axis_mask"> false </variable>
+      <variable id="other_init_field2D"> academic </variable>
+      <variable id="other_ni"> 36 </variable>
+      <variable id="other_nj"> 18 </variable>
+      <variable id="other_nlev"> 10 </variable>
+      <variable id="other_pressure_factor"> 0.10 </variable>
+      <variable id="other_mask3d"> false </variable>
+<!--      <variable id="other_domain_proc_frac">3</variable>
+      <variable id="other_axis_proc_frac">2</variable>
+      <variable id="other_axis_proc_n">2</variable>
+      <variable id="other_ensemble_proc_n">2</variable> -->
+      
+    </variable_definition>
+  </context>
+
+
+
+  <context id="atm" src="./context_atm.xml"/>
+  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
+  
+  <context id="xios">
+    <variable_definition>
+      <variable_group id="buffer">
+  <variable id="min_buffer_size" type="int">10000000</variable>
+  <variable id="optimal_buffer_size" type="string">performance</variable>
+  <variable id="buffer_factor_size" type="double">0.8</variable> 
+      </variable_group>
+
+      <variable_group id="parameters" >
+        <variable id="using_server" type="bool">true</variable>
+        <variable id="info_level" type="int">100</variable>
+        <variable id="print_file" type="bool">true</variable>
+        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
+        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
+        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
+        <variable id="pure_one_sided" type="bool">false</variable>
+        <variable id="check_event_sync" type="bool">true</variable>
+      </variable_group>
+      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
+    </variable_definition>
+  </context>
+
+</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh	(revision 1734)
@@ -50,6 +50,8 @@
 
 export machine_name=irene
+
 python user_config.py
 cmake .
-make test
+ctest -V
+
 make report
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh	(revision 1734)
@@ -33,9 +33,18 @@
 export machine_name=jeanzay
 
-python user_config.py
+# python user_config.py
+export output=$(python user_config.py 2>&1 >/dev/null)
+
+if [ "$output" -ne 0 ]
+then
+	echo "user_config.py failed"
+	exit
+else
+	echo "user_config.py OK"
+fi
+
 cmake .
 ctest -V 
 make report
-#./run_sub_test.sh
 
 #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/checkfile.def
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/checkfile.def	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/checkfile.def	(revision 1734)
@@ -1,3 +1,3 @@
-
+all
 atm_output_zoom.nc
 #atm_output_inverse.nc
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/context_atm.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/context_atm.xml	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/context_atm.xml	(revision 1734)
@@ -35,4 +35,8 @@
     </axis>
 
+    <axis id="domain_Y_inverse" axis_ref="domain_Y">
+        <inverse_axis />
+    </axis>
+
   </axis_definition>
 
@@ -68,4 +72,8 @@
     <grid id="grid_Y">
       <axis axis_ref="domain_Y" />
+    </grid>
+
+    <grid id="grid_Y_inverse">
+      <axis axis_ref="domain_Y_inverse" />
     </grid>
 
@@ -391,4 +399,5 @@
      <file id="atm_output_zoom" output_freq="1ts" enabled="true">
        <field field_ref="field_XY" grid_ref="grid_XY_zoom_Y" operation="instant" enabled="true"/>
+       <!-- <field field_ref="field_Y" grid_ref="grid_Y_inverse" operation="instant" enabled="true"/> -->
      </file>
 
Index: OS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/iodef.xml	(revision 1733)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?xml version="1.0"?>
-
-<simulation>
-
-  <context id="atm">
-    <variable_definition>
-
-      <variable id="timestep"> 1h </variable>
-      <variable id="domain"> atm::domain </variable>
-      <variable id="domain_mask"> true </variable>
-      <variable id="axis_mask"> true </variable>
-      <variable id="init_field2D"> rank </variable>
-      <variable id="ni"> 36 </variable>
-      <variable id="nj"> 18 </variable>
-      <variable id="nlev"> 10 </variable>
-      <variable id="pressure_factor"> 0.10 </variable>
-      <variable id="mask3d"> false </variable>
-<!--      <variable id="domain_proc_frac">3</variable>
-      <variable id="axis_proc_frac">2</variable>
-      <variable id="axis_proc_n">2</variable>
-      <variable id="ensemble_proc_n">2</variable> -->
-      
-      <variable id="other_domain"> lmdz </variable>
-      <variable id="other_domain_mask"> false </variable>
-      <variable id="other_axis_mask"> false </variable>
-      <variable id="other_init_field2D"> academic </variable>
-      <variable id="other_ni"> 36 </variable>
-      <variable id="other_nj"> 18 </variable>
-      <variable id="other_nlev"> 10 </variable>
-      <variable id="other_pressure_factor"> 0.10 </variable>
-      <variable id="other_mask3d"> false </variable>
-<!--      <variable id="other_domain_proc_frac">3</variable>
-      <variable id="other_axis_proc_frac">2</variable>
-      <variable id="other_axis_proc_n">2</variable>
-      <variable id="other_ensemble_proc_n">2</variable> -->
-      
-    </variable_definition>
-  </context>
-
-
-
-  <context id="atm" src="./context_atm.xml"/>
-  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
-  
-  <context id="xios">
-    <variable_definition>
-      <variable_group id="buffer">
-  <variable id="min_buffer_size" type="int">10000000</variable>
-  <variable id="optimal_buffer_size" type="string">performance</variable>
-  <variable id="buffer_factor_size" type="double">0.8</variable> 
-      </variable_group>
-
-      <variable_group id="parameters" >
-        <variable id="using_server" type="bool">true</variable>
-        <variable id="info_level" type="int">100</variable>
-        <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
-        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
-        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
-        <variable id="pure_one_sided" type="bool">false</variable>
-        <variable id="check_event_sync" type="bool">true</variable>
-      </variable_group>
-      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
-    </variable_definition>
-  </context>
-
-</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/run_sub_test.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/run_sub_test.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/run_sub_test.sh	(revision 1734)
@@ -11,5 +11,4 @@
 cp ../default_param.py default_param.py
 
-cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -23,5 +22,4 @@
 
 
-mv iodef.xml iodef.xml.bkp
 
 nb_proc=$(python sub_config.py 2>&1) 
@@ -29,5 +27,5 @@
 machine_name=jeanzay
 
-echo $nb_proc
+# echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
@@ -46,8 +44,8 @@
             echo "execution failed"
             rm -f iodef.xml
-            mv iodef.xml.bkp iodef.xml
             rm -f user_param.py
             rm -f default_param.py
             rm -f sub_config.py
+            rm -f sub_check.py
             exit 1234
     fi
@@ -57,9 +55,22 @@
 fi
 
-python sub_check.py
+check_output=$(python sub_check.py 2>&1 >/dev/null)
+if [[ "$check_output" -ne 0 ]]
+then
+    echo "check.py failed"
+    rm -f iodef.xml
+    rm -f user_param.py
+    rm -f default_param.py
+    rm -f sub_config.py
+    rm -f sub_check.py
+    exit 1
+else
+    echo "check.py OK"
+fi
+
 
 rm -f iodef.xml
-mv iodef.xml.bkp iodef.xml
 rm -f user_param.py
 rm -f default_param.py
 rm -f sub_config.py
+rm -f sub_check.py
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/setup.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/setup.py	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/setup.py	(revision 1734)
@@ -121,5 +121,4 @@
 	dirpath = os.getcwd()
 	foldername = os.path.basename(os.getcwd())
-	print(foldername)
 
 
@@ -137,4 +136,5 @@
 		g.write("import os\n")
 		g.write("import sys\n")
+		g.write("import subprocess\n")
 		g.write("def main():\n")
 		g.write("	os.system(\'rm -f user_param.py\')\n")
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/checkfile.def
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/checkfile.def	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/checkfile.def	(revision 1734)
@@ -1,2 +1,3 @@
+#all
 
 atm_output.nc
Index: OS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/iodef.xml	(revision 1733)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?xml version="1.0"?>
-
-<simulation>
-
-  <context id="atm">
-    <variable_definition>
-
-      <variable id="timestep"> 1h </variable>
-      <variable id="domain"> atm::domain </variable>
-      <variable id="domain_mask"> true </variable>
-      <variable id="axis_mask"> true </variable>
-      <variable id="init_field2D"> rank </variable>
-      <variable id="ni"> 36 </variable>
-      <variable id="nj"> 18 </variable>
-      <variable id="nlev"> 10 </variable>
-      <variable id="pressure_factor"> 0.10 </variable>
-      <variable id="mask3d"> false </variable>
-<!--      <variable id="domain_proc_frac">3</variable>
-      <variable id="axis_proc_frac">2</variable>
-      <variable id="axis_proc_n">2</variable>
-      <variable id="ensemble_proc_n">2</variable> -->
-      
-      <variable id="other_domain"> lmdz </variable>
-      <variable id="other_domain_mask"> false </variable>
-      <variable id="other_axis_mask"> false </variable>
-      <variable id="other_init_field2D"> academic </variable>
-      <variable id="other_ni"> 36 </variable>
-      <variable id="other_nj"> 18 </variable>
-      <variable id="other_nlev"> 10 </variable>
-      <variable id="other_pressure_factor"> 0.10 </variable>
-      <variable id="other_mask3d"> false </variable>
-<!--      <variable id="other_domain_proc_frac">3</variable>
-      <variable id="other_axis_proc_frac">2</variable>
-      <variable id="other_axis_proc_n">2</variable>
-      <variable id="other_ensemble_proc_n">2</variable> -->
-      
-    </variable_definition>
-  </context>
-
-
-
-  <context id="atm" src="./context_atm.xml"/>
-  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
-  
-  <context id="xios">
-    <variable_definition>
-      <variable_group id="buffer">
-  <variable id="min_buffer_size" type="int">10000000</variable>
-  <variable id="optimal_buffer_size" type="string">performance</variable>
-  <variable id="buffer_factor_size" type="double">0.8</variable> 
-      </variable_group>
-
-      <variable_group id="parameters" >
-        <variable id="using_server" type="bool">true</variable>
-        <variable id="info_level" type="int">100</variable>
-        <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
-        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
-        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
-        <variable id="pure_one_sided" type="bool">false</variable>
-        <variable id="check_event_sync" type="bool">true</variable>
-      </variable_group>
-      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
-    </variable_definition>
-  </context>
-
-</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/run_sub_test.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/run_sub_test.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_domain_algo/run_sub_test.sh	(revision 1734)
@@ -12,5 +12,4 @@
 
 
-cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -24,5 +23,4 @@
 
 
-mv iodef.xml iodef.xml.bkp
 
 nb_proc=$(python sub_config.py 2>&1) 
@@ -30,5 +28,5 @@
 machine_name=jeanzay
 
-echo $nb_proc
+# echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
@@ -47,8 +45,8 @@
             echo "execution failed"
             rm -f iodef.xml
-            mv iodef.xml.bkp iodef.xml
             rm -f user_param.py
             rm -f default_param.py
             rm -f sub_config.py
+            rm -f sub_check.py
             exit 1234
     fi
@@ -61,6 +59,6 @@
 
 rm -f iodef.xml
-mv iodef.xml.bkp iodef.xml
 rm -f user_param.py
 rm -f default_param.py
 rm -f sub_config.py
+rm -f sub_check.py
Index: OS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/iodef.xml	(revision 1733)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?xml version="1.0"?>
-
-<simulation>
-
-  <context id="atm">
-    <variable_definition>
-
-      <variable id="timestep"> 1h </variable>
-      <variable id="domain"> atm::domain </variable>
-      <variable id="domain_mask"> true </variable>
-      <variable id="axis_mask"> true </variable>
-      <variable id="init_field2D"> rank </variable>
-      <variable id="ni"> 36 </variable>
-      <variable id="nj"> 18 </variable>
-      <variable id="nlev"> 10 </variable>
-      <variable id="pressure_factor"> 0.10 </variable>
-      <variable id="mask3d"> false </variable>
-<!--      <variable id="domain_proc_frac">3</variable>
-      <variable id="axis_proc_frac">2</variable>
-      <variable id="axis_proc_n">2</variable>
-      <variable id="ensemble_proc_n">2</variable> -->
-      
-      <variable id="other_domain"> lmdz </variable>
-      <variable id="other_domain_mask"> false </variable>
-      <variable id="other_axis_mask"> false </variable>
-      <variable id="other_init_field2D"> academic </variable>
-      <variable id="other_ni"> 36 </variable>
-      <variable id="other_nj"> 18 </variable>
-      <variable id="other_nlev"> 10 </variable>
-      <variable id="other_pressure_factor"> 0.10 </variable>
-      <variable id="other_mask3d"> false </variable>
-<!--      <variable id="other_domain_proc_frac">3</variable>
-      <variable id="other_axis_proc_frac">2</variable>
-      <variable id="other_axis_proc_n">2</variable>
-      <variable id="other_ensemble_proc_n">2</variable> -->
-      
-    </variable_definition>
-  </context>
-
-
-
-  <context id="atm" src="./context_atm.xml"/>
-  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
-  
-  <context id="xios">
-    <variable_definition>
-      <variable_group id="buffer">
-  <variable id="min_buffer_size" type="int">10000000</variable>
-  <variable id="optimal_buffer_size" type="string">performance</variable>
-  <variable id="buffer_factor_size" type="double">0.8</variable> 
-      </variable_group>
-
-      <variable_group id="parameters" >
-        <variable id="using_server" type="bool">true</variable>
-        <variable id="info_level" type="int">100</variable>
-        <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
-        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
-        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
-        <variable id="pure_one_sided" type="bool">false</variable>
-        <variable id="check_event_sync" type="bool">true</variable>
-      </variable_group>
-      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
-    </variable_definition>
-  </context>
-
-</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/run_sub_test.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/run_sub_test.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/run_sub_test.sh	(revision 1734)
@@ -11,5 +11,4 @@
 cp ../default_param.py default_param.py
 
-cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -23,5 +22,4 @@
 
 
-mv iodef.xml iodef.xml.bkp
 
 nb_proc=$(python sub_config.py 2>&1) 
@@ -29,5 +27,5 @@
 machine_name=jeanzay
 
-echo $nb_proc
+# echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
@@ -46,8 +44,8 @@
             echo "execution failed"
             rm -f iodef.xml
-            mv iodef.xml.bkp iodef.xml
             rm -f user_param.py
             rm -f default_param.py
             rm -f sub_config.py
+            rm -f sub_check.py
             exit 1234
     fi
@@ -60,6 +58,6 @@
 
 rm -f iodef.xml
-mv iodef.xml.bkp iodef.xml
 rm -f user_param.py
 rm -f default_param.py
 rm -f sub_config.py
+rm -f sub_check.py
Index: OS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/iodef.xml	(revision 1733)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?xml version="1.0"?>
-
-<simulation>
-
-  <context id="atm">
-    <variable_definition>
-
-      <variable id="timestep"> 1h </variable>
-      <variable id="domain"> atm::domain </variable>
-      <variable id="domain_mask"> true </variable>
-      <variable id="axis_mask"> true </variable>
-      <variable id="init_field2D"> rank </variable>
-      <variable id="ni"> 36 </variable>
-      <variable id="nj"> 18 </variable>
-      <variable id="nlev"> 10 </variable>
-      <variable id="pressure_factor"> 0.10 </variable>
-      <variable id="mask3d"> false </variable>
-<!--      <variable id="domain_proc_frac">3</variable>
-      <variable id="axis_proc_frac">2</variable>
-      <variable id="axis_proc_n">2</variable>
-      <variable id="ensemble_proc_n">2</variable> -->
-      
-      <variable id="other_domain"> lmdz </variable>
-      <variable id="other_domain_mask"> false </variable>
-      <variable id="other_axis_mask"> false </variable>
-      <variable id="other_init_field2D"> academic </variable>
-      <variable id="other_ni"> 36 </variable>
-      <variable id="other_nj"> 18 </variable>
-      <variable id="other_nlev"> 10 </variable>
-      <variable id="other_pressure_factor"> 0.10 </variable>
-      <variable id="other_mask3d"> false </variable>
-<!--      <variable id="other_domain_proc_frac">3</variable>
-      <variable id="other_axis_proc_frac">2</variable>
-      <variable id="other_axis_proc_n">2</variable>
-      <variable id="other_ensemble_proc_n">2</variable> -->
-      
-    </variable_definition>
-  </context>
-
-
-
-  <context id="atm" src="./context_atm.xml"/>
-  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
-  
-  <context id="xios">
-    <variable_definition>
-      <variable_group id="buffer">
-  <variable id="min_buffer_size" type="int">10000000</variable>
-  <variable id="optimal_buffer_size" type="string">performance</variable>
-  <variable id="buffer_factor_size" type="double">0.8</variable> 
-      </variable_group>
-
-      <variable_group id="parameters" >
-        <variable id="using_server" type="bool">true</variable>
-        <variable id="info_level" type="int">100</variable>
-        <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
-        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
-        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
-        <variable id="pure_one_sided" type="bool">false</variable>
-        <variable id="check_event_sync" type="bool">true</variable>
-      </variable_group>
-      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
-    </variable_definition>
-  </context>
-
-</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/run_sub_test.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/run_sub_test.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/run_sub_test.sh	(revision 1734)
@@ -12,5 +12,4 @@
 
 
-cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -24,5 +23,4 @@
 
 
-mv iodef.xml iodef.xml.bkp
 
 nb_proc=$(python sub_config.py 2>&1) 
@@ -30,5 +28,5 @@
 machine_name=jeanzay
 
-echo $nb_proc
+# echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
@@ -47,8 +45,8 @@
             echo "execution failed"
             rm -f iodef.xml
-            mv iodef.xml.bkp iodef.xml
             rm -f user_param.py
             rm -f default_param.py
             rm -f sub_config.py
+            rm -f sub_check.py
             exit 1234
     fi
@@ -61,6 +59,6 @@
 
 rm -f iodef.xml
-mv iodef.xml.bkp iodef.xml
 rm -f user_param.py
 rm -f default_param.py
 rm -f sub_config.py
+rm -f sub_check.py
Index: OS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/iodef.xml	(revision 1733)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?xml version="1.0"?>
-
-<simulation>
-
-  <context id="atm">
-    <variable_definition>
-
-      <variable id="timestep"> 1h </variable>
-      <variable id="domain"> atm::domain </variable>
-      <variable id="domain_mask"> true </variable>
-      <variable id="axis_mask"> true </variable>
-      <variable id="init_field2D"> rank </variable>
-      <variable id="ni"> 36 </variable>
-      <variable id="nj"> 18 </variable>
-      <variable id="nlev"> 10 </variable>
-      <variable id="pressure_factor"> 0.10 </variable>
-      <variable id="mask3d"> false </variable>
-<!--      <variable id="domain_proc_frac">3</variable>
-      <variable id="axis_proc_frac">2</variable>
-      <variable id="axis_proc_n">2</variable>
-      <variable id="ensemble_proc_n">2</variable> -->
-      
-      <variable id="other_domain"> lmdz </variable>
-      <variable id="other_domain_mask"> false </variable>
-      <variable id="other_axis_mask"> false </variable>
-      <variable id="other_init_field2D"> academic </variable>
-      <variable id="other_ni"> 36 </variable>
-      <variable id="other_nj"> 18 </variable>
-      <variable id="other_nlev"> 10 </variable>
-      <variable id="other_pressure_factor"> 0.10 </variable>
-      <variable id="other_mask3d"> false </variable>
-<!--      <variable id="other_domain_proc_frac">3</variable>
-      <variable id="other_axis_proc_frac">2</variable>
-      <variable id="other_axis_proc_n">2</variable>
-      <variable id="other_ensemble_proc_n">2</variable> -->
-      
-    </variable_definition>
-  </context>
-
-
-
-  <context id="atm" src="./context_atm.xml"/>
-  <context id="grid_dynamico" src="./context_grid_dynamico.xml"/>
-  
-  <context id="xios">
-    <variable_definition>
-      <variable_group id="buffer">
-  <variable id="min_buffer_size" type="int">10000000</variable>
-  <variable id="optimal_buffer_size" type="string">performance</variable>
-  <variable id="buffer_factor_size" type="double">0.8</variable> 
-      </variable_group>
-
-      <variable_group id="parameters" >
-        <variable id="using_server" type="bool">true</variable>
-        <variable id="info_level" type="int">100</variable>
-        <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">xios::usingSrv2</variable>
-        <variable id="ratio_server2" type="int">xios::ratioSrv2</variable>
-        <variable id="number_pools_server2" type="int">xios::nbplSrv2</variable>
-        <variable id="pure_one_sided" type="bool">false</variable>
-        <variable id="check_event_sync" type="bool">true</variable>
-      </variable_group>
-      <variable id="activate_non_distributed_transformation" type="bool">true</variable>
-    </variable_definition>
-  </context>
-
-</simulation>
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/run_sub_test.sh
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/run_sub_test.sh	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/run_sub_test.sh	(revision 1734)
@@ -12,5 +12,4 @@
 
 
-cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -24,5 +23,4 @@
 
 
-mv iodef.xml iodef.xml.bkp
 
 nb_proc=$(python sub_config.py 2>&1) 
@@ -30,5 +28,5 @@
 machine_name=jeanzay
 
-echo $nb_proc
+# echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
@@ -47,8 +45,8 @@
             echo "execution failed"
             rm -f iodef.xml
-            mv iodef.xml.bkp iodef.xml
             rm -f user_param.py
             rm -f default_param.py
             rm -f sub_config.py
+            rm -f sub_check.py
             exit 1234
     fi
@@ -61,6 +59,6 @@
 
 rm -f iodef.xml
-mv iodef.xml.bkp iodef.xml
 rm -f user_param.py
 rm -f default_param.py
 rm -f sub_config.py
+rm -f sub_check.py
Index: /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/user_config.py
===================================================================
--- /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/user_config.py	(revision 1733)
+++ /XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/user_config.py	(revision 1734)
@@ -1,4 +1,5 @@
 import os
 import sys
+import subprocess
 
 def main():
@@ -12,5 +13,13 @@
 		if folder.startswith("test_"):
 			test_list.append(folder)
-			os.system('cd '+folder+' && python setup.py')
+			# os.system('cd '+folder+' && python setup.py')
+			FNULL = open(os.devnull, 'w')
+			retcode = subprocess.call(['cd', folder, ' && python setup.py'],
+                          stdout=FNULL,
+                          stderr=subprocess.STDOUT)
+			
+			if retcode!=0:	
+				print >> sys.stderr, retcode
+				sys.exit()
 	
 
@@ -42,4 +51,6 @@
 	f.close
 	
+	print >> sys.stderr, 0
+	sys.exit()
 
 if __name__== "__main__":
