Changeset 685


Ignore:
Timestamp:
06/15/12 10:02:34 (12 years ago)
Author:
mafoipsl
Message:

On curie add variable to set OpenMP thread maximum memory and other variables required. Adapt execution command to send a script instead of an executable.

File:
1 edited

Legend:

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

    r676 r685  
    181181#==================================================== 
    182182#- HOST_MPIRUN_COMMAND 
    183 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time ccc_mprun"} 
     183typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="/usr/bin/time ccc_mprun"} 
    184184 
    185185#==================================================== 
     
    17641764    for comp in ${config_ListOfComponents[*]} ; do 
    17651765 
    1766       eval ExeNameIn=\${config_Executable_${comp}[0]} 
     1766      # Only if we really have an executable for the component : 
    17671767      eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1768  
    17691768      if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 
    1770         if ( ${OK_PARA_MPI} ) ; then 
    1771           eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
    1772           EXECUTION="${EXECUTION} -n ${comp_proc_mpi_loc} ./${ExeNameOut}" 
    1773         else 
    1774           EXECUTION="${EXECUTION} ./${ExeNameOut}" 
    1775         fi 
     1769 
     1770        echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
     1771        echo ""  >> script_${ExeNameOut}.ksh 
     1772        IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
     1773 
    17761774        if ( ${OK_PARA_OMP} ) ; then 
    17771775          eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    1778           EXECUTION="export OMP_NUM_THREADS=${comp_proc_omp_loc} ; ${EXECUTION} " 
     1776          echo ""  >> script_${ExeNameOut}.ksh 
     1777          echo "export KMP_STACKSIZE=3g"  >> script_${ExeNameOut}.ksh 
     1778          echo "export KMP_LIBRARY=turnaround"  >> script_${ExeNameOut}.ksh 
     1779          echo "export MKL_SERIAL=YES"  >> script_${ExeNameOut}.ksh 
     1780          echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
    17791781        fi 
     1782 
     1783        if  ( ${OK_PARA_MPI} ) ; then 
     1784          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1785          # Default : ccc_mprun used if nb_proc gt 1 
     1786          # to have out/err per process on different files 
     1787          # echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${SLURM_PROCID} 2>out_${ExeNameOut}.err.\${SLURM_PROCID}"  >> script_${ExeNameOut}.ksh 
     1788          echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
     1789          EXECUTION="${HOST_MPIRUN_COMMAND} -n ${comp_proc_mpi_loc} ./script_${ExeNameOut}.ksh" 
     1790        else 
     1791          # Default : ccc_mprun is NOT used if nb_proc eq 1 
     1792          # to have out/err per process on different files 
     1793          # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh 
     1794          echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
     1795          EXECUTION="/usr/bin/time ./script_${ExeNameOut}.ksh" 
     1796        fi 
     1797 
     1798        IGCM_debug_Print 1 "sys Curie : script_${ExeNameOut}.ksh contains" 
     1799        cat script_${ExeNameOut}.ksh 
     1800 
    17801801      fi 
    17811802 
Note: See TracChangeset for help on using the changeset viewer.