Changeset 475
- Timestamp:
- 05/31/11 15:12:20 (13 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_TimeSeries_Checker
r436 r475 177 177 IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars 178 178 IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches 179 if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then179 if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then 180 180 # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob. 181 181 unset ListDimension -
trunk/libIGCM/AA_job
r473 r475 166 166 #D- Increased verbosity (1, 2, 3) 167 167 Verbosity=3 168 #D- Experience type : DEB(ug), DEV(elopment), RUN (default) 169 JobType=RUN 168 170 #D- Number of execution in one job 169 171 PeriodNb=1 … … 171 173 172 174 #D- 173 # -------------------------------------------------------------------- 174 #D- ! Optionnal features /!\ Use with care ! 175 # -------------------------------------------------------------------- 175 # --------------------------------------------------------------------------------------------------# 176 #D- ! Optionnal features /!\ Use with care ! # 177 # --------------------------------------------------------------------------------------------------# 178 176 179 177 180 #D- Low level debug : to bypass lib test checks and stack construction … … 183 186 #DEBUG_sys=false 184 187 185 #D- Experience type : DEB(ug), DEV(elopment), RUN (default)186 JobType=RUN187 188 188 #D- Define running directory 189 189 #D- Default=${TMPDIR} ie temporary batch directory … … 198 198 #BIG_DIR=/somewhere/with/lot/of/space/scratchdir/may/be 199 199 200 #D- Define input file root directory 201 #D- Default=/IGCMG/common/account/of/this/machine 202 #R_IN=/u/rech/por/rpor111/DATA 203 200 204 #D- Turn in dry run mode ? (0,1,2,3) 201 205 #D- Default=0 202 206 #DRYRUN=3 203 # YOU MUST COMPILE YOUR EXE FILES FORDRYRUN MODE !207 # YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE ! 204 208 # ------------------------------------------------------------------------------------- 205 209 # | DRYRUN= | Date computations, | sys_Get | Exe | sys_Put_Out; sys_Put_Rest | … … 216 220 # ------------------------------------------------------------------------------------- 217 221 218 #D- Define input file root directory 219 #D- Default=/IGCMG/common/account/of/this/machine 220 #R_IN=/u/rech/por/rpor111/DATA 222 #D- 223 # --------------------------------------------------------------------------------------------------# 224 #D- ! End of optionnal features /!\ Do not modify anything below unless you know what you are doing # 225 # --------------------------------------------------------------------------------------------------# 221 226 222 227 #D- -
trunk/libIGCM/libIGCM_card/IGCM_card_PrintOption.awk
r425 r475 124 124 125 125 if (section_found == 0) { 126 print "Error: Section not found" , section, option126 print "Error: Section not found" 127 127 } else if (option_found == 0) { 128 print "Error: Option not found" , section, option128 print "Error: Option not found" 129 129 } else { 130 130 print option_value -
trunk/libIGCM/libIGCM_card/IGCM_card_PrintSection.awk
r373 r475 109 109 print "Error: Section not found" 110 110 } else if (match(option_list,"null")) { 111 print "Error: Option snot found"111 print "Error: Option not found" 112 112 } else { 113 113 print option_list -
trunk/libIGCM/libIGCM_card/IGCM_card_WriteOption.awk
r373 r475 106 106 107 107 if (section_found == 0) { 108 print "Error: Section not found" , section, option108 print "Error: Section not found" 109 109 } else if (option_found == 0) { 110 print "Error: Option not found" , section, option110 print "Error: Option not found" 111 111 } 112 112 -
trunk/libIGCM/libIGCM_card/libIGCM_card.ksh
r472 r475 52 52 #D-* Purpose: Print an option from a given file.card and section 53 53 #D-* Usage: IGCM_card_PrintOption file.card section option 54 #D-* Only used by IGCM_card_Test.ksh 54 55 #D- 55 56 function IGCM_card_PrintOption 56 57 { 57 58 IGCM_debug_PushStack "IGCM_card_PrintOption" $@ 58 if [ -r "$1" ]; then59 if ( [ -r "$1" ] && [ -f "$1" ] ) ; then 59 60 gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk "$@" 60 61 else 61 echo "--Error--> IGCM_card_PrintOption $@" 62 echo " $1 is not readable" 62 echo 63 IGCM_debug_Print 1 "--Error--> IGCM_card_PrintOption $@" 64 IGCM_debug_Print 1 " $1 is not readable" 63 65 IGCM_debug_Exit "IGCM_card_PrintOption" 64 66 fi … … 70 72 #D-* Purpose: Print all options from a given file.card and section 71 73 #D-* Usage: IGCM_card_PrintSection file.card section 74 #D-* Only used by IGCM_card_Test.ksh 72 75 #D- 73 76 function IGCM_card_PrintSection 74 77 { 75 78 IGCM_debug_PushStack "IGCM_card_PrintSection" $@ 76 if [ -r "$1" ]; then79 if ( [ -r "$1" ] && [ -f "$1" ] ) ; then 77 80 gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintSection.awk -- "$@" 78 81 else 79 echo"--Error--> IGCM_card_PrintSection $@"80 echo" $1 is not readable"82 IGCM_debug_Print 1 "--Error--> IGCM_card_PrintSection $@" 83 IGCM_debug_Print 1 " $1 is not readable" 81 84 IGCM_debug_Exit "IGCM_card_PrintSection" 82 85 fi … … 93 96 { 94 97 IGCM_debug_PushStack "IGCM_card_DefineVariableFromOption" $@ 95 if [ -r "$1" ]; then98 if ( [ -r "$1" ] && [ -f "$1" ] ) ; then 96 99 # Get basename of card file ($1) 97 100 typeset name1=${1##*/} … … 100 103 typeset value=$( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" ) 101 104 102 if [ "${value}" = "Error: Option not found" ] ; then 103 echo "Error with readding of ${name} variable in ${1} ." 104 echo "Error: Option not found." 105 # Only if a section is missing we exit the job. 106 # We must allow missing option to keep backward compatibilty. 107 if [ "${value}" = "Error: Section not found" ] ; then 108 echo 109 IGCM_debug_Print 1 "Error with readding of ${name} variable in ${1}." 110 IGCM_debug_Print 1 "Error: Section ${2} not found" 105 111 IGCM_debug_Exit 106 112 IGCM_debug_Verif_Exit … … 108 114 eval ${name}=${value} 109 115 else 110 echo "--Error--> IGCM_card_DefineVariableFromOption $@" 111 echo " $1 is not readable" 116 echo 117 IGCM_debug_Print 1 "--Error--> IGCM_card_DefineVariableFromOption" 118 IGCM_debug_Print 1 "--Error--> $1 is not readable" 112 119 IGCM_debug_Exit "IGCM_card_DefineVariableFromOption" 120 IGCM_debug_Verif_Exit 113 121 fi 114 122 IGCM_debug_PopStack "IGCM_card_DefineVariableFromOption" … … 124 132 { 125 133 IGCM_debug_PushStack "IGCM_card_DefineArrayFromOption" $@ 126 if [ -r "$1" ]; then134 if ( [ -r "$1" ] && [ -f "$1" ] ) ; then 127 135 # Get basename of card file ($1) 128 136 typeset name1=${1##*/} … … 133 141 set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" | gawk -- 'BEGIN {FS="[() ,]+"} {for (i=2; i <= NF-1; i++) printf("%s ",$i)}' ) 134 142 else 135 echo "--Error--> IGCM_card_DefineArrayFromOption $@" 136 echo " $1 is not readable" 143 echo 144 IGCM_debug_Print 1 "--Error--> IGCM_card_DefineArrayFromOption $@" 145 IGCM_debug_Print 1 " $1 is not readable" 137 146 IGCM_debug_Exit "IGCM_card_DefineArrayFromOption" 138 147 fi … … 149 158 { 150 159 IGCM_debug_PushStack "IGCM_card_DefineArrayFromSection" $@ 151 if [ -r "$1" ]; then160 if ( [ -r "$1" ] && [ -f "$1" ] ) ; then 152 161 # Get basename of card file ($1) 153 162 typeset name1=${1##*/} … … 157 166 eval ${name}[0]=${NULL_STR} 158 167 set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintSection.awk -- "$@" ) 159 else 160 echo "--Error--> IGCM_card_DefineArrayFromSection $@" 161 echo " $1 is not readable" 168 if [ "$( eval echo \${${name}[@]} )" = "Error: Section not found" ] ; then 169 echo 170 IGCM_debug_Print 1 "Error with readding of ${name} variable in ${1}." 171 IGCM_debug_Print 1 "Error: Section ${2} not found" 172 IGCM_debug_Exit 173 IGCM_debug_Verif_Exit 174 fi 175 else 176 IGCM_debug_Print 1 "--Error--> IGCM_card_DefineArrayFromSection $@" 177 IGCM_debug_Print 1 " $1 is not readable" 162 178 IGCM_debug_Exit "IGCM_card_DefineArrayFromSection" 163 179 fi … … 178 194 { 179 195 IGCM_debug_PushStack "IGCM_card_WriteOption" $@ 180 if [ -r "$1" ] && [ -w "$1" ]; then196 if ( [ -r "$1" ] && [ -w "$1" ] && [ -f "$1" ] ) ; then 181 197 typeset tmpfile=tmpfile_$$ 182 198 ( IGCM_card_PrintOption "$1" "$2" "$3" | grep "not found" ) > ${tmpfile} … … 185 201 echo "!!! Problem with IGCM_card_WriteOption !!!" 186 202 echo "Try to write : " $@ 187 echo "You have to correct esome script."203 echo "You have to correct some script." 188 204 echo "We won't do anything else !" 189 205 exit 1 190 206 fi 191 rm ${tmpfile}207 \rm ${tmpfile} 192 208 193 209 # The tmpfile uses now the real path of the card to be modified, … … 204 220 205 221 else 206 echo "--Error--> IGCM_card_WriteOption $@" 207 echo " $1 is not readable or not writable" 222 echo 223 IGCM_debug_Print 1 "--Error--> IGCM_card_WriteOption $@" 224 IGCM_debug_Print 1 " $1 is not readable or not writable" 208 225 IGCM_debug_Exit "IGCM_card_WriteOption" 209 226 fi … … 249 266 IGCM_debug_PushStack "IGCM_card_WriteArrayOption" $@ 250 267 251 if [ -r "$1" ] && [ -w "$1" ]; then268 if ( [ -r "$1" ] && [ -w "$1" ] && [ -f "$1" ] ) ; then 252 269 typeset tmpfile=tmpfile_$$ 253 270 if [ X"${4}" != X"" ]; then … … 258 275 fi 259 276 else 260 echo "--Error--> IGCM_card_WriteArrayOption $@" 261 echo " $1 is not readable or not writable" 277 echo 278 IGCM_debug_Print 1 "--Error--> IGCM_card_WriteArrayOption $@" 279 IGCM_debug_Print 1 " $1 is not readable or not writable" 262 280 IGCM_debug_Exit "IGCM_card_WriteArrayOption" 263 281 fi … … 294 312 if diff IGCM_card_Test.ref.failed ${libIGCM}/libIGCM_card/IGCM_card_Test.ref > /dev/null 2>&1 ; then 295 313 echo "Check libIGCM_card ...............................................[ OK ]" 296 rm -fIGCM_card_Test.ref.failed314 IGCM_sys_Rm IGCM_card_Test.ref.failed 297 315 else 298 316 echo "Check libIGCM_card ...........................................[ FAILED ]" -
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r465 r475 142 142 IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars 143 143 IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches 144 if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then144 if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then 145 145 # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob. 146 146 ListDimension[0]=2D
Note: See TracChangeset
for help on using the changeset viewer.