Ignore:
Timestamp:
05/09/12 11:07:41 (12 years ago)
Author:
sdipsl
Message:
  • Bugfix on cesium. Standalone postprocessing did not handled pack files properly
  • sys_default was broken. Fix it.
  • inca.dat exception known by all system library
  • cosmetics
File:
1 edited

Legend:

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

    r654 r664  
    14781478function IGCM_sys_build_execution_scripts  
    14791479{ 
    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 
     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 
    15021502# OLD : 
    15031503#PBS -v BATCH_NUM_PROC_TOT=4 
    15041504#PBS -l cpunum_job=${BATCH_NUM_PROC_TOT} 
    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 
     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 
    15141514 
    15151515# run_file construction 
     
    15191519### the coupler ie oasis must be the first one 
    15201520    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} 
    15211530         
    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  
    15341533        fi 
     1534      fi 
    15351535    done 
    15361536 
     
    15381538 
    15391539    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} 
    15401549         
    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  
    15531552        fi 
     1553      fi 
    15541554    done 
    15551555 
     
    15621562    fi 
    15631563 
    1564 else # Only one executable. launch it. 
     1564  else # Only one executable. launch it. 
    15651565 
    15661566    for comp in ${config_ListOfComponents[*]} ; do 
    15671567 
    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 
    15731574    done 
    15741575 
    1575 fi 
    1576  
    1577     IGCM_debug_Print 1 "sys mercurex9 : execution command is " 
    1578     IGCM_debug_Print 1 "$EXECUTION" 
    1579  
    1580     IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 
     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" 
    15811582 
    15821583} 
     
    15921593function IGCM_sys_check_quota { 
    15931594  IGCM_debug_PushStack "IGCM_sys_check_quota"  
     1595 
    15941596  if ( $DEBUG_sys ) ; then 
    15951597    echo "IGCM_sys_check_quota " 
Note: See TracChangeset for help on using the changeset viewer.