Changeset 1101
- Timestamp:
- Feb 17, 2013 10:20:21 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r1100 r1101 1 #!/bin/ ksh1 #!/bin/bash 2 2 3 3 # mrun - script for running PALM jobs … … 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # script now running under bash instead of ksh, which required small adjustments 25 # (output formatting with printf instead "typeset -L/-R", print replaced by echo, 26 # read from stdin), 27 # cross comilername on lckyuh compute nodes replaced by real compiler name 25 28 # 26 29 # Former revisions: … … 177 180 usern=$LOGNAME 178 181 use_openmp=false 182 version="MRUN 2.0 Rev$Rev$" 179 183 working_directory=`pwd` 180 184 TOPT="" … … 183 187 184 188 typeset -i iec=0 iic=0 iin=0 ioc=0 iout=0 memory=0 stagein_anz=0 stageout_anz=0 185 typeset -i cputime i ii iia iii iio icycle inode ival jobges jobsek maxcycle minuten nodes pes sekunden tp1 186 187 typeset -R30 calltime 188 typeset -L20 spalte1 189 typeset -L40 spalte2 190 typeset -L60 spalte3 191 typeset -L35 string1=`date` 192 typeset -L12 string2=$usern 193 typeset -L12 string3=$localhost_realname 194 typeset -L12 string4 195 typeset -L12 string5 196 typeset -L30 version="MRUN 2.0 Rev$Rev$" 189 typeset -i cputime i ii iia iii iio icycle inode ival jobges jobsek last_char maxcycle minuten nodes pes sekunden tp1 190 197 191 198 192 … … 225 219 # 226 220 # # EINTRAG IN DIE STATISTIK-DATEI 227 # string4=$host 228 # string5=$locat 221 # string1=`date` #-L35 222 # string2=$usern #-L12 223 # string3=$localhost_realname #-L12 224 # string4=$host #-L12 225 # string5=$locat #-L12 229 226 # if [[ "$job_on_file" = "" && $locat != control_c && $locat != user_abort ]] 230 227 # then … … 251 248 eval ${err_command[$i]} 252 249 done 253 if [[ -n $interpreted_config_file ]] then 250 if [[ -n $interpreted_config_file ]] 251 then 254 252 rm -rf $interpreted_config_file 255 253 fi 256 if [[ -n .mrun_environment ]] then 254 if [[ -n .mrun_environment ]] 255 then 257 256 rm -rf .mrun_environment 258 257 fi … … 366 365 # EVTL. POSITIONSPARAMETER EINLESEN 367 366 # ZUR ZEIT GIBT ES NUR DEN PARAMETER ? (=KURZINFO) 368 shift OPTIND-1369 367 (( to_shift = $OPTIND - 1 )) 368 shift $to_shift 370 369 371 370 # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN … … 1199 1198 while read zeile 1200 1199 do 1201 cycle=$( print$zeile | cut -f2 -d".")1200 cycle=$(echo $zeile | cut -f2 -d".") 1202 1201 if [[ "$cycle" = "$zeile" ]] 1203 1202 then … … 1323 1322 while read zeile 1324 1323 do 1325 cycle=$( print$zeile | cut -f2 -d".")1324 cycle=$(echo $zeile | cut -f2 -d".") 1326 1325 if [[ "$cycle" = "$zeile" || "$cycle" = ${extout[$i]} ]] 1327 1326 then … … 2000 1999 printf "\n" 2001 2000 # [[ $silent = false ]] && clear 2002 printf "#-------------------------------------------------------------- # \n"2003 printf "| $version$calltime | \n"2004 printf "| | \n"2001 printf "#------------------------------------------------------------------------# \n" 2002 printf "| %-35s%35s | \n" "$version" "$calltime" 2003 printf "| | \n" 2005 2004 spalte1="called on:"; spalte2=$localhost_realname 2006 printf "| $spalte1$spalte2 | \n"2005 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2007 2006 if [[ $local_compile = false ]] 2008 2007 then … … 2016 2015 spalte1="compiling test only!"; spalte2="" 2017 2016 fi 2018 printf "| $spalte1$spalte2 | \n"2017 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2019 2018 if [[ -n $numprocs ]] 2020 2019 then 2021 2020 spalte1="number of PEs:"; spalte2=$numprocs 2022 printf "| $spalte1$spalte2 | \n"2021 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2023 2022 fi 2024 2023 if [[ -n $tasks_per_node ]] 2025 2024 then 2026 2025 spalte1="tasks per node:"; spalte2="$tasks_per_node (number of nodes: $nodes)" 2027 printf "| $spalte1$spalte2 | \n"2026 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2028 2027 fi 2029 2028 if [[ $maximum_parallel_io_streams != $numprocs ]] 2030 2029 then 2031 2030 spalte1="max par io streams:"; spalte2="$maximum_parallel_io_streams" 2032 printf "| $spalte1$spalte2 | \n"2031 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2033 2032 fi 2034 2033 if [[ $use_openmp = true ]] 2035 2034 then 2036 2035 spalte1="threads per task:"; spalte2="$threads_per_task" 2037 printf "| $spalte1$spalte2 | \n"2038 fi 2039 printf "| | \n"2036 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2037 fi 2038 printf "| | \n" 2040 2039 if [[ $do_compile = true ]] 2041 2040 then 2042 2041 if [[ "$mopts" != "" ]] 2043 2042 then 2044 spalte1="make options:"; spalte2=$ mopts2045 printf "| $spalte1$spalte2 | \n"2046 zeile=$(echo "$mopts" | cut -c4 1-)2043 spalte1="make options:"; spalte2=$(echo "$mopts" | cut -c-45) 2044 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2045 zeile=$(echo "$mopts" | cut -c46-) 2047 2046 while [[ "$zeile" != "" ]] 2048 2047 do 2049 2048 spalte1="" 2050 spalte2=$ zeile2051 printf "| $spalte1$spalte2 | \n"2052 zeile=$(echo "$zeile" | cut -c4 1-)2049 spalte2=$(echo "$zeile" | cut -c-45) 2050 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2051 zeile=$(echo "$zeile" | cut -c46-) 2053 2052 done 2054 2053 fi 2055 2054 2056 spalte1="cpp directives:"; spalte2=$ cpp_options2057 printf "| $spalte1$spalte2 | \n"2058 zeile=$(echo "$cpp_options" | cut -c4 1-)2055 spalte1="cpp directives:"; spalte2=$(echo "$cpp_options" | cut -c-45) 2056 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2057 zeile=$(echo "$cpp_options" | cut -c46-) 2059 2058 while [[ "$zeile" != "" ]] 2060 2059 do 2061 2060 spalte1="" 2062 spalte2=$ zeile2063 printf "| $spalte1$spalte2 | \n"2064 zeile=$(echo "$zeile" | cut -c4 1-)2061 spalte2=$(echo "$zeile" | cut -c-45) 2062 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2063 zeile=$(echo "$zeile" | cut -c46-) 2065 2064 done 2066 2065 2067 spalte1="compiler options:"; spalte2= "$fopts"2068 printf "| $spalte1$spalte2 | \n"2069 zeile=$(echo "$fopts" | cut -c4 1-)2066 spalte1="compiler options:"; spalte2=$(echo "$fopts" | cut -c-45) 2067 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2068 zeile=$(echo "$fopts" | cut -c46-) 2070 2069 while [[ "$zeile" != "" ]] 2071 2070 do 2072 2071 spalte1="" 2073 spalte2=$ zeile2074 printf "| $spalte1$spalte2 | \n"2075 zeile=$(echo "$zeile" | cut -c4 1-)2072 spalte2=$(echo "$zeile" | cut -c-45) 2073 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2074 zeile=$(echo "$zeile" | cut -c46-) 2076 2075 done 2077 2076 2078 spalte1="linker options:"; spalte2=$ lopts2079 printf "| $spalte1$spalte2 | \n"2080 zeile=$(echo "$lopts" | cut -c4 1-)2077 spalte1="linker options:"; spalte2=$(echo "$lopts" | cut -c-45) 2078 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2079 zeile=$(echo "$lopts" | cut -c46-) 2081 2080 while [[ "$zeile" != "" ]] 2082 2081 do 2083 2082 spalte1="" 2084 spalte2=$ zeile2085 printf "| $spalte1$spalte2 | \n"2086 zeile=$(echo "$zeile" | cut -c4 1-)2083 spalte2=$(echo "$zeile" | cut -c-45) 2084 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2085 zeile=$(echo "$zeile" | cut -c46-) 2087 2086 done 2088 2087 2089 spalte1="modules to be load:"; spalte2=$ modules2090 printf "| $spalte1$spalte2 | \n"2091 zeile=$(echo "$modules" | cut -c4 1-)2088 spalte1="modules to be load:"; spalte2=$(echo "$modules" | cut -c-45) 2089 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2090 zeile=$(echo "$modules" | cut -c46-) 2092 2091 while [[ "$zeile" != "" ]] 2093 2092 do 2094 2093 spalte1="" 2095 spalte2=$ zeile2096 printf "| $spalte1$spalte2 | \n"2097 zeile=$(echo "$zeile" | cut -c4 1-)2094 spalte2=$(echo "$zeile" | cut -c-45) 2095 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2096 zeile=$(echo "$zeile" | cut -c46-) 2098 2097 done 2099 2098 2100 spalte1="main program ":; spalte2=$mainprog2101 printf "| $spalte1$spalte2 | \n"2099 spalte1="main program:"; spalte2=$mainprog 2100 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2102 2101 else 2103 2102 spalte1=executable:; spalte2=$executable 2104 printf "| $spalte1$spalte2 | \n"2105 fi 2106 printf "| | \n"2107 spalte1="base name of files ":; spalte2=$fname2108 printf "| $spalte1$spalte2 | \n"2103 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2104 fi 2105 printf "| | \n" 2106 spalte1="base name of files:"; spalte2=$fname 2107 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2109 2108 if [[ $fname != $afname ]] 2110 2109 then 2111 spalte1="base name of input files ":; spalte2=$afname2112 printf "| $spalte1$spalte2 | \n"2113 fi 2114 spalte1="INPUT control list ":; spalte2=$input_list2115 printf "| $spalte1$spalte2 | \n"2116 spalte1="OUTPUT control list ":; spalte2=$output_list2117 printf "| $spalte1$spalte2 | \n"2110 spalte1="base name of input files:"; spalte2=$afname 2111 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2112 fi 2113 spalte1="INPUT control list:"; spalte2=$(echo $input_list) 2114 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2115 spalte1="OUTPUT control list:"; spalte2=$(echo $output_list) 2116 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2118 2117 2119 2118 if [[ $do_batch = true || "$LOADLBATCH" = yes ]] 2120 2119 then 2121 2120 spalte1="memory demand / PE":; spalte2="$memory MB" 2122 printf "| $spalte1$spalte2 | \n"2121 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2123 2122 spalte1=CPU-time:; spalte2="$minuten:$sekunden" 2124 printf "| $spalte1$spalte2 | \n"2123 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2" 2125 2124 fi 2126 2125 2127 2126 if [[ $do_compile = true ]] 2128 2127 then 2129 printf "| | \n"2130 printf "| Files to be compiled: | \n"2128 printf "| | \n" 2129 printf "| Files to be compiled: | \n" 2131 2130 zeile=$source_list 2132 2131 while [[ "$zeile" != "" ]] 2133 2132 do 2134 spalte3=$zeile2135 printf "| $spalte3 | \n"2136 zeile=$(echo "$zeile" | cut -c 61-)2133 linestart=$(echo $zeile | cut -c-70) 2134 printf "| %-70s | \n" "$linestart" 2135 zeile=$(echo "$zeile" | cut -c71-) 2137 2136 done 2138 2137 fi 2139 printf "#-------------------------------------------------------------- #"2138 printf "#------------------------------------------------------------------------#" 2140 2139 2141 2140 … … 2192 2191 antwort=dummy 2193 2192 printf "\n\n" 2194 while [[ "$antwort" != y && "$antwort" != Y && "$antwort" != n && "$antwort" != N ]] 2193 printf " >>> everything o.k. (y/n) ? " 2194 while read antwort 2195 2195 do 2196 printf " >>> everything o.k. (y/n) ? " 2197 read antwort 2196 if [[ "$antwort" != y && "$antwort" != Y && "$antwort" != n && "$antwort" != N ]] 2197 then 2198 printf " >>> everything o.k. (y/n) ? " 2199 else 2200 break 2201 fi 2198 2202 done 2199 2203 if [[ $antwort = n || $antwort = N ]] … … 2214 2218 fi 2215 2219 2216 #### PERFORM PARAMETER FILE CHECK (COUPLED RUNS ARE NOT SUPPORTED YET) 2217 2218 #DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES2220 2221 # PERFORM PARAMETER FILE CHECK (COUPLED RUNS ARE NOT SUPPORTED YET) 2222 # DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES 2219 2223 check_depository="${working_directory}/trunk/UTIL" 2220 2224 check_sources="${working_directory}/tmp_check_namelist_files" 2221 2225 skip_check=false 2222 2226 2223 #CHECK IF NAMELIST_FILE_CHECK HAS BEEN COMPILED SUCCESSFULLY2227 # CHECK IF NAMELIST_FILE_CHECK HAS BEEN COMPILED SUCCESSFULLY 2224 2228 if [[ ! -f $check_depository/check_namelist_files.tar ]] 2225 2229 then 2226 2227 2230 skip_check=true 2231 reason="run on remote host or parameter file check has not been compiled." 2228 2232 fi 2229 2233 if [[ ! -f $PALM_BIN/check_namelist_files.x ]] 2230 2234 then 2231 2232 2233 fi 2234 2235 #CHECK FOR PARALLEL RUN; OTHERWISE SKIP CHECK2235 skip_check=true 2236 reason="parameter file check has not been compiled." 2237 fi 2238 2239 # CHECK FOR PARALLEL RUN; OTHERWISE SKIP CHECK 2236 2240 if [[ "$cond1" != "parallel" && "$cond2" != "parallel" ]] 2237 2241 then 2238 skip_check=true 2239 reason="serial run." 2240 fi 2241 2242 #ONLY PERFORM CHECK IF -z OPTION IS NOT SET, NO RESTART RUN IS CARRIED OUT AND IF THE EXECUTION HOST IS THE LOCAL HOST 2243 # ATTENTION: THIS ROUTINE DOES NOT WORK IF THE COMPILER ON THE LOCAL HOST DIFFERS FROM THE COMPILER ON THE REMOTE HOST 2242 skip_check=true 2243 reason="serial run." 2244 fi 2245 2246 # ONLY PERFORM CHECK IF -z OPTION IS NOT SET, NO RESTART RUN IS CARRIED OUT 2247 # AND IF THE EXECUTION HOST IS THE LOCAL HOST 2248 # ATTENTION: THIS ROUTINE DOES NOT WORK IF THE COMPILER ON THE LOCAL HOST 2249 # DIFFERS FROM THE COMPILER ON THE REMOTE HOST 2244 2250 if [[ $check_namelist_files == false ]] 2245 2251 then 2246 2247 2252 skip_check=true 2253 reason="-z option set." 2248 2254 fi 2249 2255 2250 2256 if [[ $fromhost != $localhost ]] 2251 2257 then 2252 2253 2258 skip_check=true 2259 reason="submitting host is local host." 2254 2260 fi 2255 2261 … … 2264 2270 skip_check=true 2265 2271 reason="restart run." 2266 2267 fi 2268 2269 #SKIP CHECK IN CASE OF RESTART RUN: CHECK WHETHER THE LAST CHAR IS "f" IN PARIN 2270 ((last_char = `echo $filename_input | wc -c` - 1)) 2271 last_char=`echo $filename_input |cut -c$last_char` 2272 fi 2273 2274 # SKIP CHECK IN CASE OF RESTART RUN: CHECK WHETHER THE LAST CHAR IS "f" IN PARIN 2275 (( last_char = `echo $filename_input | wc -c` - 1 )) 2276 last_char=`echo $filename_input | cut -c $last_char` 2272 2277 if [[ "$last_char" == "f" ]] 2273 2278 then … … 2278 2283 if [[ $skip_check == false ]] 2279 2284 then 2280 2281 2285 tmp_check=${working_directory}/tmp_check 2282 2286 2283 #GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS2284 #NOT NECESSARILY REQUIRED2287 # GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS 2288 # NOT NECESSARILY REQUIRED 2285 2289 line="" 2286 2290 found=false … … 2303 2307 rm -rf ${working_directory}/tmp_check 2304 2308 2305 #CHECK IF THE A P3DF FILE MUST BE CHECKED2309 # CHECK IF THE A P3DF FILE MUST BE CHECKED 2306 2310 for item in $input_list 2307 2311 do … … 2314 2318 done 2315 2319 2316 #ERROR IF NO PARAMETER FILE WAS FOUND, OTHERWISE PROCEED2317 if [[ (! -f $filename_input) && ( "$filename_input" != "" ) ]]2320 # ERROR IF NO PARAMETER FILE WAS FOUND, OTHERWISE PROCEED 2321 if [[ (! -f $filename_input) && ( "$filename_input" != "" ) ]] 2318 2322 then 2319 2323 printf "\n\n +++ ERROR: parameter file ($filename_input) not found." … … 2321 2325 fi 2322 2326 2323 #CHECK IF THE RESTART PARAMETER FILE EXISTS (IF NECESSARY)2327 # CHECK IF THE RESTART PARAMETER FILE EXISTS (IF NECESSARY) 2324 2328 if [[ $check_restart == 1 ]] 2325 2329 then 2326 2327 2328 2330 2329 2331 filenamef="${filename_input}f" … … 2353 2355 fi 2354 2356 2355 #CREATE TEMPORARY SOURCES_FOR_CHECK PATH2357 # CREATE TEMPORARY SOURCES_FOR_CHECK PATH 2356 2358 mkdir $check_sources 2357 2359 cd $check_sources 2358 2360 2359 2361 2360 #CHECK FOR USER CODE, OTHERWISE USE THE PRECOMPILED CHECK_NAMELIST_FILES.X2362 # CHECK FOR USER CODE, OTHERWISE USE THE PRECOMPILED CHECK_NAMELIST_FILES.X 2361 2363 if [[ -d $add_source_path ]] 2362 2364 then … … 2371 2373 touch check_namelist_files.f90 2372 2374 2373 #GET COMPILER OPTIONS AND PERFORM MAKE2375 # GET COMPILER OPTIONS AND PERFORM MAKE 2374 2376 printf "\n\n *** compiling code if necessary...\n" 2375 2377 2376 #workaround for batch jobs on local machine (lcxe6)2378 # workaround for batch jobs on local machine (lcxe6) 2377 2379 if [[ $do_batch == true && $do_remote == false ]] 2378 2380 then … … 2380 2382 fi 2381 2383 2382 # GET CHECK OPTIONS2384 # GET CHECK OPTIONS 2383 2385 line="" 2384 2386 found=false … … 2396 2398 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2397 2399 then 2398 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN2399 line="$line "2400 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN 2401 line="$line " 2400 2402 copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'` 2401 2403 found=true … … 2407 2409 make -f Makefile_check F90=$compiler_name_ser COPT="$copts_check" 2408 2410 2409 #GET MAKE OUTPUT2411 # GET MAKE OUTPUT 2410 2412 if [[ $? != 0 ]] 2411 2413 then … … 2447 2449 cp ${pathname}/${fname}${topo_suffix} ./TOPOGRAPHY_DATA 2448 2450 2449 #IN CASE OF TOPOGRAPHY AND HIGH GRID POINT NUMBERS, THE STACK SIZE2450 #MUST BE INCREASED. THIS IS DUE TO THE ARRAY nzb_local AND topo_height,2451 #WHICH REQUIRE SUFFICIENT MEMORY2451 # IN CASE OF TOPOGRAPHY AND HIGH GRID POINT NUMBERS, THE STACK SIZE 2452 # MUST BE INCREASED. THIS IS DUE TO THE ARRAY nzb_local AND topo_height, 2453 # WHICH REQUIRE SUFFICIENT MEMORY 2452 2454 ulimit -s unlimited 2453 2455 fi 2454 2456 2455 #CREATE ENVPAR FILE, WHICH IS NEEDED BY CHECK_NAMELIST_FILES.X2457 # CREATE ENVPAR FILE, WHICH IS NEEDED BY CHECK_NAMELIST_FILES.X 2456 2458 cat > ENVPAR << %%END%% 2457 2459 &envpar run_identifier = '$fname', host = '$host', … … 2464 2466 %%END%% 2465 2467 2466 # SAFETY CHECK: ONLY PROCEED IF THE PARAMETER CHECK PROGRAM WAS PROPERLY COMPILED 2467 if [[ ! -f check_namelist_files.x && $skip_check == false ]] then 2468 # SAFETY CHECK: ONLY PROCEED IF THE PARAMETER CHECK PROGRAM WAS PROPERLY COMPILED 2469 if [[ ! -f check_namelist_files.x && $skip_check == false ]] 2470 then 2468 2471 printf "\n +++ WARNING: check_namelist_files.x not found." 2469 2472 answer=dummy … … 2483 2486 locat=normal; exit 2484 2487 else 2485 printf "\n *** skipping parameter file check." 2486 2488 printf "\n *** skipping parameter file check." 2487 2489 fi 2488 2490 fi … … 2490 2492 elif [[ $skip_check == false ]] 2491 2493 then 2492 #STARTING THE PARAMETER FILE CHECK2494 # STARTING THE PARAMETER FILE CHECK 2493 2495 printf "\n\n *** starting parameter file check..." 2494 2496 2495 #CHECKING THE P3D FILE2497 # CHECKING THE P3D FILE 2496 2498 printf "\n\n (1) checking $filename_input" 2497 2499 echo "$numprocs 0 0" > VARIN … … 2508 2510 fi 2509 2511 2510 #CHECKING THE PD3F FILE IF NECESSARY2512 # CHECKING THE PD3F FILE IF NECESSARY 2511 2513 if [[ $check_restart == 1 && $check_error == false ]] 2512 2514 then 2513 2515 printf "\n\n (2) checking $filenamef" 2514 2516 2515 # FIRST CHECK IF INITIALIZING_ACTIONS="READ_RESTART_DATA" IS SET IN &INIPAR LIST 2517 # FIRST CHECK IF INITIALIZING_ACTIONS="READ_RESTART_DATA" IS SET 2518 # IN &INIPAR LIST 2516 2519 found=false 2517 cat PARINF |while read line2520 cat PARINF | while read line 2518 2521 do 2519 2522 line=$(echo $line|sed 's/ //g') … … 2547 2550 fi 2548 2551 2549 #READ max_user_pr FROM FILES2552 # READ max_user_pr FROM FILES 2550 2553 if [[ -f parin_for_check ]] 2551 2554 then … … 2568 2571 fi 2569 2572 2570 #REPORT ERRORS AND CONTINUE/EXIT2573 # REPORT ERRORS AND CONTINUE/EXIT 2571 2574 if [[ $check_error == true ]] 2572 2575 then … … 2577 2580 while [[ "$answer" != c && "$answer" != C && "$answer" != a && "$answer" != A ]] 2578 2581 do 2579 printf " >>> continue anyway (c(ontinue)/a(bort)) ? "2580 read answer2582 printf " >>> continue anyway (c(ontinue)/a(bort)) ? " 2583 read answer 2581 2584 done 2582 2585 … … 2689 2692 2690 2693 2691 basename=` print$mainprog | cut -f1 -d"."`2694 basename=`echo $mainprog | cut -f1 -d"."` 2692 2695 eval make_depository=${local_depository_path}/${basename}_current_version.tar 2693 2696 if [[ ! -f $make_depository ]] … … 4781 4784 # with the SGE batch system 4782 4785 echo "cat > $config_file << \"%END%\"" >> $jobfile 4783 sed 's/#$.*//g' $config_file >> $jobfile 4786 if [[ $host = lckyuh ]] 4787 then 4788 # no cross compiler on compute node 4789 sed 's/frtpx/frt/g' $config_file >> $jobfile 4790 else 4791 sed 's/#$.*//g' $config_file >> $jobfile 4792 fi 4784 4793 echo "%END%" >> $jobfile 4785 4794 echo " " >> $jobfile … … 4788 4797 # ABSPEICHERN DER AKTUELLEN MRUN-VERSION 4789 4798 # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN 4790 echo "cat > $mrun_script_name <<\"%END%\"" 4791 cat ${PALM_BIN}/$mrun_script_name 4792 echo "%END%" 4799 echo "cat > $mrun_script_name <<\"%END%\"" >> $jobfile 4800 cat ${PALM_BIN}/$mrun_script_name >> $jobfile 4801 echo "%END%" >> $jobfile 4793 4802 echo "chmod u+x $mrun_script_name" >> $jobfile 4794 4803 echo "execute_mrun=true" >> $jobfile … … 4851 4860 4852 4861 # MRUN AUF ZIELRECHNER AUFRUFEN (queue is workaround for ibmkisti) 4853 echo "set -x" >> $jobfile 4854 echo "queue=$queue" >> $jobfile 4855 # echo "echo \"*** shell test\" " >> $jobfile 4856 # echo "which ksh" >> $jobfile 4857 # echo "ls -al /bin" >> $jobfile 4862 echo "set -x" >> $jobfile 4863 echo "queue=$queue" >> $jobfile 4858 4864 echo "[[ \$execute_mrun = true ]] && ./$mrun_com" >> $jobfile 4859 4860 echo 'ls -al; echo `pwd`' >> $jobfile 4861 echo "cd \$HOME" >> $jobfile 4862 echo "rm -rf $TEMPDIR" >> $jobfile 4865 echo 'ls -al; echo `pwd`' >> $jobfile 4866 echo "cd \$HOME" >> $jobfile 4867 echo "rm -rf $TEMPDIR" >> $jobfile 4863 4868 4864 4869
Note: See TracChangeset
for help on using the changeset viewer.