Changeset 1523 for trunk


Ignore:
Timestamp:
03/26/20 15:24:04 (4 years ago)
Author:
aclsce
Message:
  • JeanZay? : Modified method to launch MPMD code to avoid too big run_file configuration file (SLURM has a number of characters limitation).
File:
1 edited

Legend:

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

    r1517 r1523  
    12881288    # ... 
    12891289    # example of run_file : 
    1290     # 0 taskset -c 0-4 ./script_lmdz.x.ksh 
    1291     # 1 taskset -c 5-9 ./script_lmdz.x.ksh 
    1292     #... 
    1293     # 32 taskset -c 0 ./script_opa.xx.ksh 
    1294     # 33 taskset -c 1 ./script_opa.xx.ksh 
    1295     #... 
    1296     # 62 taskset -c 30 ./script_xios.x.ksh 
     1290    # 0-70 ./prog_lmdz.x.sh %o %t 
     1291    # 71-430 ./prog_opa.xx.sh %o %t 
     1292    # 431-431 ./prog_xios.x.sh %o %t 
     1293    # examples of prog_file : 
     1294    # prog_lmdz.x.sh : 
     1295    # (( init = 0 + $1 )) 
     1296    # (( index = init * 10 )) 
     1297    # (( slot = index % 40 )) 
     1298    # taskset -c $slot-$((slot + 10 - 1)) ./script_lmdz.x.ksh 
     1299    # that will become 
     1300    # taskset -c 0-9 ./script_lmdz.x.ksh 
     1301    # ... 
     1302    # with script_lmdz.x.ksh 
     1303    # export OMP_STACKSIZE=3g 
     1304    # export OMP_PLACES=cores 
     1305    # export OMP_NUM_THREADS=10 
     1306    # ./lmdz.x > out_lmdz.x.out.${SLURM_PROCID} 2>out_lmdz.x.err.${SLURM_PROCID} 
    12971307 
    12981308    #  Hosts treatment 
     
    13051315        rank=0 
    13061316        current_core=0 
     1317        current_core_mpi=0 
    13071318 
    13081319      for comp in ${config_ListOfComponents[*]} ; do 
     
    13541365          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    13551366 
    1356           # Complete run_file 
     1367        # Build run_file 
     1368        # Only if the component has an executable 
     1369        if ( [ "X${ExeNameOut}" != X\"\" ] ) ; then 
     1370 
     1371          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1372          (( end_core = ${current_core_mpi} + ${comp_proc_mpi_loc} - 1 )) 
     1373          echo "${current_core_mpi}-${end_core} ./prog_${ExeNameOut}.sh %o %t" >> run_file 
     1374          (( current_core_mpi = ${end_core} + 1 )) 
     1375        fi 
     1376 
    13571377          if [ ${comp_proc_nod_loc} -gt 1 ] ; then 
    13581378              (( offset_comp_proc_loc =  NB_CORE_PER_NODE / (comp_proc_mpi_loc / comp_proc_nod_loc) )) 
     
    13611381          fi 
    13621382 
     1383          # Build configuration file 
     1384  
     1385          echo "#!/bin/sh" > prog_${ExeNameOut}.sh 
     1386          echo "(( init = $current_core + \$1 ))" >> prog_${ExeNameOut}.sh 
     1387          echo "(( index = init * $comp_proc_omp_loc ))" >> prog_${ExeNameOut}.sh 
     1388          echo "(( slot = index % 40 ))" >> prog_${ExeNameOut}.sh 
     1389          echo "echo ${ExeNameOut} taskset -c \$slot"-"\$((slot + $comp_proc_omp_loc - 1))" >> prog_${ExeNameOut}.sh 
     1390          echo "taskset -c \$slot"-"\$((slot + $comp_proc_omp_loc - 1)) ./script_${ExeNameOut}.ksh" >> prog_${ExeNameOut}.sh 
     1391 
     1392          IGCM_sys_Chmod u+x prog_${ExeNameOut}.sh 
     1393 
     1394        # Build hostlist file 
     1395 
    13631396          for nb_proc_mpi in `seq 0 $(($comp_proc_mpi_loc-1))`; do 
    13641397             (( index_host = current_core / NB_CORE_PER_NODE )) 
    13651398             host_value=${listnodes[${index_host}]} 
    1366              (( slot =  current_core % NB_CORE_PER_NODE )) 
    13671399               echo "$host_value" >> hostlist 
    1368                echo "$rank taskset -c $slot-$((slot+comp_proc_omp_loc-1)) ./script_${ExeNameOut}.ksh" >> run_file 
    1369              (( rank = rank + 1 )) 
    13701400             (( current_core = current_core + offset_comp_proc_loc )) 
    13711401          done 
Note: See TracChangeset for help on using the changeset viewer.