Index: branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh
===================================================================
--- branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting_func.sh	(revision 5799)
+++ branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh	(revision 5929)
@@ -90,5 +90,5 @@
     [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS}
 
-    for str in ${TRUS_CMPF} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do
+    for str in ${TRUS_CMPV} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do
 	[ -z "$str" ] && continue
 	soft_rel=''
@@ -98,5 +98,5 @@
 
 	## option --version would work for main compilers (gfortran, intel, pgfortran, ...)
-	[ $str == ${TRUS_CMPF} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' )
+	[ $str == ${TRUS_CMPV} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' )
 
 	## Cleaning characters string to display proper soft name
@@ -116,14 +116,12 @@
 
 get_inputs() {
-    # List archive content & extract it by default
-    local cmd_iol="tar -tvf ${TRUS_FORC}/${TRUS_TARF}" cmd_iof="tar -vxf ${TRUS_FORC}/${TRUS_TARF}"
-
-    ## List & copy files in case of personal inputs
-    if [ -z "${TRUS_TARF}" ]; then
-	  cmd_iol="ls ${TRUS_FORC}/*"                ; cmd_iof="\cp ${TRUS_FORC}/* ."
-    fi
-
-    ${cmd_iol} > inputs_list.txt
-    ${cmd_iof} > /dev/null
+    ## Extract archive or copy files in case of personal inputs
+    [ -z "${TRUS_TARF}" ] && get_io="cp ${TRUS_FORC}/* ." || get_io="tar -vxf ${TRUS_FORC}/${TRUS_TARF}"
+
+    ${get_io} > /dev/null
+    [ $? -ne 0 ] && get_out 3 || echo 'Success'
+    [ $( find -name '*.gz' -print -quit ) ] && gunzip *.gz
+
+    ls -lh > inputs_list.txt
 }
 
@@ -137,5 +135,5 @@
 
 	## Continue even if input file is not in here (see after)
-	if [ -e ${TRUS_BHMK}/$file ]; then dif=$( diff -q $file ${TRUS_BHMK}/$file ); else dif=0; fi
+	if [ -e ${TRUS_STOR}/$file ]; then dif=$( diff -q $file ${TRUS_STOR}/$file ); else dif=0; fi
 
 	## Pass over useless file omission in benckmark directory
@@ -180,7 +178,7 @@
     for file in 'ocean.output' *.stat; do
 	## Stop if no benchmark files (ocean.output, eventual stat files)
-	[ ! -e ${TRUS_BHMK}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; }
-
-	diff -q $file ${TRUS_BHMK}/$file
+	[ ! -e ${TRUS_STOR}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; }
+
+	diff -q $file ${TRUS_STOR}/$file
 
 	## Continue even if it differs
@@ -200,6 +198,6 @@
 
     ## Stop if no benchmark files (ie time.step)
-    [ ! -e ${TRUS_BHMK}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; }
-    time_step=$( cat ${TRUS_BHMK}/time.step | tr -d [:space:] )
+    [ ! -e ${TRUS_STOR}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; }
+    time_step=$( cat ${TRUS_STOR}/time.step | tr -d [:space:] )
 
     ## Find all restart files to rebuild
@@ -222,6 +220,4 @@
 		    ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} \
 			> /dev/null
-		    [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \
-                        > /dev/null
 		elif [ ${nb_dom} -eq 0 ]; then
 		    TRUS_RSLT='FAILED' && get_out 8
@@ -232,8 +228,8 @@
 
                     ## Stop if no benchmark files (restart file)
-		    if [ -e ${TRUS_BHMK}/$file.nc ]; then
+		    if [ -e ${TRUS_STOR}/$file.nc ]; then
 
 	                ## UNIX `cmp` not suitable (timestamp in .nc file)
-			dif=$( $TRUS_CDOD $file.nc ${TRUS_BHMK}/$file.nc 2> /dev/null          \
+			dif=$( $TRUS_CDOD $file.nc ${TRUS_STOR}/$file.nc 2> /dev/null          \
 			       | awk '/records/ {print $0}' | sed '2 s/^/,/' | tr -d '\n' )
 
@@ -325,8 +321,8 @@
 
 	## Create or append trusting logfile
-	if [ -f ${TRUS_BHMK}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi
-
-	$cmd ${TRUS_FILE}                           \
-	    >> ${TRUS_BHMK}/trusting_$PATTERNAME.txt
+	if [ -f ${TRUS_STOR}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi
+
+	$cmd ${TRUS_FILE}                            \
+	    >> ${TRUS_STOR}/trusting_$PATTERNAME.txt
 
         ## Send mail only when FAILED
@@ -347,9 +343,9 @@
 ${TRUS_USER}.cfg & ${TRUS_HPCC}.cfg
 
-For more details, look into the testing directory at:
-${TRUS_TEST}
+For more details, look into the testing folder at:
+${TRUS_SCRA}
 
 An archive has been created to share the questionable configuration for further studies:
-${TRUS_BHMK}/${TRUS_ARCH}
+${TRUS_STOR}/${TRUS_ARCH}
 
 END_MAIL
@@ -371,5 +367,5 @@
 
     ## In case of compilation error
-    cd ${TRUS_TEST}
+    cd ${TRUS_SCRA}
 
     if [ ${TRUS_RSLT} == 'FAILED' ]; then
@@ -410,6 +406,6 @@
     ## Save tested configuration if trusting failed in production mode (-p|--prod)
     if [[ ${TRUS_RSLT} == 'FAILED' && ${TRUS_PROD} -eq 1 ]]; then
-	echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_BHMK}
-	tar -czf ${TRUS_BHMK}/${TRUS_ARCH}               *                    \
+	echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_STOR}
+	tar -czf ${TRUS_STOR}/${TRUS_ARCH}               *                    \
 	    -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/MY_SRC .                    \
 	    -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}        cpp_${TRUS_CONF}.fcm
