Changeset 686 for trunk


Ignore:
Timestamp:
06/18/12 09:11:55 (12 years ago)
Author:
mafoipsl
Message:

On Titane : modification of IGCM_sys_build_execution_scripts to work with one MPI/OpenMP executable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh

    r684 r686  
    17021702  fi 
    17031703 
    1704   typeset max_omp 
    1705  
    17061704  ulimit -s unlimited 
    17071705 
    1708   (( max_omp = 0 )) 
    1709   for comp in ${config_ListOfComponents[*]} ; do 
    1710  
    1711     eval ExeNameIn=\${config_Executable_${comp}[0]} 
    1712     eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1713  
    1714     # Only if we really have an executable for the component : 
    1715     if ( [ "X${ExeNameOut}" != X\"\" ] &&  [ "X${comp}" != "XCPL" ] ) ; then 
    1716       eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    1717       if [ ${comp_proc_omp_loc} -gt ${max_omp} ] ; then 
    1718         (( max_omp = comp_proc_omp_loc )) 
    1719       fi 
    1720     fi 
    1721   done 
    1722   if [ ${max_omp} -gt 1 ] ; then 
    1723     module load openmp/${max_omp}thds 
    1724   fi 
     1706  export KMP_STACKSIZE=3g 
     1707  export KMP_LIBRARY=turnaround 
     1708  export MKL_SERIAL=YES 
     1709  unset MPI_PLACING_MODE 
    17251710 
    17261711  IGCM_debug_PopStack "IGCM_sys_activ_variables" 
     
    18491834          echo "export KMP_LIBRARY=turnaround"  >> script_${ExeNameOut}.ksh 
    18501835          echo "export MKL_SERIAL=YES"  >> script_${ExeNameOut}.ksh 
    1851           echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
     1836          echo "export OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
    18521837          echo "(( MYMPIRANK = OMPI_COMM_WORLD_RANK - ${start_num})) " >>  script_${ExeNameOut}.ksh 
    18531838          echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${MYMPIRANK} 2>out_${ExeNameOut}.err.\${MYMPIRANK}"  >> script_${ExeNameOut}.ksh 
     
    19761961          if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 
    19771962 
    1978               echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
    1979               echo ""  >> script_${ExeNameOut}.ksh 
    19801963              if ( ${OK_PARA_OMP} ) ; then 
    19811964                  eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    1982                   echo "export KMP_STACKSIZE=3g"  >> script_${ExeNameOut}.ksh 
    1983                   echo "export KMP_LIBRARY=turnaround"  >> script_${ExeNameOut}.ksh 
    1984                   echo "export MKL_SERIAL=YES"  >> script_${ExeNameOut}.ksh 
    1985                   echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
     1965                  export OMP_NUM_THREADS=${comp_proc_omp_loc} 
    19861966              fi 
    19871967              if  ( ${OK_PARA_MPI} ) ; then 
     1968                  eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
    19881969                  # Default : mpirun used if nb_proc gt 1 
    1989                   # pour sortie out/err par process 
     1970                  # pour sortie out/err par process ? more test required 
    19901971                  # echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${OMPI_COMM_WORLD_RANK} 2>out_${ExeNameOut}.err.\${OMPI_COMM_WORLD_RANK}"  >> script_${ExeNameOut}.ksh 
    1991                   echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
    1992                   IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    1993                   EXECUTION="${HOST_MPIRUN_COMMAND} ./script_${ExeNameOut}.ksh" 
     1972                  EXECUTION="${HOST_MPIRUN_COMMAND} -np ${comp_proc_mpi_loc} ./${ExeNameOut}" 
    19941973              else 
    19951974                  # Default : mpirun is NOT used if nb_proc eq 1 
    1996                   # pour sortie out/err par process 
     1975                  # pour sortie out/err par process ? more test required 
    19971976                  # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh 
    1998                   echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
    1999                   IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    2000                   EXECUTION="time ./script_${ExeNameOut}.ksh" 
     1977                  EXECUTION="time ./${ExeNameOut}" 
    20011978              fi 
    20021979          fi 
     
    20061983 
    20071984  IGCM_debug_Print 1 "sys Titane : La commande d execution est " 
    2008   IGCM_debug_Print 1 $EXECUTION 
     1985  IGCM_debug_Print 1 "$EXECUTION" 
    20091986 
    20101987  IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 
Note: See TracChangeset for help on using the changeset viewer.