- Timestamp:
- 03/26/20 15:24:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_jeanzay.ksh
r1517 r1523 1288 1288 # ... 1289 1289 # 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} 1297 1307 1298 1308 # Hosts treatment … … 1305 1315 rank=0 1306 1316 current_core=0 1317 current_core_mpi=0 1307 1318 1308 1319 for comp in ${config_ListOfComponents[*]} ; do … … 1354 1365 IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 1355 1366 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 1357 1377 if [ ${comp_proc_nod_loc} -gt 1 ] ; then 1358 1378 (( offset_comp_proc_loc = NB_CORE_PER_NODE / (comp_proc_mpi_loc / comp_proc_nod_loc) )) … … 1361 1381 fi 1362 1382 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 1363 1396 for nb_proc_mpi in `seq 0 $(($comp_proc_mpi_loc-1))`; do 1364 1397 (( index_host = current_core / NB_CORE_PER_NODE )) 1365 1398 host_value=${listnodes[${index_host}]} 1366 (( slot = current_core % NB_CORE_PER_NODE ))1367 1399 echo "$host_value" >> hostlist 1368 echo "$rank taskset -c $slot-$((slot+comp_proc_omp_loc-1)) ./script_${ExeNameOut}.ksh" >> run_file1369 (( rank = rank + 1 ))1370 1400 (( current_core = current_core + offset_comp_proc_loc )) 1371 1401 done
Note: See TracChangeset
for help on using the changeset viewer.