Index: branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_titane.ksh
===================================================================
--- branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 574)
+++ branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 575)
@@ -1864,81 +1864,67 @@
     else
 
-      # Then first loop on the components for the coupler ie oasis
-
-      ### the coupler ie oasis must be the first one
+        # Then first loop on the components for the coupler ie oasis
+
+        ## the coupler ie oasis must be the first one
+	for comp in ${config_ListOfComponents[*]} ; do
+	    
+	    eval ExeNameOut=\${config_Executable_${comp}[1]}
+		
+	# for CPL component only
+	    if [ "X${comp}" = "XCPL" ] ; then
+		eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
+		echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
+	    fi
+	done
+
+        # Then second loop on the components
+
+	for comp in ${config_ListOfComponents[*]} ; do
+		
+	    eval ExeNameOut=\${config_Executable_${comp}[1]}
+		
+            # Only if we really have an executable for the component and not the coupler ie oasis:
+	    if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then
+		eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
+		echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
+	    fi
+	done
+	IGCM_sys_Chmod u+x run_file
+
+	EXECUTION="${HOST_MPIRUN_COMMAND} --app ./run_file"
+	  
+    fi
+
+  else # Only one executable. launch it.
+
       for comp in ${config_ListOfComponents[*]} ; do
+
+          # Only if we really have an executable for the component :
+	  eval ExeNameOut=\${config_Executable_${comp}[1]}
+	  if ( [ "X${ExeNameOut}" != X\"\" ] ) ; then	
 		
-        eval ExeNameOut=\${config_Executable_${comp}[1]}
-		
-        # for CPL component only
-        if [ "X${comp}" = "XCPL" ] ; then
-
-          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
-		    
-          if ( ${OK_PARA_MPI} ) ; then 
-            (( mpi_count = 1 ))
-            until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do
-              echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut}" >> run_file 
-              (( mpi_count = mpi_count + 1 ))
-            done
-          else
-            echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
-          fi
-        fi
+	      echo "#!/bin/ksh" > script_${ExeNameOut}.ksh
+	      echo ""  >> script_${ExeNameOut}.ksh
+	      if ( ${OK_PARA_OMP} ) ; then 
+		  echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh	
+	      fi
+	      if  ( ${OK_PARA_MPI} ) ; then 
+                  # Default : mpirun used if nb_proc gt 1
+		  # pour sortie out/err par process
+		  # echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${OMPI_COMM_WORLD_RANK} 2>out_${ExeNameOut}.err.\${OMPI_COMM_WORLD_RANK}"  >> script_${ExeNameOut}.ksh
+		  echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh
+		  IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh
+		  EXECUTION="${HOST_MPIRUN_COMMAND} ./script_${ExeNameOut}.ksh"
+	      else
+		  # Default : mpirun is NOT used if nb_proc eq 1
+		  # pour sortie out/err par process
+		  # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh
+		  echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh
+		  IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh
+		  EXECUTION="time ./script_${ExeNameOut}.ksh"
+	      fi
+	  fi
       done
-
-      # Then second loop on the components
-
-      for comp in ${config_ListOfComponents[*]} ; do
-		
-        eval ExeNameOut=\${config_Executable_${comp}[1]}
-		
-        # Only if we really have an executable for the component and not the coupler ie oasis:
-        if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then
-
-          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
-		    
-          if ( ${OK_PARA_MPI} ) ; then 
-
-            (( mpi_count = 1 ))
- 	    until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do
-              echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut}" >> run_file 
-              (( mpi_count = mpi_count + 1 ))
-            done
-          else
-            echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
-          fi
-        fi
-      done
-      IGCM_sys_Chmod u+x run_file
-
-      EXECUTION="${HOST_MPIRUN_COMMAND} --app ./run_file"
-	  
-    fi
-
-  else # Only one executable. launch it.
-
-    for comp in ${config_ListOfComponents[*]} ; do
-
-      # Only if we really have an executable for the component :
-      eval ExeNameOut=\${config_Executable_${comp}[1]}
-      if ( [ "X${ExeNameOut}" != X\"\" ] ) ; then	
-		
-        echo "#!/bin/ksh" > script_${ExeNameOut}.ksh
-	echo ""  >> script_${ExeNameOut}.ksh
-        if ( ${OK_PARA_OMP} ) ; then 
-          echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh	
-        fi
-	if  ( ${OK_PARA_MPI} ) ; then 
-          # Attention : a voir si sur 1 proc mais non //
-          echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${OMPI_COMM_WORLD_RANK} 2>out_${ExeNameOut}.err.\${OMPI_COMM_WORLD_RANK}"  >> script_${ExeNameOut}.ksh
-          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh
-          EXECUTION="${HOST_MPIRUN_COMMAND} ./script_${ExeNameOut}.ksh"
-	else
-          EXECUTION="time ./${ExeNameOut}"
-        fi
-      fi
-    done
-
+      
   fi
 
