Ignore:
Timestamp:
02/21/12 19:25:29 (12 years ago)
Author:
mafoipsl
Message:

First test on mono-executable (sequential, MPI or hybrid MPI/OpenMP) on vargas and first try to use default value adapted to IPSLCM5A in multi-executable mode (OASIS/1 , ATM/26 and OCE/5)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_vargas.ksh

    r499 r556  
    11381138    typeset NbNodes_Job NbProc_Job comp_proc_mpi_loc comp_proc_omp_loc mpi_count 
    11391139     
    1140     # Verification with PBS parameter 
    1141     if [ X${BATCH_NUM_PROC_TOT} != X ] ; then 
    1142  
    1143         if ( ${OK_PARA_MPI} ) ; then 
    1144             EXECUTION=${HOST_MPIRUN_COMMAND} 
    1145         else 
    1146             if [ ${BATCH_NUM_PROC_TOT} -eq 1 ] ; then 
    1147                 EXECUTION=${MPIRUN_COMMAND:="time "} 
    1148             fi 
    1149         fi 
    1150     else 
    1151         if ( ! ${OK_PARA_MPI} ) ; then 
    1152             EXECUTION=${MPIRUN_COMMAND:="time "} 
    1153         fi 
    1154     fi 
    1155  
    1156     if [ ${PROCESSUS_NUMBER} -gt 1 ] ; then 
    1157     
     1140    if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then 
     1141        IGCM_debug_Exit "IGCM_sys_vargas build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} " 
     1142    fi 
     1143 
     1144    if [ -f run_file ] ; then 
     1145        IGCM_sys_Rm -f run_file 
     1146    fi 
     1147    touch run_file 
     1148 
     1149    if ( ${OK_PARA_MPMD} ) ; then 
     1150 
    11581151        if ( ${OK_PARA_OMP} ) ; then 
    11591152# NEW : 2 Noeuds 
     
    11911184            fi             
    11921185        fi 
    1193         if [ -f runfile ] ; then 
    1194             IGCM_sys_Rm -f runfile 
    1195             touch runfile 
    1196         fi 
    1197     fi 
    1198  
    1199 # runfile construction 
     1186 
     1187# run_file construction 
    12001188 
    12011189# Then first loop on the components for the coupler ie oasis 
     
    12181206                until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 
    12191207                    if ( ${OK_PARA_OMP} ) ; then  
    1220                         echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 
     1208                        echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 
    12211209                    else 
    1222                         echo "./${ExeNameOut}" >> runfile  
     1210                        echo "./${ExeNameOut}" >> run_file  
    12231211                    fi 
    12241212                    (( mpi_count = mpi_count + 1 )) 
     
    12261214            else 
    12271215                if ( ${OK_PARA_OMP} ) ; then  
    1228                     echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 
     1216                    echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 
    12291217                else 
    1230                     echo "./${ExeNameOut} " >> runfile  
     1218                    echo "./${ExeNameOut} " >> run_file  
    12311219                fi 
    12321220            fi 
     
    12521240                until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 
    12531241                    if ( ${OK_PARA_OMP} ) ; then  
    1254                         echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 
     1242                        echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 
    12551243                    else 
    1256                         echo "./${ExeNameOut}" >> runfile  
     1244                        echo "./${ExeNameOut}" >> run_file  
    12571245                    fi 
    12581246                    (( mpi_count = mpi_count + 1 )) 
     
    12601248            else 
    12611249                if ( ${OK_PARA_OMP} ) ; then  
    1262                     echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 
     1250                    echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 
    12631251                else 
    1264                     echo "./${ExeNameOut} " >> runfile  
     1252                    # to be tested : no MPI only OpenMP into MPMD mode 
     1253                    echo "./${ExeNameOut} " >> run_file  
    12651254                fi 
    12661255            fi 
     
    12681257    done 
    12691258 
    1270 # update execution command for sequential and parallel cases 
    1271  
    1272     if [ ${PROCESSUS_NUMBER} -gt 1 ] ; then 
    1273        EXECUTION="${EXECUTION} -pgmmodel mpmd -cmdfile ./runfile" 
    1274     else 
    1275        EXECUTION="${EXECUTION} " $( cat ./runfile )  
     1259    EXECUTION="${HOST_MPIRUN_COMMAND} -pgmmodel mpmd -cmdfile ./run_file" 
     1260 
     1261else # Only one executable. launch it. 
     1262 
     1263    for comp in ${config_ListOfComponents[*]} ; do 
     1264 
     1265        eval ExeNameIn=\${config_Executable_${comp}[0]} 
     1266        eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1267        # to suppress "" coming from config.card 
     1268        eval ExeNameToLaunch=${ExeNameOut} 
     1269 
     1270        [ "X${ExeNameToLaunch}" != X ] &&  EXECUTION="time ./${ExeNameToLaunch}" 
     1271 
     1272    done 
     1273 
     1274fi 
     1275 
     1276    IGCM_sys_Chmod u+x run_file 
     1277    if ( $DEBUG_sys ) ; then 
     1278      echo "run_file contains : " 
     1279      cat run_file 
    12761280    fi 
    12771281 
     
    12791283    IGCM_debug_Print 1 "$EXECUTION" 
    12801284 
    1281     IGCM_sys_Chmod u+x runfile  
    1282  
    1283     if ( $DEBUG_sys ) ; then 
    1284         echo "runfile contains : " 
    1285         cat runfile 
    1286     fi 
    1287  
    12881285    IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 
    12891286} 
    12901287 
    1291  
     1288function IGCM_sys_build_run_file { 
     1289 
     1290IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file " 
     1291 
     1292} 
     1293 
Note: See TracChangeset for help on using the changeset viewer.