Changeset 1399
- Timestamp:
- 07/05/17 20:18:51 (7 years ago)
- Location:
- tags/libIGCM_v3.0_beta1
- Files:
-
- 1 deleted
- 22 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
tags/libIGCM_v3.0_beta1/AA_clean_latestPackperiod
r1356 r1399 256 256 IGCM_sys_Rm ${SUBMIT_DIR}/run.card 257 257 else 258 # ÂUpdate run.card258 # Update run.card 259 259 cp ${SUBMIT_DIR}/run.card ${SUBMIT_DIR}/run.card.old 260 260 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "OnQueue" … … 264 264 IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodDateEnd \ 265 265 $( IGCM_date_HumanDigit ${PeriodDateEnd} ) 266 # ÂUpdate job266 # Update job 267 267 cp Job_${config_UserChoices_JobName} Job_${config_UserChoices_JobName}.old 268 268 sed -e "s/\(#.*Script_Output_${config_UserChoices_JobName}\.\)\([0-9]*\)\(.*\)/\1${Suffix}\3/" \ -
tags/libIGCM_v3.0_beta1/AA_clean_month
r1343 r1399 5 5 6 6 echo "" 7 echo "This script has been renamed. Now please use clean_PeriodLeng ht.job in libIGCM directory."7 echo "This script has been renamed. Now please use clean_PeriodLength.job in libIGCM directory." 8 8 echo "See documentation https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/DocGmonitor#Unknownerror" 9 9 echo "" -
tags/libIGCM_v3.0_beta1/AA_create_multi_se
r1356 r1399 424 424 [ ${config_UserChoices_TagName} = "IPSLCM5B" ] || \ 425 425 [ ${config_UserChoices_TagName} = "IPSLCM5A-MR" ] || \ 426 [ ${config_UserChoices_TagName} = "IPSLCM5A2" ] || \ 426 427 [ ${config_UserChoices_TagName} = "IPSLCM6" ] ; then 427 428 export Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ; -
tags/libIGCM_v3.0_beta1/AA_create_se
r1366 r1399 584 584 [ ${config_UserChoices_TagName} = "IPSLCM5B" ] || \ 585 585 [ ${config_UserChoices_TagName} = "IPSLCM5A-MR" ] || \ 586 [ ${config_UserChoices_TagName} = "IPSLCM5A2" ] || \ 586 587 [ ${config_UserChoices_TagName} = "IPSLCM6" ] ; then 587 588 # METRICS -
tags/libIGCM_v3.0_beta1/AA_create_ts
r1356 r1399 736 736 # 737 737 if [ "${DEPOT}" = "TRUE" ] ; then 738 # YEARLY AVERAGE DERIVED FROM MONTHLY MEAN739 if ( [ ${FlagDir} = "1M" ] && [ -f ${file_out} ] ) ; then740 file_before_YE=${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_1Y_${var}.nc741 file_out_YE=${config_UserChoices_JobName}_${DATE_BUILD_END}_1Y_${var}.nc742 #743 # Compute yearly average considering calendar744 IGCM_sys_cdo yearmonmean -selvar,${var} ${file_out} ${file_out_YE}745 # Extract all ancillary variables except $var, they will be appended after the cdo command746 # Needed because cdo applies calculs on all variables747 IGCM_sys_ncks -Oh -x -v ${var} ${file_out} ${file_out_YE%%.nc}_tmp1.nc748 # This will remove the time axis because cdo rewrites severely with only considered useful variables749 IGCM_sys_cdo -mulc,1 ${file_out_YE%%.nc}_tmp1.nc ${file_out_YE%%.nc}_tmp2.nc 2>/dev/null750 if [ $? -eq 0 ] ; then751 # Now append all ancillary variables if previous cdo operator ok752 IGCM_sys_ncks -h -A ${file_out_YE%%.nc}_tmp2.nc ${file_out_YE}753 fi754 755 # Put global history attribut756 IGCM_sys_ncatted -Oh -a history,global,o,c,"build by libIGCM/create_ts" ${file_out_YE}757 IGCM_debug_Verif_Exit758 #759 eval IGCM_sys_Put_Out ${file_out_YE} \${R_OUT_${comp}}/Analyse/TS_MO_YE/${file_out_YE}760 [ "${FLAG_B}" = "TRUE" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/TS_MO_YE/ ${file_before_YE} ${file_out_YE}761 IGCM_sys_Rm ${file_out_YE%%.nc}_tmp*.nc762 fi763 738 # WE PUT FINAL FILE ON FILE SYSTEM 764 739 [ "${FLAG_B}" = "FALSE" ] && file_out=${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc … … 786 761 # DODS copy 787 762 for comp in ${config_ListOfComponents[*]} ; do 788 for TS_Dir in TS_YE TS_MO TS_ MO_YE TS_DA TS_HF TS_INS ; do763 for TS_Dir in TS_YE TS_MO TS_DA TS_HF TS_INS ; do 789 764 IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/${TS_Dir} 790 765 [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/${TS_Dir} -
tags/libIGCM_v3.0_beta1/AA_job
r1373 r1399 11 11 #-Q- curie #MSUB -x # exclusive node. To specify only for MPMD together with the one below 12 12 #-Q- curie #MSUB -E '--cpu_bind=none' 13 #-Q- curie ##MSUB -E '--distribution cyclic' 13 14 #-Q- curie #MSUB -T 86400 # Wall clock limit (seconds) 14 15 #-Q- curie #MSUB -q standard # thin nodes 15 #-Q- curie #MSUB -U medium # priority within a project16 16 #-Q- curie #MSUB -A ::default_project:: 17 17 #-Q- curie # Below specific options that can be activated -
tags/libIGCM_v3.0_beta1/AA_metrics_NEMO
r1365 r1399 161 161 orca_grid=${DB}/grids/${opa9_UserChoices_ORCA_version}_grid.nc 162 162 163 IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc164 IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc165 IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc166 167 IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc168 IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc169 IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc163 ## IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 164 ## IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 165 ## IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc 166 167 ## IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc 168 ## IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc 169 ## IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc 170 170 171 171 #================================== -
tags/libIGCM_v3.0_beta1/AA_pack_restart
r1356 r1399 27 27 #-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 28 28 #-Q- ada # @ notification = error 29 #-Q- ada # @ environment = $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $ DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER ; wall_clock_limit=$(wall_clock_limit)29 #-Q- ada # @ environment = $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $PeriodDateBegin ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER ; wall_clock_limit=$(wall_clock_limit) 30 30 #-Q- ada # @ queue 31 31 #-Q- lxiv8 ###################### … … 205 205 rm -f ${RUN_DIR}/new_liste_restart_files.txt 206 206 rm -f ${RUN_DIR}/liste_pack_*.txt 207 rm -f ${RUN_DIR}/liste_pack_light_*.txt 207 208 208 209 # Create sorted restart list to work with … … 251 252 [ ${date_file} -eq ${date_end_pack} ] || echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt 252 253 fi 254 # light pack list of restarts files that will be used 255 if [ X${config_Post_LightRestartPack} = XTRUE ] ; then 256 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${PeriodDateBegin} ] ; then 257 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_light_${date_begin_pack}_${date_end_pack}.txt 258 fi 259 fi 253 260 done 254 261 255 262 # Create tar files 256 263 IGCM_debug_Print 1 "Tar ongoing" 257 tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt 264 if [ X${config_Post_LightRestartPack} = XTRUE ] ; then 265 tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt 266 else 267 tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_light_${date_begin_pack}_${date_end_pack}.tx 268 fi 258 269 # Save it 259 270 IGCM_sys_Put_Out ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar ${STORE_RESTART} -
tags/libIGCM_v3.0_beta1/AA_purge_simulation
r1373 r1399 28 28 Verbosity=3 29 29 30 #D- Low level debug : to bypass lib test checks and stack construction30 #D- Low level debug : to perform lib test checks, stack construction and IO functions instrumentation 31 31 #D- Default=true 32 DEBUG_debug=false 32 DEBUG_debug=true 33 34 #D- Messaging : all activities and call stacks will be sent to ipsl servers 35 #D- If true will imply DEBUG_debug=true 36 #D- Default=false 37 #D- 38 BigBrother=true 39 33 40 34 41 #D--------------------------------------------------------------------== … … 55 62 ( ${DEBUG_debug} ) && IGCM_card_Check 56 63 ( ${DEBUG_debug} ) && IGCM_date_Check 64 65 if [ ! -f ${SUBMIT_DIR}/config.card ] ; then 66 echo "A config.card is needed to proceed" 67 exit 68 fi 57 69 58 70 #================================== … … 82 94 IGCM_debug_Print 2 -e "\033[1;31m ${dir}\033[m" 83 95 done 96 IGCM_debug_Print 2 -e "\033[1;31m ${SUBMIT_DIR}/run.card\033[m" 97 IGCM_debug_Print 2 -e "\033[1;31m ${SUBMIT_DIR}/Debug\033[m" 98 IGCM_debug_Print 2 -e "\033[1;31m ${SUBMIT_DIR}/Script_Output_*.??????\033[m" 84 99 85 echo -e "\033[1;32mDo you REALLY want to erase all those directories ?"100 echo -e "\033[1;32mDo you REALLY want to erase all those directories and files?" 86 101 echo -n -e " Your answer (y/n) : \033[m" 87 102 read reponse -
tags/libIGCM_v3.0_beta1/ins_job
r1371 r1399 218 218 fi # if ( ! ${x_pm} ) 219 219 echo MPIEnvironment is ${MPIEnvironment} 220 else 221 echo No option for Header regarding ProjectID, ProjectNode, ProjectCore or MPIEnvironment because we are not on curie or ada 220 elif [ X"${SYSTEM}" == "Xlxiv8" ] || [ X"${SYSTEM}" == "Xifort_CICLAD" ] ; then 221 # obelix, ciclad, climserv 222 echo "" 223 echo "You need to check and maybe adapt headers in the main job especially the line: " 224 echo " #PBS -l nodes=x:ppn=y " 225 echo "where x is the number of nodes, y the number of cores per node and x*y is the total number of cores for the job. " 226 echo "y must not be bigger than the maximum numer of cores per node on the machine (often 8 or 16)." 222 227 fi # if [ X"${SYSTEM}" == "Xcurie" ] 223 228 -
tags/libIGCM_v3.0_beta1/libIGCM_comp/libIGCM_comp.ksh
r1375 r1399 778 778 if [ X${OCE_PROC_MPI} != X ] ; then 779 779 if [ ${OCE_PROC_MPI} -ne ${nb_restart_file} ] ; then 780 IGCM_sys_rebuild ${generic_restart_file_name_out}.${extension_out} ${generic_restart_file_name_out}_????.${extension_out}780 IGCM_sys_rebuild_nemo ${generic_restart_file_name_out} ${nb_restart_file} ${extension_out} ${generic_restart_file_name_out}_????.${extension_out} 781 781 IGCM_sys_Rm ${generic_restart_file_name_out}_????.${extension_out} 782 782 fi … … 1326 1326 fi 1327 1327 1328 # Test if keyid is set in filein , otherwise exit1328 # Test if keyid is set in filein. If not exit for case all cases(blocker, force) except nonblocker. 1329 1329 if [ $( grep -w ${keyid} ${filein} | wc -l ) = 0 ] ; then 1330 # Variable key is not set in filein, stop. 1331 IGCM_debug_Exit "IGCM_comp_modifyXmlFile : ${keyid} is not set in the file. Bad syntax of ${filein} file." 1332 IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 1333 return 1330 if [ ${type} = nonblocker ] ; then 1331 # This is a nonblocker case, print warning but do nothing else 1332 IGCM_debug_Print 1 "IGCM_comp_modifyXmlFile: ${keyid} is not set in ${filein}. This is a nonblocker call so nothing is done." 1333 else 1334 # This is a blocker or force case : stop now 1335 IGCM_debug_Exit "IGCM_comp_modifyXmlFile : ${keyid} is not set in the file. Bad syntax of ${filein} file." 1336 IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 1337 return 1338 fi 1334 1339 fi 1335 1340 1336 1341 # Check if AUTO is set on the same line as keyid and keyattrib 1337 1342 if [ $( grep -w ${keyid} ${filein} | grep AUTO | wc -l ) = 1 ] ; then 1338 # Modifi fication will be done1343 # Modification will be done 1339 1344 modify=yes 1340 1345 else … … 1715 1720 if [ X${AsynchronousRebuild} = Xfalse ] ; then 1716 1721 IGCM_debug_Print 2 "Rebuilding ${file_in} online" 1717 IGCM_sys_rebuild ${file_in} ${generic_file_name}_[0-9]*.nc 1722 # 1723 # for output.abort file, let use rebuild_NEMO : 13s instead of 20 mn. 1724 if [ ${file_in} = output.abort.nc ] ; then 1725 IGCM_sys_rebuild_nemo ${generic_file_name} ${nb_rebuild_file} "nc" ${generic_file_name}_[0-9]*.nc 1726 else 1727 IGCM_sys_rebuild ${file_in} ${generic_file_name}_[0-9]*.nc 1728 fi 1718 1729 else 1719 1730 IGCM_debug_Print 2 "Preparing offline rebuild for ${file_in}" -
tags/libIGCM_v3.0_beta1/libIGCM_config/libIGCM_config.ksh
r1375 r1399 169 169 if ( [ X${config_Post_IgnoreNonMonotonic} = X${NULL_STR} ] || [ X${config_Post_IgnoreNonMonotonic} = X ] ) ; then 170 170 config_Post_IgnoreNonMonotonic=FALSE 171 fi 172 173 #==================================================== 174 # LightRestartPack : apply default value if not defined 175 if ( [ X${config_Post_LightRestartPack} = X${NULL_STR} ] || [ X${config_Post_LightRestartPack} = X ] ) ; then 176 config_Post_LightRestartPack=FALSE 171 177 fi 172 178 … … 830 836 ( IGCM_sys_TestFileBuffer ${R_BUF_KSH}/${Potential} ) || IGCM_sys_Cp ${Potential} ${R_BUF_KSH}/${Potential}.$$ 831 837 else 832 ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${Potential} ) || IGCM_sys_ Cp ${Potential} ${R_OUT_KSH}/${Potential}.$$838 ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${Potential} ) || IGCM_sys_Put_Out ${Potential} ${R_OUT_KSH}/${Potential}.$$ NOCHMOD 833 839 fi 834 840 done … … 836 842 IGCM_debug_Print 2 "Save current run.card" 837 843 IGCM_card_CheckConflict run.card 844 838 845 if [ X${Pack} = Xtrue ] ; then 839 846 IGCM_sys_Cp ${SUBMIT_DIR}/run.card ${R_BUF_KSH}/run.card 840 847 else 841 IGCM_sys_ Cp ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/run.card848 IGCM_sys_Put_Out ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/run.card NOCHMOD 842 849 fi 843 850 # -
tags/libIGCM_v3.0_beta1/libIGCM_debug/libIGCM_debug.ksh
r1367 r1399 147 147 b64_encoded_msg=$1 148 148 149 mail_recipient="superviseur@ ipsl.jussieu.fr"149 mail_recipient="superviseur@mail.ipsl.upmc.fr" 150 150 send_messages=0 151 151 mail_frequency=3600 # in seconds -
tags/libIGCM_v3.0_beta1/libIGCM_ensemble/libIGCM_ensemble.ksh
r1361 r1399 954 954 ${PerturbExe} ${RUN_DIR}/${FileOut}.nc ${PerturbVar} ${PerturbAmp} > /dev/null 2>&1 955 955 if [ $? -ne 0 ] ; then 956 IGCM_debug_Exit " Abend$( basename ${PerturbExe} )"956 IGCM_debug_Exit "Error with $( basename ${PerturbExe} )" 957 957 IGCM_debug_Verif_Exit 958 958 fi … … 981 981 ${PerturbExe} ${RUN_DIR}/${FileOut}.nc ${PerturbVar} ${PatternFile} ${MaskFile} > /dev/null 2>&1 982 982 if [ $? -ne 0 ] ; then 983 IGCM_debug_Exit " Abend$( basename ${PerturbExe} )"983 IGCM_debug_Exit "Error with $( basename ${PerturbExe} )" 984 984 IGCM_debug_Verif_Exit 985 985 fi -
tags/libIGCM_v3.0_beta1/libIGCM_post/libIGCM_post.ksh
r1375 r1399 264 264 export POST_DIR=${POST_DIR} 265 265 export MASTER=${MASTER} 266 export PeriodDateBegin=${PeriodDateBegin} 266 267 export DateBegin=${PackDateBegin} 267 268 export DateEnd=${PeriodDateEnd} -
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.