Changeset 1399 for tags/libIGCM_v3.0_beta1/libIGCM_sys
- Timestamp:
- 07/05/17 20:18:51 (7 years ago)
- Location:
- tags/libIGCM_v3.0_beta1/libIGCM_sys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys.ksh
r1314 r1399 52 52 case $( hostname -s ) in 53 53 ada*) 54 [ ! X${TaskType} = Xchecking ] && echo " sys source ada Intel X-64 lib."54 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ada Intel X-64." 55 55 CENTER=IDRIS 56 56 SYSTEM=ada 57 57 . ${libIGCM}/libIGCM_sys/libIGCM_sys_ada.ksh;; 58 58 curie*) 59 [ ! X${TaskType} = Xchecking ] && echo " sys source curie Intel X-64 lib."59 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for curie Intel X-64." 60 60 CENTER=TGCC 61 61 SYSTEM=curie 62 62 . ${libIGCM}/libIGCM_sys/libIGCM_sys_curie.ksh;; 63 63 airain*) 64 [ ! X${TaskType} = Xchecking ] && echo " sys source airain Intel X-64 lib."64 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for airain Intel X-64." 65 65 CENTER=TGCC 66 66 SYSTEM=curie 67 67 . ${libIGCM}/libIGCM_sys/libIGCM_sys_curie.ksh;; 68 68 asterix*|obelix*) 69 [ ! X${TaskType} = Xchecking ] && echo " sys source obelix or asterix lib."69 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for obelix or asterix." 70 70 CENTER=LSCE 71 71 SYSTEM=lxiv8 72 72 . ${libIGCM}/libIGCM_sys/libIGCM_sys_obelix.ksh;; 73 73 ciclad*) 74 [ ! X${TaskType} = Xchecking ] && echo " sys source ciclad libfor running at ciclad."74 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ciclad for running at ciclad." 75 75 CENTER=IPSL-ciclad 76 76 SYSTEM=ifort_CICLAD 77 77 . ${libIGCM}/libIGCM_sys/libIGCM_sys_ciclad.ksh;; 78 78 camelot*|loholt1*|loholt2*|merlin*) 79 [ ! X${TaskType} = Xchecking ] && echo " sys source ciclad libfor running at climserv."79 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ciclad for running at climserv." 80 80 CENTER=IPSL-climserv 81 81 SYSTEM=ifort_CICLAD 82 82 . ${libIGCM}/libIGCM_sys/libIGCM_sys_ciclad.ksh;; 83 83 iitm*) 84 [ ! X${TaskType} = Xchecking ] && echo " sys source iitm lib."84 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for iitm." 85 85 CENTER=IITM 86 86 SYSTEM=iitm 87 87 . ${libIGCM}/libIGCM_sys/libIGCM_sys_iitm.ksh;; 88 88 *) 89 [ ! X${TaskType} = Xchecking ] && echo " sys source default lib."89 [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for a default machine." 90 90 CENTER=DEFAULT 91 91 SYSTEM=default -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_ada.ksh
r1362 r1399 807 807 808 808 IGCM_debug_PopStack "IGCM_sys_GetDate_Monitoring" 809 } 810 811 #D-#================================================== 812 #D-function IGCM_sys_Dods_Rm 813 #D-* Purpose: DO NOTHING ! Put ${ARCHIVE} files on DODS internet protocole. 814 #D-* Examples: 815 #D- 816 function IGCM_sys_Dods_Rm { 817 if ( $DEBUG_sys ) ; then 818 echo "IGCM_sys_Dods_Rm :" $@ 819 fi 820 821 typeset status 822 if [ $DRYRUN = 0 ]; then 823 if [ "$#" -eq 1 ]; then 824 rsh ${STOREHOST} exec /bin/ksh <<EOF 825 cd ${R_SAVE} 826 /arch/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS}/${1} > /dev/null 2>&1 827 EOF 828 status=$? 829 else 830 rsh ${STOREHOST} exec /bin/ksh <<EOF 831 cd ${R_SAVE} 832 /arch/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS} > /dev/null 2>&1 833 EOF 834 status=$? 835 fi 836 fi 837 838 return ${status} 839 } 840 841 #D-#================================================== 842 #D-function IGCM_sys_Dods_Cp 843 #D-* Purpose: Copy $(ARCHIVE) files on DODS internet protocole. 844 #D-* Examples: 845 #D- 846 function IGCM_sys_Dods_Cp { 847 if ( $DEBUG_sys ) ; then 848 echo "IGCM_sys_Dods_Cp :" $@ 849 fi 850 return 0 809 851 } 810 852 … … 1546 1588 } 1547 1589 1590 #D-#================================================== 1591 #D-function IGCM_sys_rebuild_nemo 1592 #D-* Purpose: rebuild nemo parallel files with general rebuild 1593 #D-* Examples: 1594 #D- 1595 1596 function IGCM_sys_rebuild_nemo { 1597 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1598 if ( $DEBUG_sys ) ; then 1599 echo "IGCM_sys_rebuild_nemo :" $@ 1600 fi 1601 1602 nemo_generic_restart_file_name_out=${1} 1603 nemo_extension_out=${3} 1604 shift ; shift ; shift 1605 1606 IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 1607 1608 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1609 } 1610 1611 -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_ciclad.ksh
r1358 r1399 1233 1233 } 1234 1234 1235 #D-#================================================== 1236 #D-function IGCM_sys_rebuild_nemo 1237 #D-* Purpose: rebuild nemo parallel files with general rebuild 1238 #D-* Examples: 1239 #D- 1240 1241 function IGCM_sys_rebuild_nemo { 1242 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1243 if ( $DEBUG_sys ) ; then 1244 echo "IGCM_sys_rebuild_nemo :" $@ 1245 fi 1246 1247 nemo_generic_restart_file_name_out=${1} 1248 nemo_extension_out=${3} 1249 shift ; shift ; shift 1250 1251 IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 1252 1253 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1254 } 1255 1256 1257 -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_curie.ksh
r1364 r1399 178 178 #==================================================== 179 179 #- HOST_MPIRUN_COMMAND 180 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="/usr/bin/time ccc_mprun -E-K1 "}180 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="/usr/bin/time ccc_mprun -E-K1 "} 181 181 182 182 #==================================================== … … 922 922 # fi 923 923 924 /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 925 status=$? 924 if [ "$#" -eq 1 ]; then 925 /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 926 status=$? 927 else 928 /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS} # > out_dods_rm 2>&1 929 status=$? 930 fi 926 931 927 932 # if [ ${status} -gt 0 ] ; then … … 1111 1116 1112 1117 elif [ ${executionType} -eq 2 ] ; then 1113 # MPMD + MPI + OMP 1114 sed -e "/::openMPthreads::/d" \ 1115 -e "s/::JobNumProcTot::/${coreNumber}/" \ 1116 ${file} > ${file}.tmp 1117 1118 # MPMD + MPI + OMP : mpirun/ccc_mprun/error 1119 if ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "X" ] || [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xmpirun" ] ) ; then 1120 sed -e "/::openMPthreads::/d" \ 1121 -e "s/::JobNumProcTot::/${coreNumber}/" \ 1122 ${file} > ${file}.tmp 1123 elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xccc_mprun" ] ) ; then 1124 sed -e "/::openMPthreads::/d" \ 1125 -e "s/::JobNumProcTot::/${coreNumber}/" \ 1126 -e "/--cpu_bind=none/d" \ 1127 ${file} > ${file}.tmp 1128 else 1129 IGCM_debug_Print 1 "You have to set ExecutionModeOnCurie=ccc_mprun or mpirun in config.card" 1130 IGCM_debug_Exit "IGCM_sys_updateHeaders" 1131 fi 1118 1132 elif [ ${executionType} -eq 3 ] ; then 1119 1133 # SPMD + MPI/OMP … … 1184 1198 EXECUTION=${HOST_MPIRUN_COMMAND} 1185 1199 1186 # MPMD mode1187 1200 if ( ${OK_PARA_MPMD} ) ; then 1188 1201 1189 # Only MPI (MPMD) 1202 # MPMD mode 1203 # 1 MPI only 1204 # 2 MPI/OpenMP mpirun method 1205 # 3 MPI/OpenMP ccc_mprun method 1206 1207 if [ -f run_file ] ; then 1208 IGCM_sys_Rm -f run_file 1209 fi 1210 touch run_file 1211 1212 # case 1 : Only MPI (MPMD) 1190 1213 if ( ! ${OK_PARA_OMP} ) ; then 1191 1192 if [ -f run_file ] ; then1193 IGCM_sys_Rm -f run_file1194 fi1195 touch run_file1196 1214 1197 1215 # Build run_file … … 1236 1254 fi 1237 1255 1238 # MPI-OpenMP (MPMD) 1239 else 1256 elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "X" ] || [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xmpirun" ] ) ; then 1257 1258 # 2 MPI/OpenMP mpirun method 1240 1259 1241 1260 # Use of mpirun instead of ccc_mprun … … 1309 1328 1310 1329 #echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 1311 1312 1313 1314 1330 echo "(( MYMPIRANK = OMPI_COMM_WORLD_RANK )) " >> script_${ExeNameOut}.ksh 1331 echo "MYMPIRANK=\$(printf '%3.3d\n' \${MYMPIRANK})" >> script_${ExeNameOut}.ksh 1332 echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${MYMPIRANK} 2>out_${ExeNameOut}.err.\${MYMPIRANK}" >> script_${ExeNameOut}.ksh 1333 IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 1315 1334 1316 1335 if [ ${init_exec} = y ] ; then … … 1352 1371 fi 1353 1372 done 1354 fi 1355 1373 1374 elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xccc_mprun" ] ) ; then 1375 1376 # 3 MPI/OpenMP ccc_mprun method 1377 1378 # MPI-OpenMP (MPMD) 1379 # example of run_file 1380 # 71-8 env OMP_NUM_THREADS=8 ./script_lmdz.x.ksh 1381 # 480-1 env OMP_NUM_THREADS=1 ./script_opa.xx.ksh 1382 # 1-1 env OMP_NUM_THREADS=1 ./script_xios.x.ksh 1383 1384 # Loop on the components 1385 for comp in ${config_ListOfComponents[*]} ; do 1386 1387 eval ExeNameIn=\${config_Executable_${comp}[0]} 1388 eval ExeNameOut=\${config_Executable_${comp}[1]} 1389 1390 # Not possible if oasis has an executable (i.e old version of oasis3) 1391 if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" = "XCPL" ] ) ; then 1392 IGCM_debug_Exit "ERROR MPMD with hybrid MPI-OpenMP is not available with oasis3 version" 1393 IGCM_debug_Print 2 "Only available with oasis3-MCT version coupler" 1394 IGCM_debug_Verif_Exit 1395 fi 1396 1397 # Only if we really have an executable for the component : 1398 if [ "X${ExeNameOut}" != X\"\" ] ; then 1399 1400 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 1401 eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 1402 1403 # Build script files 1404 1405 echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 1406 echo "" >> script_${ExeNameOut}.ksh 1407 if [ ${comp_proc_omp_loc} -gt 1 ] ; then 1408 1409 # Check if the number of threads is correct 1410 case ${comp_proc_omp_loc} in 1411 2|4|8|16) 1412 IGCM_debug_Print 1 "You run ${ExeNameOut} on ${comp_proc_omp_loc} OMP threads" 1413 ;; 1414 *) 1415 IGCM_debug_Exit "ERROR with OMP parameters !" 1416 IGCM_debug_Print 2 "${comp_proc_omp_loc} is not possible as number of OMP threads" 1417 IGCM_debug_Print 2 "Only 2,4,8,16 as number of OMP threads are possible " 1418 IGCM_debug_Verif_Exit 1419 ;; 1420 esac 1421 ### only for LMDZ? 1422 echo "export KMP_STACKSIZE=3g" >> script_${ExeNameOut}.ksh 1423 echo "export KMP_LIBRARY=turnaround" >> script_${ExeNameOut}.ksh 1424 echo "export MKL_SERIAL=YES" >> script_${ExeNameOut}.ksh 1425 echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 1426 1427 fi 1428 1429 # to have out/err per process on different files 1430 echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${SLURM_PROCID} 2>out_${ExeNameOut}.err.\${SLURM_PROCID}" >> script_${ExeNameOut}.ksh 1431 #echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 1432 1433 IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 1434 1435 # Complete run_file 1436 1437 echo "${comp_proc_mpi_loc}-${comp_proc_omp_loc} env OMP_NUM_THREADS=${comp_proc_omp_loc} ./script_${ExeNameOut}.ksh " >>run_file 1438 1439 fi 1440 done 1441 1442 ## variable added to stop after 60s instead of 600s by default. 1443 ## This is used when no error comes from executables and when something stopped an executable without notice. 1444 export SLURM_WAIT=60 1445 1446 ## module advised by TGCC (instead of 2 variables) 1447 module load feature/bridge/heterogenous_mpmd 1448 1449 # set EXECUTION for ccc_mprun case (similar to #1 : MPI only MPMD method) 1450 1451 EXECUTION="${HOST_MPIRUN_COMMAND} -f ./run_file" 1452 1453 IGCM_sys_Chmod u+x run_file 1454 if ( $DEBUG_sys ) ; then 1455 echo "run_file contains : " 1456 cat run_file 1457 fi 1458 1459 else 1460 1461 IGCM_debug_Print 1 "sys Curie : choose mpirun or ccc_mprun in config.card for ExecutionModeOnCurie" 1462 1463 fi # 1 2 or 3 if ${OK_PARA_MPMD} 1464 1465 else 1356 1466 # Only one executable (SPMD mode). 1357 else1358 1467 1359 1468 for comp in ${config_ListOfComponents[*]} ; do … … 1362 1471 eval ExeNameOut=\${config_Executable_${comp}[1]} 1363 1472 if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 1473 1474 # Build script files 1364 1475 1365 1476 echo "#!/bin/ksh" > script_${ExeNameOut}.ksh … … 1398 1509 done 1399 1510 1400 fi 1511 fi # ${OK_PARA_MPMD} 1401 1512 1402 1513 IGCM_debug_Print 1 "sys Curie : execution command is " … … 1689 1800 } 1690 1801 1802 #D-#================================================== 1803 #D-function IGCM_sys_rebuild_nemo 1804 #D-* Purpose: rebuild nemo parallel files with nemo specific rebuild on curie 1805 #D-* Examples: 1806 #D- 1807 1808 function IGCM_sys_rebuild_nemo { 1809 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1810 if ( $DEBUG_sys ) ; then 1811 echo "IGCM_sys_rebuild_nemo :" $@ 1812 fi 1813 1814 $( ccc_home -u p86ipsl )/REBUILD_NEMO/rebuild_nemo ${1} ${2} 1815 1816 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1817 } 1818 -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_default.ksh
r1318 r1399 1172 1172 } 1173 1173 1174 #D-#================================================== 1175 #D-function IGCM_sys_rebuild_nemo 1176 #D-* Purpose: rebuild nemo parallel files with general rebuild 1177 #D-* Examples: 1178 #D- 1179 1180 function IGCM_sys_rebuild_nemo { 1181 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1182 if ( $DEBUG_sys ) ; then 1183 echo "IGCM_sys_rebuild_nemo :" $@ 1184 fi 1185 1186 nemo_generic_restart_file_name_out=${1} 1187 nemo_extension_out=${3} 1188 shift ; shift ; shift 1189 1190 IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 1191 1192 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1193 } 1194 -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_iitm.ksh
r1244 r1399 1030 1030 IGCM_debug_PopStack "IGCM_sys_CountJobInQueue" 1031 1031 } 1032 1033 #D-#================================================== 1034 #D-function IGCM_sys_rebuild_nemo 1035 #D-* Purpose: rebuild nemo parallel files with general rebuild 1036 #D-* Examples: 1037 #D- 1038 1039 function IGCM_sys_rebuild_nemo { 1040 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1041 if ( $DEBUG_sys ) ; then 1042 echo "IGCM_sys_rebuild_nemo :" $@ 1043 fi 1044 1045 nemo_generic_restart_file_name_out=${1} 1046 nemo_extension_out=${3} 1047 shift ; shift ; shift 1048 1049 IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 1050 1051 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1052 } 1053 1054 -
tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_obelix.ksh
r1360 r1399 1195 1195 } 1196 1196 1197 1198 #D-#================================================== 1199 #D-function IGCM_sys_rebuild_nemo 1200 #D-* Purpose: rebuild nemo parallel files with general rebuild 1201 #D-* Examples: 1202 #D- 1203 1204 function IGCM_sys_rebuild_nemo { 1205 IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 1206 if ( $DEBUG_sys ) ; then 1207 echo "IGCM_sys_rebuild_nemo :" $@ 1208 fi 1209 1210 nemo_generic_restart_file_name_out=${1} 1211 nemo_extension_out=${3} 1212 shift ; shift ; shift 1213 1214 IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 1215 1216 IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 1217 } 1218
Note: See TracChangeset
for help on using the changeset viewer.