Changeset 493 for branches/libIGCM_MPI_OpenMP
- Timestamp:
- 08/12/11 10:19:22 (13 years ago)
- Location:
- branches/libIGCM_MPI_OpenMP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libIGCM_MPI_OpenMP/libIGCM_config/libIGCM_config.ksh
r490 r493 569 569 if [ X${ExeNameIn} != X\"\" ] ; then 570 570 eval NbElts=\${#config_Executable_${comp}[@]} 571 if [ ${NbElts} -g t2 ] ; then571 if [ ${NbElts} -ge 2 ] ; then 572 572 (( j = 2 )) 573 573 eval ${comp}_PROC_MPI=1 … … 583 583 echo "Error reading MPI/OMP parameters !!!" 584 584 echo "Check your config.card." 585 # MM : Ãenlever :585 # MM : A enlever : 586 586 exit 1 587 587 #break 588 588 fi 589 590 # pb eval ${comp}_PROC_MPI=1591 # pb eval ${comp}_PROC_OMP=1592 # pb eval ${comp}_PROC_NOD=1593 589 594 590 eval IGCM_debug_Print 2 ${tempvar} -
branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_vargas.ksh
r492 r493 137 137 #==================================================== 138 138 #- Max number of arguments passed to nco operator or demigration command 139 UNIX_MAX_LIMIT= 360139 UNIX_MAX_LIMIT=120 140 140 141 141 #D-#================================================== … … 675 675 cat out_rsync 676 676 fi 677 IGCM_sys_Rm out_rsync 677 678 else 678 679 echo "No POST-TREATMENT avaible because ulam is down." … … 1127 1128 1128 1129 ############################################################ 1129 # Build run file1130 1131 function IGCM_sys_build_run_file {1132 IGCM_debug_PushStack "IGCM_sys_build_run_file" $@1133 set -x1134 if ( $DEBUG_sys ) ; then1135 echo "IGCM_sys_build_run_file " $@1136 fi1137 1138 NUM_PROC_OASIS=11139 1140 # Set the number of processors for OCE here1141 NUM_PROC_OCE=51142 1143 (( NUM_PROC_ATM = BATCH_NUM_PROC_TOT - NUM_PROC_OASIS - NUM_PROC_OCE ))1144 1145 if [ $1 = MPI2 ]; then1146 echo "IGCM_sys_build_run_file : error - MPI2 not available on vargas. "1147 IGCM_debug_Exit "IGCM_sys_build_run_file"1148 elif [ $1 = MPI1 ]; then1149 cat <<EOF > run_file1150 ./oasis1151 EOF1152 1153 typeset i1154 (( i = 0 ))1155 while [ ${i} -lt ${NUM_PROC_ATM} ] ; do1156 (( i = i + 1 ))1157 cat <<EOF >> run_file1158 ./lmdz.x1159 EOF1160 done1161 1162 (( i = 0 ))1163 while [ ${i} -lt ${NUM_PROC_OCE} ] ; do1164 (( i = i + 1 ))1165 cat <<EOF >> run_file1166 ./opa.xx1167 EOF1168 done1169 1170 wc -l run_file1171 fi1172 set +x1173 IGCM_debug_PopStack "IGCM_sys_build_run_file"1174 }1175 1176 1177 ############################################################1178 1130 # Build MPI/OMP scripts 1179 1131 function IGCM_sys_build_execution_scripts … … 1206 1158 EXECUTION="${EXECUTION} -pgmmodel mpmd -cmdfile ./runfile" 1207 1159 1208 IGCM_debug_Print 1 "sys vargas : La commande d execution est"1209 IGCM_debug_Print 1 $EXECUTION1160 IGCM_debug_Print 1 "sys vargas : execution command is " 1161 IGCM_debug_Print 1 "$EXECUTION" 1210 1162 1211 1163 if ( ${OK_PARA_OMP} ) ; then … … 1213 1165 # @ task_geometry={(0)(1,2,3)} 1214 1166 # Nombre de processus demandes 1167 echo "Job_${config_UserChoices_JobName} includes task_geometry = \c" 1215 1168 cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g" 1169 echo "Job_${config_UserChoices_JobName} includes task_geometry with NbNodes = \c" 1216 1170 cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g" | wc -c 1217 1171 NbNodes_Job=$(( $( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g" | wc -c ) - 1 )) … … 1227 1181 # Pas d OpenMP 1228 1182 # @ resources = ConsumableCpus(1) 1183 echo "Job_${config_UserChoices_JobName} includes total_tasks = \c" 1229 1184 cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "total_tasks" | sed -e "s/.*total_tasks = //" 1230 1185 NbProc_Job=$( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "total_tasks" | sed -e "s/.*total_tasks = //" ) … … 1234 1189 exit 1 1235 1190 fi 1236 if ( $( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "resources = ConsumableCpus(1)" ) ) ; then 1237 IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources : no ressource defined with MPI only run." 1191 if ( $( egrep '^# *@ *resources *= *ConsumableCpus\(1\)' ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} >/dev/null 2>&1 ) ) ; then 1192 IGCM_debug_Print 2 "ressources = ConsumableCpus(1) line found into Job_${config_UserChoices_JobName}" 1193 else 1194 IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources = line not found. Job should include resources = ConsumableCpus(1) " 1238 1195 exit 1 1239 1196 fi … … 1247 1204 # Then loop on the components 1248 1205 1206 ### oasis must be the first one 1249 1207 for comp in ${config_ListOfComponents[*]} ; do 1250 1208 … … 1253 1211 1254 1212 # Only if we really have an executable for the component : 1255 if [ "X${ExeNameOut}" != X\"\"] ; then1213 if [ "X${ExeNameOut}" = Xoasis ] ; then 1256 1214 1257 1215 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} … … 1263 1221 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 1264 1222 if ( ${OK_PARA_OMP} ) ; then 1265 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} > out_${ExeNameOut}.out.${mpi_count} 2>out_${ExeNameOut}.err.${mpi_count}" >> runfile1223 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 1266 1224 else 1267 echo "./${ExeNameOut} > out_${ExeNameOut}.out.${mpi_count} 2>out_${ExeNameOut}.err.${mpi_count}" >> runfile1225 echo "./${ExeNameOut}" >> runfile 1268 1226 fi 1269 1227 (( mpi_count = mpi_count + 1 )) … … 1271 1229 else 1272 1230 if ( ${OK_PARA_OMP} ) ; then 1273 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> runfile1231 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 1274 1232 else 1275 echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> runfile1233 echo "./${ExeNameOut} " >> runfile 1276 1234 fi 1277 1235 fi 1278 1236 fi 1279 1237 done 1238 1239 for comp in ${config_ListOfComponents[*]} ; do 1240 1241 eval ExeNameIn=\${config_Executable_${comp}[0]} 1242 eval ExeNameOut=\${config_Executable_${comp}[1]} 1243 1244 # Only if we really have an executable for the component : 1245 if [ "X${ExeNameOut}" != X\"\" -and "X${ExeNameOut}" != Xoasis ] ; then 1246 1247 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1248 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1249 1250 if ( ${OK_PARA_MPI} ) ; then 1251 1252 (( mpi_count = 1 )) 1253 until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do 1254 if ( ${OK_PARA_OMP} ) ; then 1255 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 1256 else 1257 echo "./${ExeNameOut}" >> runfile 1258 fi 1259 (( mpi_count = mpi_count + 1 )) 1260 done 1261 else 1262 if ( ${OK_PARA_OMP} ) ; then 1263 echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> runfile 1264 else 1265 echo "./${ExeNameOut} " >> runfile 1266 fi 1267 fi 1268 fi 1269 done 1280 1270 IGCM_sys_Chmod u+x runfile 1281 1271 1272 if ( $DEBUG_sys ) ; then 1273 echo "runfile contains : " 1274 cat runfile 1275 fi 1276 1277 1282 1278 IGCM_debug_PopStack "IGCM_sys_build_execution_scripts" 1283 1279 }
Note: See TracChangeset
for help on using the changeset viewer.