Changeset 69 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- Mar 18, 2007 11:44:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r68 r69 1 #!/bin/ ksh1 #!/bin/pdksh 2 2 3 3 ##!/home/DSRC/NC/tatuyama/pub/ksh NEEDED ON NEC AT RIAM !!!!!!!!!! … … 114 114 # 14/03/07 - Siggi - fimm admitted, revision number added to terminal 115 115 # output 116 # 16/03/07 - Siggi - adjustments for lctit 116 117 117 118 … … 184 185 read_from_config="" 185 186 restart_run=false 186 return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 187 # return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 188 return_addres=1.2.3.4 187 189 if [[ $return_addres = 130.75.105.158 ]] 188 190 then … … 246 248 # FEHLERBEHANDLUNG 247 249 # BEI EXIT: 248 trap 'if [[ $locat != localhost ]] 250 trap 'rm -rf tmp_mrun 251 if [[ $locat != localhost ]] 249 252 then 250 253 # if [[ ! -f ${mrun_path}/statistik/mrun_statistik ]] … … 271 274 # fi 272 275 # fi 273 continue276 echo " " > /dev/null 274 277 fi 275 278 … … 308 311 309 312 # BEI TERMINAL-BREAK: 310 trap '[[ $tmpcreate = true ]] && (cd; rm -rf $TEMPDIR) 313 trap 'rm -rf tmp_mrun 314 [[ $tmpcreate = true ]] && (cd; rm -rf $TEMPDIR) 311 315 if [[ -f ~/job_queue/JOBINFO.$QSUB_REQID ]] 312 316 then … … 520 524 if [[ -n $additional_conditions ]] 521 525 then 522 echo $additional_conditions | cut -d" " -f1-3 | read cond1 cond2 dummy523 #cond1=`echo $additional_conditions | cut -d" " -f1`524 #cond2=`echo $additional_conditions | cut -d" " -s -f2`525 #dummy=`echo $additional_conditions | cut -d" " -s -f3`526 # echo $additional_conditions | cut -d" " -f1-3 | read cond1 cond2 dummy 527 cond1=`echo $additional_conditions | cut -d" " -f1` 528 cond2=`echo $additional_conditions | cut -d" " -s -f2` 529 dummy=`echo $additional_conditions | cut -d" " -s -f3` 526 530 if [[ -n $dummy ]] 527 531 then … … 592 596 # ZEILE DEFINIERT ENVIRONMENT-VARIABLE 593 597 zeile=$(echo $zeile | cut -c2-) 594 echo $zeile | cut -d" " -f1-5 | read var value for_host for_cond1 for_cond2595 #var=`echo $zeile | cut -d" " -f1`596 #value=`echo $zeile | cut -d" " -s -f2`597 #for_host=`echo $zeile | cut -d" " -s -f3`598 #for_cond1=`echo $zeile | cut -d" " -s -f4`599 #for_cond2=`echo $zeile | cut -d" " -s -f5`598 # echo $zeile | cut -d" " -f1-5 | read var value for_host for_cond1 for_cond2 599 var=`echo $zeile | cut -d" " -f1` 600 value=`echo $zeile | cut -d" " -s -f2` 601 for_host=`echo $zeile | cut -d" " -s -f3` 602 for_cond1=`echo $zeile | cut -d" " -s -f4` 603 for_cond2=`echo $zeile | cut -d" " -s -f5` 600 604 601 605 if [[ "$for_host" = "" || ( "$for_host" = $host && "$for_cond1" = "$cond1" && "$for_cond2" = "$cond2" ) || $(echo "$input_list$output_list"|grep -c "$for_host") != 0 ]] … … 683 687 # s2b: loc - Feld (optional) 684 688 # s2c: tr/ar - Feld (optional) 685 echo $zeile | cut -d" " -f1-2 | read s1 s2686 #s1=`echo $zeile | cut -d" " -f1`687 #s2=`echo $zeile | cut -d" " -s -f2`689 # echo $zeile | cut -d" " -f1-2 | read s1 s2 690 s1=`echo $zeile | cut -d" " -f1` 691 s2=`echo $zeile | cut -d" " -s -f2` 688 692 s2a=$(echo $s2 | cut -d":" -f1) 689 693 if [[ $(echo $s2 | grep -c ":") = 0 ]] … … 692 696 s2c="" 693 697 else 694 echo $s2 | cut -d":" -f2-3 | sed 's/:/ /g' | read s2b s2c695 #s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`696 #s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`697 fi 698 echo $zeile | cut -d" " -f3-6 | read s3 s4 s5 s6699 #s3=`echo $zeile | cut -d" " -f3`700 #s4=`echo $zeile | cut -d" " -s -f4`701 #s5=`echo $zeile | cut -d" " -s -f5`702 #s6=`echo $zeile | cut -d" " -s -f6`698 # echo $s2 | cut -d":" -f2-3 | sed 's/:/ /g' | read s2b s2c 699 s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'` 700 s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'` 701 fi 702 # echo $zeile | cut -d" " -f3-6 | read s3 s4 s5 s6 703 s3=`echo $zeile | cut -d" " -f3` 704 s4=`echo $zeile | cut -d" " -s -f4` 705 s5=`echo $zeile | cut -d" " -s -f5` 706 s6=`echo $zeile | cut -d" " -s -f6` 703 707 704 708 … … 768 772 # esac 769 773 774 775 # ENVIRONMENT-VARIABLEN FUER INTERPRET_CONFIG UEBER NAMELIST_DATEI ZUR 776 # VERFUEGUNG STELLEN 777 cat > .mrun_environment << %%END%% 778 &mrun_environment cond1 = '$cond1', cond2 = '$cond2', 779 config_file = '$config_file', do_remote = '$do_remote', 780 do_trace = '$do_trace', host = '$host', 781 input_list = '$input_list', icf = '$interpreted_config_file', 782 localhost = '$localhost', output_list = '$output_list' / 783 784 %%END%% 785 786 # WERTE VON MRUN-OPTIONEN SICHERN UND DAMIT GEGEBENENFALLS SPAETER DIE 787 # IN DER KONFIGURAIONSDATEI ANGEGEBENEN WERTE UEBERSTEUERN 788 mrun_memory=$memory 789 mrun_cpumax=$cpumax 790 mrun_numprocs=$numprocs 791 770 792 if [[ $localhost_realname = "gate" ]] 771 793 then … … 779 801 export PATH=$PATH:. 780 802 . $interpreted_config_file 781 rm $interpreted_config_file 803 # rm $interpreted_config_file 804 805 # OPTIONSWERTE UEBERSTEUERN KONFIGURATIONSDATEI 806 [[ "mrun_memory" != "" ]] && memory=$mrun_memory 807 [[ "mrun_cpumax" != "" ]] && cpumax=$mrun_cpumax 808 [[ "mrun_numprocs" != "" ]] && numprocs=$mrun_numprocs 782 809 783 810 fi … … 1054 1081 fi;; 1055 1082 (lctit) netcdf_support=true 1056 netcdf_path=/home2/usr5/mkanda/netcdf-3.6. 1;;1083 netcdf_path=/home2/usr5/mkanda/netcdf-3.6.2;; 1057 1084 (nech) netcdf_support=true 1058 1085 netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;; … … 1391 1418 # ALLE MODIFIZIERTEN QUELLCODEDATEIEN AUFLISTEN 1392 1419 Filenames="" 1393 svn status | while read line 1420 svn status > tmp_mrun 1421 while read line 1394 1422 do 1395 1423 firstc=`echo $line | cut -c1` … … 1403 1431 fi 1404 1432 fi 1405 done 1433 done < tmp_mrun 1406 1434 1407 1435 … … 1869 1897 (lcmuk|nech|neck) FOPTS="-I ${netcdf_path}/include $FOPTS" 1870 1898 LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";; 1871 (lctit) FOPTS="-I ${netcdf_path}/ src/f90$FOPTS"1872 LOPTS="$LOPTS -L${netcdf_path}/ src/libsrc-lnetcdf";;1899 (lctit) FOPTS="-I ${netcdf_path}/include $FOPTS" 1900 LOPTS="$LOPTS -L${netcdf_path}/lib -lnetcdf";; 1873 1901 1874 1902 esac … … 2175 2203 # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN 2176 2204 line="" 2177 grep "%depository_path" $config_file | while read line 2205 grep "%depository_path" $config_file > tmp_mrun 2206 while read line 2178 2207 do 2179 2208 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 2184 2213 fi 2185 2214 fi 2186 done 2215 done < tmp_mrun 2187 2216 2188 2217 line="" 2189 grep " $localhost" $config_file | grep "%depository_path" | while read line 2218 grep " $localhost" $config_file | grep "%depository_path" > tmp_mrun 2219 while read line 2190 2220 do 2191 2221 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 2193 2223 local_depository_path=`echo $line | cut -d" " -s -f2` 2194 2224 fi 2195 done 2225 done < tmp_mrun 2196 2226 2197 2227 if [[ "$local_depository_path" = "" ]] … … 2915 2945 if [[ "$QUEUE" = interactive ]] 2916 2946 then 2917 mpirun -np $numprocs $runfile$ROPTS > aout_output 2>&12947 mpirun -np $numprocs a.out $ROPTS > aout_output 2>&1 2918 2948 else 2919 n1ge -fore -mpi $numprocs -q $queue $runfile$ROPTS > aout_output 2>&12949 n1ge -fore -mpi $numprocs -q $queue a.out $ROPTS > aout_output 2>&1 2920 2950 fi 2921 2951 … … 3866 3896 3867 3897 # WORKAROUND FUER RIAM-NEC-JOBS WEGEN PROFILE-SCHWIERIGKEITEN 3868 if [[ $localhost_realname = "gate" ]]3898 if [[ $localhost_realname = "gate" || $localhost = lctit ]] 3869 3899 then 3870 3900 echo "export PALM_BIN=$PALM_BIN" >> $jobfile
Note: See TracChangeset
for help on using the changeset viewer.