Changeset 664 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh
- Timestamp:
- 05/09/12 11:07:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh
r654 r664 1478 1478 function IGCM_sys_build_execution_scripts 1479 1479 { 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1480 IGCM_debug_PushStack "IGCM_sys_build_execution_scripts" $@ 1481 if ( $DEBUG_sys ) ; then 1482 echo "IGCM_sys_build_execution_scripts " $@ 1483 fi 1484 1485 typeset NbNodes_Job NbProc_Job comp_proc_mpi_loc comp_proc_omp_loc mpi_count 1486 1487 if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ] ; then 1488 IGCM_debug_Exit "IGCM_sys_mercurex9 build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} " 1489 fi 1490 1491 if ( ${OK_PARA_MPMD} ) ; then 1492 1493 if [ -f run_file ] ; then 1494 IGCM_sys_Rm -f run_file 1495 fi 1496 touch run_file 1497 1498 if ( ${OK_PARA_OMP} ) ; then 1499 IGCM_debug_Print 2 "Error in config.card on SX9 : OpenMP not available" 1500 exit 1 1501 else 1502 1502 # OLD : 1503 1503 #PBS -v BATCH_NUM_PROC_TOT=4 1504 1504 #PBS -l cpunum_job=${BATCH_NUM_PROC_TOT} 1505 1506 1507 1508 1509 1510 1511 1512 1513 1505 echo "Job_${config_UserChoices_JobName} includes BATCH_NUM_PROC_TOT = \c" 1506 cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep -- "-v *BATCH_NUM_PROC_TOT" | sed -e "s/.*BATCH_NUM_PROC_TOT *= *//" 1507 NbProc_Job=$( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep -- "-v *BATCH_NUM_PROC_TOT" | sed -e "s/.*BATCH_NUM_PROC_TOT *= *//" ) 1508 NbProc_Job=${NbProc_Job:=0} 1509 if [ ${NbProc_Job} -eq 0 ] ; then 1510 IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources : no BATCH_NUM_PROC_TOT defined with MPI only run." 1511 exit 1 1512 fi 1513 fi 1514 1514 1515 1515 # run_file construction … … 1519 1519 ### the coupler ie oasis must be the first one 1520 1520 for comp in ${config_ListOfComponents[*]} ; do 1521 1522 eval ExeNameIn=\${config_Executable_${comp}[0]} 1523 eval ExeNameOut=\${config_Executable_${comp}[1]} 1524 1525 # for CPL component only 1526 if [ "X${comp}" = "XCPL" ] ; then 1527 1528 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1529 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1521 1530 1522 eval ExeNameIn=\${config_Executable_${comp}[0]} 1523 eval ExeNameOut=\${config_Executable_${comp}[1]} 1524 1525 # for CPL component only 1526 if [ "X${comp}" = "XCPL" ] ; then 1527 1528 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1529 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1530 1531 if ( ${OK_PARA_MPI} ) ; then 1532 echo "-p ${comp_proc_mpi_loc} -e ./${ExeNameOut}" >> run_file 1533 fi 1531 if ( ${OK_PARA_MPI} ) ; then 1532 echo "-p ${comp_proc_mpi_loc} -e ./${ExeNameOut}" >> run_file 1534 1533 fi 1534 fi 1535 1535 done 1536 1536 … … 1538 1538 1539 1539 for comp in ${config_ListOfComponents[*]} ; do 1540 1541 eval ExeNameIn=\${config_Executable_${comp}[0]} 1542 eval ExeNameOut=\${config_Executable_${comp}[1]} 1543 1544 # Only if we really have an executable for the component and not the coupler ie oasis: 1545 if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then 1546 1547 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1548 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1540 1549 1541 eval ExeNameIn=\${config_Executable_${comp}[0]} 1542 eval ExeNameOut=\${config_Executable_${comp}[1]} 1543 1544 # Only if we really have an executable for the component and not the coupler ie oasis: 1545 if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then 1546 1547 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1548 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1549 1550 if ( ${OK_PARA_MPI} ) ; then 1551 echo "-p ${comp_proc_mpi_loc} -e ./${ExeNameOut}" >> run_file 1552 fi 1550 if ( ${OK_PARA_MPI} ) ; then 1551 echo "-p ${comp_proc_mpi_loc} -e ./${ExeNameOut}" >> run_file 1553 1552 fi 1553 fi 1554 1554 done 1555 1555 … … 1562 1562 fi 1563 1563 1564 else # Only one executable. launch it.1564 else # Only one executable. launch it. 1565 1565 1566 1566 for comp in ${config_ListOfComponents[*]} ; do 1567 1567 1568 eval ExeNameIn=\${config_Executable_${comp}[0]} 1569 eval ExeNameOut=\${config_Executable_${comp}[1]} 1570 1571 [ "X${ExeNameOut}" != X\"\" ] && EXECUTION="time mpirun -np ${BATCH_NUM_PROC_TOT} ./${ExeNameOut}" 1572 1568 eval ExeNameIn=\${config_Executable_${comp}[0]} 1569 eval ExeNameOut=\${config_Executable_${comp}[1]} 1570 1571 if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 1572 EXECUTION="time mpirun -np ${BATCH_NUM_PROC_TOT} ./${ExeNameOut}" 1573 fi 1573 1574 done 1574 1575 1575 fi1576 1577 1578 1579 1580 1576 fi 1577 1578 IGCM_debug_Print 1 "sys mercurex9 : execution command is " 1579 IGCM_debug_Print 1 "$EXECUTION" 1580 1581 IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 1581 1582 1582 1583 } … … 1592 1593 function IGCM_sys_check_quota { 1593 1594 IGCM_debug_PushStack "IGCM_sys_check_quota" 1595 1594 1596 if ( $DEBUG_sys ) ; then 1595 1597 echo "IGCM_sys_check_quota "
Note: See TracChangeset
for help on using the changeset viewer.