Index: XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay.sh
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay.sh	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay.sh	(revision 1893)
@@ -1,6 +1,6 @@
 #!/bin/bash
 ##SBATCH --nodes=2
-#SBATCH --ntasks=8              # Nombre total de processus MPI
-#SBATCH --ntasks-per-node=16
+#SBATCH --ntasks=32              # Nombre total de processus MPI
+##SBATCH --ntasks-per-node=16
 ##SBATCH --cpus-per-task=1
 #SBATCH --hint=nomultithread
@@ -22,5 +22,5 @@
 export mode=prod
 
-./run_test
+time ./run_test
 
 
@@ -30,3 +30,3 @@
 export mode=debug
 
-./run_test
+time ./run_test
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay_local.sh
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay_local.sh	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/job_jeanzay_local.sh	(revision 1893)
@@ -1,5 +1,5 @@
 #!/bin/bash
 ##SBATCH --nodes=2
-#SBATCH --ntasks=8              # Nombre total de processus MPI
+#SBATCH --ntasks=32              # Nombre total de processus MPI
 #SBATCH --ntasks-per-node=16
 ##SBATCH --cpus-per-task=1
@@ -22,5 +22,5 @@
 export mode=prod
 
-./run_test_local
+time ./run_test_local
 
 
@@ -30,3 +30,3 @@
 export mode=debug
 
-./run_test_local
+time ./run_test_local
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/my_prod.sh
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/my_prod.sh	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/my_prod.sh	(revision 1893)
@@ -16,17 +16,37 @@
 
 python3 step1.py
-cmd=$(ccc_msub full_job_${arch}_${mode}.sh)
-jobid="${cmd//[!0-9]/}"
-#jobid=9999999
 
-i=0
-output=$(ccc_mpp | grep ${jobid})
-while [ ! -z "$output" ]
-do
-echo "job" $jobid "running for about" ${i} seconds
-sleep 5
-((i+=5))
-output=$(ccc_mpp | grep ${jobid})
-done
 
-python3 step2.py
+if [[ ${xios_machine_name} == "irene" ]]; then
+  cmd=$(ccc_msub full_job_${arch}_${mode}.sh)
+  jobid="${cmd//[!0-9]/}"
+  #jobid=9999999
+
+  i=0
+  output=$(ccc_mpp | grep ${jobid})
+  while [ ! -z "$output" ]
+  do
+    echo "job" $jobid "running for about" ${i} seconds
+    sleep 5
+    ((i+=5))
+    output=$(ccc_mpp | grep ${jobid})
+  done
+fi
+
+if [[ ${xios_machine_name} == "jeanzay" ]]; then
+  cmd=$(sbatch full_job_${arch}_${mode}.sh)
+  jobid="${cmd//[!0-9]/}"
+  #jobid=99999
+  i=0
+  output=$(squeue -u rpsl954 | grep ${jobid})
+  while [ ! -z "$output" ]
+  do
+    echo "job" $jobid "running for about" ${i} seconds
+    sleep 5
+    ((i+=5))
+    output=$(squeue -u rpsl954 | grep ${jobid})
+  done
+fi
+
+
+#python3 step2.py
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/run_test
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/run_test	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/run_test	(revision 1893)
@@ -81,5 +81,5 @@
 
 cmake .
-ctest -V 
+ctest -V -j16
 #ctest --output-on-failure
 make report
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/run_test_jeanzay
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/run_test_jeanzay	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/run_test_jeanzay	(revision 1893)
@@ -1,5 +1,51 @@
 #!/bin/bash
+module load subversion
+module load python/3.7.3
 
-sbatch --wait job_jeanzay.sh 
+export arch=X64_JEANZAY
+export mode=prod
+export build_dir=xios_test_suite/RUN_TEST_SUITE/build_${arch}_${mode}
+export svnR=$(svn info --show-item revision ../../)
+export ref_location=/gpfswork/rech/psl/rpsl954/cron_xios
+export ref_file=reference.tar.gz
+
+echo "Start Building XIOS ... "
+bash -c "cd ../.. && ./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --build_dir ${build_dir} --job 4"
+
+export build_status=$?
+if [[ ${build_status} == 0 ]]
+then
+  echo "XIOS Build Finished. Start Unit Tests"
+  bash ./my_prod.sh
+  rundir=${xios_test_suite_repository}/RUN
+  mkdir -p $rundir ; CHMOD  $rundir
+  mkdir -p ${rundir}/test_${xios_machine_name} ; CHMOD ${rundir}/test_${xios_machine_name}
+
+  cp report_${svnR}_${arch}_${mode}.txt ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt
+
+  CHMOD ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt
+
+  mkdir -p ${rundir}/def_files ;  CHMOD ${rundir}/def_files
+  mkdir -p ${rundir}/def_files/${svnR} ;  CHMOD ${rundir}/def_files/${svnR}
+
+  for i in $(ls -d test_*/)
+  do
+    mkdir -p ${rundir}/def_files/${svnR}/${i%%}
+    cp ${i%%}/user_param.json ${rundir}/def_files/${svnR}/${i%%}
+    for j in $(ls -d ${i%%/}/CONFIG_*)
+    do
+      mkdir -p ${rundir}/def_files/${svnR}/${j%%}
+      cp ${j%%}/all_param.def ${rundir}/def_files/${svnR}/${j%%}
+    done
+    CHMOD ${rundir}/def_files
+  done
+
+
+else
+  echo "XIOS Build Failed. Skip Unit Tests"
+fi
+
+
+#sbatch --wait job_jeanzay.sh 
 
 #bash -c "python generate_test.py"
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/setup.py
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/setup.py	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/setup.py	(revision 1893)
@@ -115,5 +115,5 @@
         f.write("set_tests_properties("+foldername+"_config"+repr(x)+" PROPERTIES\n")
         f.write("                      FAIL_REGULAR_EXPRESSION \"check.py failed;execution failed;failed;setup.sh failed; machine unknown\")\n\n")
-
+        
         g=open("run_test_"+repr(x)+".py", "w")
         g.write("##############################\n")
Index: XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py
===================================================================
--- XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py	(revision 1892)
+++ XIOS/trunk/xios_test_suite/TEST_SUITE/step1.py	(revision 1893)
@@ -12,4 +12,10 @@
 mode=os.getenv("mode")
 arch=os.getenv("arch")
+machine=os.getenv("xios_machine_name")
+my_counter=1
+portion=0
+
+nb_proc_irene=20 # this must be >= NumberClients+NumberServers for all configs for all test folders
+nb_proc_jz=36 # this must be >= sum(NumberClients+NumberServers) for each test folder
 
 def OSinfo(runthis):
@@ -34,53 +40,99 @@
     return default_param[0]
 
-def generate_job_irene(fn, n):
-    with open(fn, "w") as fh:
-        fh.write("#!/bin/bash\n")
-        fh.write("#MSUB -r XIOS\n")
-        fh.write("#MSUB -eo\n")
-        fh.write("#MSUB -o client_output.out\n")
-        fh.write("#MSUB -e client_error.out\n")
-        fh.write("#MSUB -c 1\n")
-        fh.write("#MSUB -n 24\n")
-        fh.write("#MSUB -X\n")
-        fh.write("#MSUB -x\n")
-        fh.write("#MSUB -T 1800\n")
-        fh.write("#MSUB -q skylake\n")     
-        fh.write("#MSUB -A gen0826\n")
-        fh.write("#MSUB -Q test\n")
-        fh.write("#MSUB -m work,scratch\n")
-        fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
-        fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n")
+def generate_job(fn, n):
+    if machine=="irene":
+        with open(fn, "w") as fh:
+            fh.write("#!/bin/bash\n")
+            fh.write("#MSUB -r XIOS\n")
+            fh.write("#MSUB -eo\n")
+            fh.write("#MSUB -o client_output.out\n")
+            fh.write("#MSUB -e client_error.out\n")
+            fh.write("#MSUB -c 1\n")
+            fh.write("#MSUB -n "+str(n)+"\n")
+            fh.write("#MSUB -X\n")
+            fh.write("#MSUB -x\n")
+            fh.write("#MSUB -T 1800\n")
+            fh.write("#MSUB -q skylake\n")     
+            fh.write("#MSUB -A gen0826\n")
+            fh.write("#MSUB -Q test\n")
+            fh.write("#MSUB -m work,scratch\n")
+            fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
+            fh.write("ccc_mprun -n "+str(n)+" generic_testcase.exe\n")
+
+    if machine=="jeanzay":
+        with open(fn, "w") as fh:
+            fh.write("#!/bin/bash\n")
+            fh.write("#SBATCH --ntasks="+str(n)+"\n")
+            fh.write("#SBATCH --hint=nomultithread\n")
+            fh.write("#SBATCH -o output.out\n")
+            fh.write("#SBATCH -e error.out\n")
+            fh.write("#SBATCH -t 00:10:00\n")
+            fh.write("#SBATCH --account=psl@cpu\n")
+            fh.write("ulimit -c 0\n")
+            fh.write("cd ${SLURM_SUBMIT_DIR}\n")
+            fh.write("source ../../../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
+            fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt")
+            fh.write("srun generic_testcase.exe")
 
 
 def update_full_job(location, n):
-    with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
+    global my_counter
+    if machine=="irene":
+        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
             fh.write("\ncd ${location}/"+location+"; ccc_mprun -E \'--exclusive\' -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n")
             fh.write("PIDS+=($!)\n")
             fh.write("CONFIGS+=("+location+")\n")
-
+    if machine=="jeanzay":
+        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
+            fh.write("\ncd ${location}/"+location+"; srun --exclusive -n "+str(n)+" generic_testcase.exe > output.out 2> error.out &\n")
+            #fh.write("echo \"test progress "+str(my_counter*portion)+"% \"\n")
+            #my_counter = my_counter+1
 
 def main():
-    with open("full_job_"+arch+"_"+mode+".sh", "w") as fh:
-        fh.write("#!/bin/bash\n")
-        fh.write("#MSUB -r XIOS\n")
-        fh.write("#MSUB -eo\n")
-        fh.write("#MSUB -o client_output.out\n")
-        fh.write("#MSUB -e client_error.err\n")
-        fh.write("#MSUB -c 1\n")
-        fh.write("#MSUB -n 24\n")
-        fh.write("#MSUB -X\n")
-        fh.write("#MSUB -x\n")
-        fh.write("#MSUB -T 1800\n")
-        fh.write("#MSUB -q skylake\n")     
-        fh.write("#MSUB -A gen0826\n")
-        fh.write("#MSUB -Q test\n")
-        fh.write("#MSUB -m work,scratch\n")
-        fh.write("export location="+os.getcwd()+"\n")
-        fh.write("export log_location="+os.getcwd()+"\n")
-        fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
-        fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n")
-        fh.write("date >> ${log_location}/Log.txt\n")
-    
+    global portion
+    tmp_list=glob.glob("test_*/CONFIG_*")
+    nb_configs = len(tmp_list)
+    portion = 100.0/nb_configs
+
+    if machine=="irene":
+        with open("full_job_"+arch+"_"+mode+".sh", "w") as fh:
+            fh.write("#!/bin/bash\n")
+            fh.write("#MSUB -r XIOS\n")
+            fh.write("#MSUB -eo\n")
+            fh.write("#MSUB -o client_output.out\n")
+            fh.write("#MSUB -e client_error.err\n")
+            fh.write("#MSUB -c 1\n")
+            fh.write("#MSUB -n "+str(nb_proc_irene)+"\n")
+            fh.write("#MSUB -X\n")
+            fh.write("#MSUB -x\n")
+            fh.write("#MSUB -T 1800\n")
+            fh.write("#MSUB -q skylake\n")     
+            fh.write("#MSUB -A gen0826\n")
+            fh.write("#MSUB -Q test\n")
+            fh.write("#MSUB -m work,scratch\n")
+            fh.write("export location="+os.getcwd()+"\n")
+            fh.write("export log_location="+os.getcwd()+"\n")
+            fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
+            fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n")
+            fh.write("date >> ${log_location}/Log.txt\n")
+     
+    if machine=="jeanzay":
+        with open("full_job_"+arch+"_"+mode+".sh", "w") as fh:
+            fh.write("#!/bin/bash\n")
+            fh.write("#SBATCH --ntasks="+str(nb_proc_jz)+"\n")
+            fh.write("#SBATCH --hint=nomultithread\n")
+            fh.write("#SBATCH -t 00:10:00\n")
+            fh.write("#SBATCH --account=psl@cpu\n")
+            fh.write("ulimit -c 0\n")
+            fh.write("cd ${SLURM_SUBMIT_DIR}\n")
+            fh.write("source ../BUILD/build_"+arch+"_"+mode+"/arch.env\n")
+            fh.write("source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt\n")
+            fh.write("export location="+os.getcwd()+"\n")
+            fh.write("export log_location="+os.getcwd()+"\n")
+            fh.write("echo \"parallel launch arch="+arch+" mode="+mode+"\" >> ${log_location}/Log.txt\n")
+            fh.write("date >> ${log_location}/Log.txt\n")
+
+
+
     test_folder_list = glob.glob('test_*')
     all_config=dict()
@@ -153,26 +205,35 @@
                 fh.write("/\n")
 
-            generate_job_irene(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers'])
+            generate_job(test_folder+"/CONFIG_"+mystr+"/job.sh", full_config['NumberClients']+full_config['NumberServers'])
             update_full_job(test_folder+"/CONFIG_"+mystr, full_config['NumberClients']+full_config['NumberServers'])
 
         #print(config_name)
+        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
+            fh.write("wait\nwait\n")
+            fh.write("echo \"tests in "+test_folder+" finished\"\n")
         all_config[test_folder] = config_name
-
-    with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
-        fh.write("\nfor pid in ${PIDS[@]}; do\n")
-        fh.write("wait ${pid}\n")
-        fh.write("STATUS+=($?)\ndone\n")
-        fh.write("\ni=0\n")
-        fh.write("#for st in ${STATUS[@]}; do\n")
-        fh.write("#if [[ ${st} -ne 0 ]]; then\n")
-        fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n")
-        fh.write("#else\n")
-        fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n")
-        fh.write("#fi\n")
-        fh.write("#((i+=1))\n")
-        fh.write("#done\n\n")
-        fh.write("#wait\n")
-        fh.write("date >> ${log_location}/Log.txt\n")
-
+ 
+
+    if machine=="irene":
+        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
+            fh.write("\nfor pid in ${PIDS[@]}; do\n")
+            fh.write("wait ${pid}\n")
+            fh.write("STATUS+=($?)\ndone\n")
+            fh.write("\ni=0\n")
+            fh.write("#for st in ${STATUS[@]}; do\n")
+            fh.write("#if [[ ${st} -ne 0 ]]; then\n")
+            fh.write("#echo \"${CONFIGS[${i}]} -1\" >> ${location}/plain_report.txt\n")
+            fh.write("#else\n")
+            fh.write("#echo \"${CONFIGS[${i}]} 1\" >> ${location}/plain_report.txt\n")
+            fh.write("#fi\n")
+            fh.write("#((i+=1))\n")
+            fh.write("#done\n\n")
+            fh.write("#wait\n")
+            fh.write("date >> ${log_location}/Log.txt\n")
+    if machine=="jeanzay":
+        with open("full_job_"+arch+"_"+mode+".sh", "a") as fh:
+            fh.write("date >> ${log_location}/Log.txt\n")
+
+    
     #print(all_config)
 
