- Timestamp:
- 02/21/12 19:25:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_vargas.ksh
r499 r556 1138 1138 typeset NbNodes_Job NbProc_Job comp_proc_mpi_loc comp_proc_omp_loc mpi_count 1139 1139 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 1158 1151 if ( ${OK_PARA_OMP} ) ; then 1159 1152 # NEW : 2 Noeuds … … 1191 1184 fi 1192 1185 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 1200 1188 1201 1189 # Then first loop on the components for the coupler ie oasis … … 1218 1206 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 1219 1207 if ( ${OK_PARA_OMP} ) ; then 1220 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run file1208 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 1221 1209 else 1222 echo "./${ExeNameOut}" >> run file1210 echo "./${ExeNameOut}" >> run_file 1223 1211 fi 1224 1212 (( mpi_count = mpi_count + 1 )) … … 1226 1214 else 1227 1215 if ( ${OK_PARA_OMP} ) ; then 1228 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run file1216 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 1229 1217 else 1230 echo "./${ExeNameOut} " >> run file1218 echo "./${ExeNameOut} " >> run_file 1231 1219 fi 1232 1220 fi … … 1252 1240 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 1253 1241 if ( ${OK_PARA_OMP} ) ; then 1254 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run file1242 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 1255 1243 else 1256 echo "./${ExeNameOut}" >> run file1244 echo "./${ExeNameOut}" >> run_file 1257 1245 fi 1258 1246 (( mpi_count = mpi_count + 1 )) … … 1260 1248 else 1261 1249 if ( ${OK_PARA_OMP} ) ; then 1262 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run file1250 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file 1263 1251 else 1264 echo "./${ExeNameOut} " >> runfile 1252 # to be tested : no MPI only OpenMP into MPMD mode 1253 echo "./${ExeNameOut} " >> run_file 1265 1254 fi 1266 1255 fi … … 1268 1257 done 1269 1258 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 1261 else # 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 1274 fi 1275 1276 IGCM_sys_Chmod u+x run_file 1277 if ( $DEBUG_sys ) ; then 1278 echo "run_file contains : " 1279 cat run_file 1276 1280 fi 1277 1281 … … 1279 1283 IGCM_debug_Print 1 "$EXECUTION" 1280 1284 1281 IGCM_sys_Chmod u+x runfile1282 1283 if ( $DEBUG_sys ) ; then1284 echo "runfile contains : "1285 cat runfile1286 fi1287 1288 1285 IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 1289 1286 } 1290 1287 1291 1288 function IGCM_sys_build_run_file { 1289 1290 IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file " 1291 1292 } 1293
Note: See TracChangeset
for help on using the changeset viewer.