Changeset 5 for palm/trunk/SCRIPTS/mrun_new
- Timestamp:
- Feb 14, 2007 1:53:31 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun_new
r1 r5 3 3 ##!/home/DSRC/NC/tatuyama/pub/ksh NEEDED ON NEC AT RIAM !!!!!!!!!! 4 4 5 # mrun - Plot-Shellskript Version: @(#)MRUN 1.8 07/02/075 # mrun - Plot-Shellskript Version: @(#)MRUN 1.8 10/02/07 6 6 7 7 # Prozedur zum Starten von Modellaeufen … … 103 103 # sampled in SOURCES_FOR_RUN_$fname which is a 104 104 # subdirectory of the current working directory, 105 # -s TEST changed to -s CHANGED_FILES or -s CF,105 # -s TEST changed to -s WRITE_PERMIT or -s WP, 106 106 # adapted for RIAM (neck) 107 # bugfix for cycle number of output file (extout) 108 # all hpmuk-related code removed 107 109 108 110 … … 125 127 cond2="" 126 128 config_file=.mrun.config 127 continuation_run=false128 129 cpp_opts="" 129 130 cpumax=0 … … 174 175 queue=none 175 176 read_from_config="" 177 restart_run=false 176 178 return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 177 179 if [[ $return_addres = 130.75.105.158 ]] … … 314 316 (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias) mrun_path=/home/raasch/pub 315 317 localhost=lcmuk;; 316 (caurus|caver|gharra|samun|twister|viracao|yalka) mrun_path=/home/raasch/pub/317 localhost=hpmuk;;318 318 (breg*-en0|berni*-en0) mrun_path=/home/b/niksiraa/pub 319 319 localhost=ibmb; archive_system=tivoli;; … … 357 357 (B) delete_temporary_catalog=false; mc="$mc -B";; 358 358 (c) config_file=$OPTARG; mc="$mc -c$OPTARG";; 359 (C) continuation_run=true; mc="$mc -C";;359 (C) restart_run=true; mc="$mc -C";; 360 360 (d) fname=$OPTARG; mc="$mc -d$OPTARG";; 361 361 (D) cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D$OPTARG";; … … 500 500 do_remote=true 501 501 case $host in 502 ( hpmuk|ibm|ibmb|ibmh|ibms|ibmy|nech|neck|lctit|unics) true;;502 (ibm|ibmb|ibmh|ibms|ibmy|nech|neck|lctit|unics) true;; 503 503 (*) printf "\n" 504 504 printf "\n +++ execution host \"$host\" not admitted for MRUN," … … 843 843 do_remote=true 844 844 case $host in 845 ( hpmuk|ibm|ibmb|ibmh|ibms|ibmy|lctit|nech|neck|unics) true;;845 (ibm|ibmb|ibmh|ibms|ibmy|lctit|nech|neck|unics) true;; 846 846 (*) printf "\n" 847 847 printf "\n +++ execution host \"$host\" not admitted for MRUN," … … 995 995 then 996 996 case $host in 997 (hpmuk) queue=hpmuk;;998 997 (ibmb) if [[ $node_usage = shared ]] 999 998 then … … 1297 1296 then 1298 1297 1299 [[ "$source_list" = CF ]] && source_list=CHANGED_FILES 1300 1301 if [[ "$source_list" = CHANGED_FILES || $continuation_run != true ]] 1298 [[ "$source_list" = LM ]] && source_list=LOCALLY_MODIFIED 1299 [[ "$source_list" = WP ]] && source_list=WRITE_PERMIT 1300 1301 if [[ $restart_run != true ]] 1302 1302 then 1303 1303 rm -rf SOURCES_FOR_RUN_$fname … … 1315 1315 # ALLE ERMITTELTEN DATEIEN WERDEN IM VERZEICHNIS SOURCES_FOR_RUN_... 1316 1316 # GESAMMELT 1317 if [[ "$source_list" = CHANGED_FILES]]1317 if [[ "$source_list" = WRITE_PERMIT ]] 1318 1318 then 1319 1319 1320 1320 source_list="" 1321 1322 # ZUERST DAS DURCH DIE KONFIGURATIONSDATEI FESTGELEGTE1323 # QUELLTEXTVERZEICHNIS DURCHSUCHEN1324 1321 cd $source_path 1325 1322 … … 1354 1351 1355 1352 1353 elif [[ "$source_list" = LOCALLY_MODIFIED ]] 1354 then 1355 1356 # MODIFIZIERTE DATEIEN DER SVN-ARBEITSKOPIE BESTIMMEN 1357 source_list="" 1358 cd $source_path 1359 1360 1361 # PRUEFEN, OB VERZEICHNIS UEBERHAUPT UNTER SVN-KONTROLLE STEHT 1362 if [[ ! -d .svn ]] 1363 then 1364 printf "\n\n +++ source directory" 1365 printf "\n \"$source_path\" " 1366 printf "\n is not under control of \"subversion\"." 1367 printf "\n Please do not use mrun-option \"-s LOCALLY MODIFIED\"\n" 1368 fi 1369 1370 1371 # ALLE MODIFIZIERTEN QUELLCODEDATEIEN AUFLISTEN 1372 Filenames="" 1373 svn status | while read line 1374 do 1375 firstc=`echo $line | cut -c1` 1376 if [[ $firstc = M || $firstc = "?" ]] 1377 then 1378 Name=`echo "$line" | cut -c8-` 1379 extension=`echo $Name | cut -d. -f2` 1380 if [[ "$extension" = f90 || "$extension" = F90 || "$extension" = f || "$extension" = F || "$extension" = c ]] 1381 then 1382 Filenames="$Filenames "$Name 1383 fi 1384 fi 1385 done 1386 1387 1388 # DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN 1389 for dateiname in $Filenames 1390 do 1391 cp $dateiname $working_directory/SOURCES_FOR_RUN_$fname 1392 source_list=$source_list"$dateiname " 1393 done 1394 1395 cd - > /dev/null 1396 1397 1356 1398 # MITTELS OPTION -s ANGEGEBENE DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN 1357 1399 # BEI AUTOMATISCHEN FORTSETZUNGSLAEUFEN SIND DORT SCHON ALLE DATEIEN 1358 1400 # VORHANDEN 1359 elif [[ "$source_list" != "" && $ continuation_run != true ]]1401 elif [[ "$source_list" != "" && $restart_run != true ]] 1360 1402 then 1361 1403 … … 1392 1434 # LISTE DER ZU UEBERSETZENDEN PROGRAMMTEILE MIT ENTHALTEN IST (WENN 1393 1435 # NICHT, WIRD ES DIESER LISTE HINZUGEFUEGT) 1394 if [[ $ continuation_run != true ]]1436 if [[ $restart_run != true ]] 1395 1437 then 1396 1438 … … 1412 1454 1413 1455 # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN 1414 if [[ $ continuation_run != true && "$add_source_path" != "" ]]1456 if [[ $restart_run != true && "$add_source_path" != "" ]] 1415 1457 then 1416 1458 … … 1482 1524 # ALLE UNTERPROGRAMME, DIE ZU VEREINBARTEN SOFTWAREPAKETEN GEHOEREN, 1483 1525 # DER LISTE DER ZU UEBERSETZENDEN DATEIEN HINZUFUEGEN 1484 if [[ $ continuation_run != true && -n $package_list ]]1526 if [[ $restart_run != true && -n $package_list ]] 1485 1527 then 1486 1528 … … 1522 1564 # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN 1523 1565 # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN... 1524 if [[ "$use_makefile" = true && "$ continuation_run" != true ]]1566 if [[ "$use_makefile" = true && "$restart_run" != true ]] 1525 1567 then 1526 1568 [[ "$makefile" = "" ]] && makefile=$source_path/Makefile … … 1663 1705 then 1664 1706 case $localhost in 1665 ( hpmuk|unics)compiler_name=f77;;1707 (unics) compiler_name=f77;; 1666 1708 (lcmuk) if [[ "$cond1" = parallel || "$cond2" = parallel ]] 1667 1709 then … … 1695 1737 case $localhost in 1696 1738 (decalpha|ibm|ibmb|ibmh|ibms|ibmy|unics) praeproc=cpp;; 1697 (hpmuk) praeproc=/usr/ccs/lbin/cpp;;1698 1739 esac 1699 1740 … … 2154 2195 cp $make_depository $TEMPDIR_COMPILE 2155 2196 cd $TEMPDIR_COMPILE 2156 tar -xf $make_depository > /dev/null 2197 tar -xf $make_depository > /dev/null 2>&1 2157 2198 cd - > /dev/null 2158 2199 fi … … 2229 2270 else 2230 2271 2231 # HPMUK EVTL. PRAEPROZESSOR LAUFEN LASSEN2232 if [[ $localhost = hpmuk ]]2233 then2234 (( i = 0 ))2235 new_source_list=""2236 for filename in $source_list2237 do2238 basename=`print $filename | cut -f1 -d"."`2239 extension=`print $filename | cut -f2 -d"."`2240 if [[ $extension = F && $localhost != hpmuk ]]2241 then2242 (( i = i + 1 ))2243 if (( i == 1 ))2244 then2245 printf "\n\n *** preprocessor-calls:\n$striche"2246 fi2247 printf "\n $praeproc $PPOPTS -P $filename > ${basename}.f 2> /dev/null"2248 $praeproc $PPOPTS -P $filename > ${basename}.f 2> /dev/null2249 new_source_list="$new_source_list "${basename}.f2250 elif [[ $extension = f90 ]]2251 then2252 (( i = i + 1 ))2253 if (( i == 1 ))2254 then2255 printf "\n\n *** preprocessor-calls:\n$striche"2256 fi2257 mv $filename ${basename}.F902258 printf "\n $praeproc $PPOPTS -C -P ${basename}.F90 > $filename 2> /dev/null"2259 $praeproc $PPOPTS -C -P ${basename}.F90 > $filename 2> /dev/null2260 new_source_list="$new_source_list "$filename2261 rm -f ${basename}.F902262 else2263 new_source_list="$new_source_list "$filename2264 fi2265 done2266 source_list="$new_source_list"2267 if (( i != 0 ))2268 then2269 printf "\n$striche\n *** preprocessor-calls finished\n"2270 fi2271 fi2272 2273 2272 2274 2273 # UEBERSETZUNG DER QUELLTEXT-DATEIEN UND DES HAUPTPROGRAMMS … … 2328 2327 printf " linker-options: $LOPTS \n" 2329 2328 printf " source code files: $source_list \n" 2330 if [[ $localhost = hpmuk ]] 2331 then 2332 if [[ $localhost_realname = caurus ]] 2333 then 2334 $compiler_name $C_PPOPTS $FOPTS $MODULE_OPTIONS $source_list $LOPTS 2335 else 2336 remsh caurus "export PATH=/opt/fortran90/bin:$PATH; cd `pwd`; $compiler_name $C_PPOPTS $FOPTS $MODULE_OPTIONS $source_list $LOPTS" 2337 fi 2338 else 2339 $compiler_name $C_PPOPTS $FOPTS $MODULE_OPTIONS $LOPTS $source_list 2340 fi 2329 2330 $compiler_name $C_PPOPTS $FOPTS $MODULE_OPTIONS $LOPTS $source_list 2331 2341 2332 fi 2342 2333 if [[ $? != 0 || "$compile_error" = true || "$module_compile_error" = true ]] … … 2683 2674 exit 2684 2675 fi 2685 if [[ $localhost = hpmuk ]] 2686 then 2687 echo "property sdir .,${source_path}, ${add_source_path}" > .dderc 2688 dde a.out 2689 elif [[ $localhost = decalpha ]] 2676 if [[ $localhost = decalpha ]] 2690 2677 then 2691 2678 dxladebug a.out … … 3546 3533 3547 3534 # KOPIEREN AUF EINPROZESSORMASCHINE 3548 if [[ "${extout[$i]}" != " " ]]3535 if [[ "${extout[$i]}" != " " && "${extout[$i]}" != "" ]] 3549 3536 then 3550 3537 printf "\n >>> OUTPUT: ${localout[$i]} to ${pathout[$i]}.${extout[$i]}\n"
Note: See TracChangeset
for help on using the changeset viewer.