Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/CMakeLists.txt
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/CMakeLists.txt	(revision 1728)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/CMakeLists.txt	(revision 1729)
@@ -1,9 +1,33 @@
+##############################
+# file generated by setup.py #
+#      DO NOT modify         #
+##############################
+
 cmake_minimum_required(VERSION 2.8.12.2)
 
 project(generic_testcase)
 
+find_package(PythonInterp REQUIRED)
 
 enable_testing()
 
+add_test( NAME test_scalar_algo_config0
+          COMMAND ${PYTHON_EXECUTABLE}
+          ${CMAKE_CURRENT_BINARY_DIR}/run_test_0.py
+          test_scalar_algo_config0)
 
-add_test( scalar_algo ./run_sub_test.sh)
+add_test( NAME test_scalar_algo_config1
+          COMMAND ${PYTHON_EXECUTABLE}
+          ${CMAKE_CURRENT_BINARY_DIR}/run_test_1.py
+          test_scalar_algo_config1)
+
+add_test( NAME test_scalar_algo_config2
+          COMMAND ${PYTHON_EXECUTABLE}
+          ${CMAKE_CURRENT_BINARY_DIR}/run_test_2.py
+          test_scalar_algo_config2)
+
+add_test( NAME test_scalar_algo_config3
+          COMMAND ${PYTHON_EXECUTABLE}
+          ${CMAKE_CURRENT_BINARY_DIR}/run_test_3.py
+          test_scalar_algo_config3)
+
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/iodef.xml
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/iodef.xml	(revision 1728)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/iodef.xml	(revision 1729)
@@ -7,5 +7,5 @@
 
       <variable id="timestep"> 1h </variable>
-      <variable id="domain"> lmdz </variable>
+      <variable id="domain"> atm::domain </variable>
       <variable id="domain_mask"> true </variable>
       <variable id="axis_mask"> true </variable>
@@ -55,7 +55,7 @@
         <variable id="info_level" type="int">100</variable>
         <variable id="print_file" type="bool">true</variable>
-        <variable id="using_server2" type="bool">false</variable>
-        <variable id="ratio_server2" type="int">50</variable>
-        <variable id="number_pools_server2" type="int">1</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>
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_irene.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_irene.sh	(revision 1728)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_irene.sh	(revision 1729)
@@ -49,5 +49,5 @@
 #ccc_mprun tau_exec -io ../../bin/test_send.exe
 #ddt -start -n 8 ../buile_intelmpi/bin/test_omp.exe
-
+python setup.py
 cmake .
 make test
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_jz.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_jz.sh	(revision 1729)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/job_jz.sh	(revision 1729)
@@ -0,0 +1,43 @@
+#!/bin/bash
+##SBATCH --nodes=2
+#SBATCH --ntasks=8              # Nombre total de processus MPI
+#SBATCH --ntasks-per-node=16
+##SBATCH --cpus-per-task=1
+#SBATCH --hint=nomultithread
+#SBATCH -t 00:10:00              # Temps elapsed maximum d'exÃ©cution
+#SBATCH -o test_client%j.out     # Nom du fichier de sortie
+#SBATCH -e test_client%j.err     # Nom du fichier d'erreur
+##SBATCH -p cpu_port             # Nom de la partition d'exÃ©cution
+##SBATCH -A sos@cpu
+##SBATCH --distribution=arbitrary
+#SBATCH --account=psl@cpu
+
+
+cd ${SLURM_SUBMIT_DIR}
+
+module purge
+module load intel-all/19.0.4
+module load netcdf/4.7.0/intel-19.0.4-mpi
+module load netcdf-cxx/4.2/intel-19.0.4-mpi
+module load netcdf-fortran/4.4.5/intel-19.0.4-mpi
+module load gcc/6.5.0/gcc-4.8.5
+module load cmake
+module load cdo
+#module load arm-forge
+
+ulimit -c 0
+#export ALLINEA_NO_TIMEOUT=1
+
+#ddt --connect srun --mpi=pmi2 -K1 -m block:block --multi-prog ./mpmd_srun.conf
+#srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./mpmd_srun.conf
+export machine_name=jeanzay
+
+python setup.py
+cmake .
+ctest -V
+#./run_sub_test.sh
+
+#srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf
+#srun --mpi=pmi2 ../bin/test_client.exe
+
+
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 1728)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/run_sub_test.sh	(revision 1729)
@@ -1,12 +1,16 @@
 #!/bin/bash
-yes | cp ../context_grid_dynamico.xml ./
-yes | cp ../dynamico_grid.nc ./
 
-yes | cp ../user_config.py sub_config1.py
-yes | cp ../config.py sub_config2.py
-yes | cp ../check.py sub_check.py
-yes | cp ../default_param.py default_param.py
 
-yes | cp ../iodef.xml iodef.xml
+
+cp ../context_grid_dynamico.xml ./
+cp ../dynamico_grid.nc ./
+
+cp ../config.py sub_config.py
+cp ../check.py sub_check.py
+
+cp ../default_param.py default_param.py
+
+
+cp ../iodef.xml iodef.xml
 
 # Black        0;30     Dark Gray     1;30
@@ -20,41 +24,14 @@
 
 
+mv iodef.xml iodef.xml.bkp
 
-Color='\033[0;36m'
-NC='\033[0m' # No Color
+nb_proc=$(python sub_config.py 2>&1) 
 
-touch report.txt
-> report.txt
-echo " " >> report.txt
-echo " " >> report.txt
-echo -e "testing ${Color}scalar${NC} algorithms..." >> report.txt
-echo " " >> report.txt
+machine_name=jeanzay
 
-touch report.html
-> report.html
-echo "<br> " >> report.html
-echo "<br> " >> report.html
-echo "<br> " >> report.html
-echo "<p>testing  <font color="blue">scalar</font> algorithms...</p>" >> report.html 
-echo "<br> " >> report.html
-
-nb_config=$(python sub_config1.py 2>&1)                                                                                                                    
-
-
-counter=0
-while [ $counter -lt $nb_config ]
-do
-
-rm -f user_param.py
-
-cp user_param.py.$counter user_param.py
-
-((counter++))
-
-nb_proc=$(python sub_config2.py 2>&1) 
-
+echo $nb_proc
 if [[ ($machine_name == irene) ]]
 then
-	  echo "Testing on Irene"
+    echo "Testing on Irene"
     ccc_mprun -n $nb_proc ../../build_prod/bin/generic_testcase.exe
 elif [[($machine_name == ada)]]
@@ -67,14 +44,12 @@
     srun -n $nb_proc --mpi=pmi2 ../../build_prod/bin/generic_testcase.exe
     if [ $? -ne 0 ]
-    	then
-    		echo "execution failed"
+        then
+            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 default_param.pyc
-            rm -f user_param.pyc
-            rm -f user_param.py.*
-            rm -f sub_*.py
-    		exit 1234
+            rm -f sub_config.py
+            exit 1234
     fi
 else
@@ -87,9 +62,5 @@
 rm -f iodef.xml
 mv iodef.xml.bkp iodef.xml
-
-done
+rm -f user_param.py
 rm -f default_param.py
-rm -f default_param.pyc
-rm -f user_param.pyc
-rm -f user_param.py.*
-rm -f sub_*.py
+rm -f sub_config.py
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/setup.py
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/setup.py	(revision 1729)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/setup.py	(revision 1729)
@@ -0,0 +1,158 @@
+import os
+import sys
+
+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'
+
+	default_nb_config = 7
+
+	nb_config = 1;
+	configs = [0]*default_nb_config
+	 
+	configs_arg = [[], [], [], [], [], [], []] 
+
+	f=open("user_params.def", "r")
+	for line in f:
+		line = line.strip()
+		if len(line) != 0:
+			if not line.startswith("#"):
+				nb_config = nb_config * (line.count(",")+1)
+				line = line.replace(",", "")
+				line = line.replace("=", "")
+				if line.startswith("UsingServer2"):
+					line = line.replace("UsingServer2", "")
+					for word in line.split():
+						configs[0] += 1
+						configs_arg[0].append('UsingServer2 = '+word)
+				elif line.startswith("RatioServer2"):
+					line = line.replace("RatioServer2", "")
+					for word in line.split():
+						configs[1] += 1
+						configs_arg[1].append('RatioServer2 = '+word)
+				elif line.startswith("NumberPoolsServer2"):
+					line = line.replace("NumberPoolsServer2", "")
+					for word in line.split():
+						configs[2] += 1
+						configs_arg[2].append('NumberPoolsServer2 = '+word)
+				elif line.startswith("NumberClients"):
+					line = line.replace("NumberClients", "")
+					for word in line.split():
+						configs[3] += 1
+						configs_arg[3].append('NumberClients = '+word)
+				elif line.startswith("NumberServers"):
+					line = line.replace("NumberServers", "")
+					for word in line.split():
+						configs[4] += 1
+						configs_arg[4].append('NumberServers = '+word)
+				elif line.startswith("Duration"):
+					line = line.replace("Duration", "")
+					for word in line.split():
+						configs[5] += 1
+						configs_arg[5].append('Duration = '+word)
+				elif line.startswith("ATMdomain"):
+					line = line.replace("ATMdomain", "")
+					for word in line.split():
+						configs[6] += 1
+						configs_arg[6].append('ATMdomain = '+word)
+
+				
+	for x in range(default_nb_config):
+		if configs[x]==0:
+			configs[x] =1
+
+	config_id=0
+	for i0 in range(configs[0]):
+		hasContent0 = len(configs_arg[0])>0
+		for i1 in range(configs[1]):
+			hasContent1 = len(configs_arg[1])>0
+			for i2 in range(configs[2]):
+				hasContent2 = len(configs_arg[2])>0
+				for i3 in range(configs[3]):
+					hasContent3 = len(configs_arg[3])>0
+					for i4 in range(configs[4]):
+						hasContent4 = len(configs_arg[4])>0
+						for i5 in range(configs[5]):
+							hasContent5 = len(configs_arg[5])>0
+							for i6 in range(configs[6]):
+								hasContent6 = len(configs_arg[6])>0
+
+								filename = "user_param.py."+repr(config_id)
+								g = open(filename, "w")
+
+								if hasContent0: g.write(configs_arg[0][i0]+'\n')
+								if hasContent1: g.write(configs_arg[1][i1]+'\n')
+								if hasContent2: g.write(configs_arg[2][i2]+'\n')
+								if hasContent3: g.write(configs_arg[3][i3]+'\n')
+								if hasContent4: g.write(configs_arg[4][i4]+'\n')
+								if hasContent5: g.write(configs_arg[5][i5]+'\n')
+								if hasContent6: g.write(configs_arg[6][i6]+'\n')
+							
+								config_id +=1
+								g.close
+
+
+	# print >>sys.stderr, nb_config
+
+	f=open("CMakeLists.txt", "w")
+	f.write("##############################\n")
+	f.write("# file generated by setup.py #\n")
+	f.write("#      DO NOT modify         #\n")
+	f.write("##############################\n\n")
+	f.write("cmake_minimum_required(VERSION 2.8.12.2)\n\n")
+	f.write("project(generic_testcase)\n\n")
+	f.write("find_package(PythonInterp REQUIRED)\n\n")
+	f.write("enable_testing()\n\n")
+	dirpath = os.getcwd()
+	foldername = os.path.basename(os.getcwd())
+	print(foldername)
+
+
+	for x in range(nb_config):
+		f.write("add_test( NAME "+foldername+"_config"+repr(x)+'\n')
+		f.write("          COMMAND ${PYTHON_EXECUTABLE}\n")
+		f.write("          ${CMAKE_CURRENT_BINARY_DIR}/run_test_"+repr(x)+".py\n")
+		f.write("          "+foldername+"_config"+repr(x)+")\n\n")
+
+		g=open("run_test_"+repr(x)+".py", "w")
+		g.write("##############################\n")
+		g.write("# file generated by setup.py #\n")
+		g.write("#      DO NOT modify         #\n")
+		g.write("##############################\n\n")
+		g.write("import os\n")
+		g.write("import sys\n")
+		g.write("def main():\n")
+		g.write("	os.system(\'rm -f user_param.py\')\n")
+		g.write("	os.system(\'cp user_param.py."+repr(x)+" user_param.py\')\n")
+		g.write("	os.system(\'./run_sub_test.sh\')\n")
+		g.write("if __name__== \"__main__\":\n")
+		g.write("	main()\n")
+		g.close
+		 
+	f.close
+
+	f=open("report.txt", "w")
+	g=open("report.html", "w")
+	f.write("\n\n\nin "+cyan(foldername)+" ...\n\n")
+	g.write("<br><br><br><p>in <font color=\"blue\">"+foldername+"</font> ...</p><br><br>")
+	f.close
+	g.close
+
+
+if __name__== "__main__":
+  main()
