Changeset 82 for palm/trunk
- Timestamp:
- Apr 16, 2007 3:40:52 PM (18 years ago)
- Location:
- palm/trunk
- Files:
-
- 1 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_5.1.html
r62 r82 12 12 Details about new releases can be found in the 13 13 <a href="../tec/technical_documentation.html">technical/numerical 14 documentation</a>. Users can easily make version updatesby14 documentation</a>.</p><p>If you have previously checked out the most recent (at that time) PALM version by using</p><p style="margin-left: 40px; font-family: Courier New,Courier,monospace;">svn checkout ...../palm/trunk trunk ,</p><p>you can easily make an update to the most recent PALM version by 15 15 changing into 16 16 the working directory<span style="font-family: Courier New,Courier,monospace;"> 17 17 ~/palm/current_version 18 18 </span>and executing<span style="font-family: Courier New,Courier,monospace;"></span></p><p style="margin-left: 40px;"><span style="font-family: Courier New,Courier,monospace;">svn 19 update </span></p><p><span style="font-family: Courier New,Courier,monospace;"></span>This19 update trunk</span></p><p><span style="font-family: Courier New,Courier,monospace;"></span>This 20 20 updates all files in the PALM working copy in subdirectory<span style="font-family: Courier New,Courier,monospace;"> trunk</span>. 21 21 The update may fail due the <span style="font-weight: bold;">subversion</span> rules, if -
palm/trunk/SCRIPTS/mbuild
r75 r82 87 87 # adjustments for running under pdksh, local ip-addres 88 88 # is not determined any more 89 # 30/03/07 - Siggi - cpp-directives/options + netcdf-options are read 90 # from configuration file 91 # host identifier (local_host) is read from config file 89 92 90 93 … … 159 162 160 163 161 # LOKALEN RECHNER ERMITTELN162 local_host_real_name=$(hostname)163 # local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')164 165 case $local_host_real_name in166 (atmos) local_host=lcide;;167 (berte) local_host=t3eb;;168 (bora|breva|gregale|irifi|levanto|maestro|orkan|ostria|quanero|scirocco) local_host=lcmuk;;169 (fimm.bccs.uib.no) local_host=lcmuk;;170 (gate) local_host=neck;;171 (gfdl3.yonsei.ac.kr) local_host=decalpha;;172 (gfdl5) local_host=ibmy;;173 (gwdk081.gwdg.de) local_host=ibm;;174 (hreg01a-en0|hreg02a-en0) local_host=ibmh;;175 (nobel|nobela) local_host=ibms;;176 (tgg*) local_host=lctit;;177 (t3e) local_host=t3eh;;178 (zam003) local_host=t3ej2;;179 (zam005) local_host=t3ej5;;180 (*) printf "\n +++ local host \"$local_host_real_name\" not admitted for mbuild \n"181 locat=local_host; exit;;182 esac183 184 [[ $local_host_real_name = scirocco ]] && scirocco=true185 [[ $local_host_real_name = fimm.bccs.uib.no ]] && fimm=true186 187 188 189 164 # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN 190 165 if [[ ! -f $config_file ]] … … 195 170 locat=configuration; exit 196 171 fi 172 173 174 175 # LOKALEN RECHNER ERMITTELN 176 local_host_real_name=$(hostname) 177 # local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 178 179 180 181 # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN 182 line="" 183 grep "%host_identifier" $config_file > tmp_mbuild 184 while read line 185 do 186 if [[ "$line" != "" || $(echo $line | cut -c1) != "#" ]] 187 then 188 HOSTNAME=`echo $line | cut -d" " -s -f2` 189 host_identifier=`echo $line | cut -d" " -s -f3` 190 if [[ "$HOSTNAME" = $local_host_real_name ]] 191 then 192 local_host=$host_identifier 193 break 194 fi 195 fi 196 done < tmp_mbuild 197 198 if [[ "$local_host" = "" ]] 199 then 200 printf "\n +++ no host identifier found in configuration file \"$config_file\"" 201 printf "\n for local host \"$local_host_real_name\"." 202 printf "\n Please add line" 203 printf "\n \"\%host_identifier $local_host_real_name <identifier>\"" 204 printf "\n to the configuration file." 205 locat=local_host; exit 206 fi 207 208 209 # case $local_host_real_name in 210 # (atmos) local_host=lcide;; 211 # (berte) local_host=t3eb;; 212 # (bora|breva|gregale|irifi|levanto|maestro|orkan|ostria|quanero|scirocco) local_host=lcmuk;; 213 # (fimm.bccs.uib.no) local_host=lcmuk;; 214 # (gate) local_host=neck;; 215 # (gfdl3.yonsei.ac.kr) local_host=decalpha;; 216 # (gfdl5) local_host=ibmy;; 217 # (gwdk081.gwdg.de) local_host=ibm;; 218 # (hreg01a-en0|hreg02a-en0) local_host=ibmh;; 219 # (nobel|nobela) local_host=ibms;; 220 # (tgg*) local_host=lctit;; 221 # (t3e) local_host=t3eh;; 222 # (zam003) local_host=t3ej2;; 223 # (zam005) local_host=t3ej5;; 224 # (*) printf "\n +++ local host \"$local_host_real_name\" not admitted for mbuild \n" 225 # locat=local_host; exit;; 226 # esac 227 228 [[ $local_host_real_name = scirocco ]] && scirocco=true 229 [[ $local_host_real_name = fimm.bccs.uib.no ]] && fimm=true 230 231 232 197 233 if [[ $local_host != ibms ]] 198 234 then … … 214 250 fi 215 251 done < tmp_mbuild 252 216 253 217 254 if [[ "$local_username" = "" ]] … … 673 710 fi 674 711 712 netcdf_inc="" 713 netcdf_lib="" 675 714 676 715 # AUF HLRN-RECHNER NUR EINMAL UEBERSETZEN … … 700 739 netcdf_support=false 701 740 case $remote_host in 702 (lcmuk) remote_addres=130.75.105.3 ; cpp_options=""741 (lcmuk) remote_addres=130.75.105.3 703 742 netcdf_support=true 704 743 if [[ $scirocco = true ]] … … 939 978 940 979 980 # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN 981 line="" 982 grep "$remote_host_string" $config_file | grep "%cpp_options" > tmp_mbuild 983 while read line1 984 do 985 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 986 then 987 line="$line1" 988 fi 989 done < tmp_mbuild 990 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] 991 then 992 printf "\n +++ no preprocessor options found in configuration file" 993 printf "\n for \"$remote_host_string\" " 994 locat=config_file; exit 995 else 996 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN 997 cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 998 fi 999 1000 # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN 1001 for string in $remote_host_string 1002 do 1003 if [[ $(echo $remote_host | cut -c1-2) = lc && $(echo $string | cut -c1-2) = lc ]] 1004 then 1005 cpp_options="$cpp_options -D__lc " 1006 else 1007 cpp_options="$cpp_options -D__$string " 1008 fi 1009 done 1010 1011 1012 1013 # NETCDF-OPTIONEN ERMITTELN 1014 line="" 1015 grep "$remote_host_string" $config_file | grep "%netcdf_inc" > tmp_mbuild 1016 while read line1 1017 do 1018 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 1019 then 1020 line="$line1" 1021 fi 1022 done < tmp_mbuild 1023 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 1024 then 1025 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN 1026 netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 1027 fi 1028 1029 line="" 1030 grep "$remote_host_string" $config_file | grep "%netcdf_lib" > tmp_mbuild 1031 while read line1 1032 do 1033 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 1034 then 1035 line="$line1" 1036 fi 1037 done < tmp_mbuild 1038 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 1039 then 1040 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN 1041 netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 1042 fi 1043 1044 1045 941 1046 # COMPILEROPTIONEN ERMITTELN 942 1047 line="" … … 957 1062 # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN 958 1063 compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 959 fi 1064 1065 # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN 1066 compiler_options="$compiler_options $netcdf_inc" 1067 fi 1068 960 1069 if [[ $netcdf_support = true ]] 961 1070 then … … 965 1074 (ibms) compiler_options="-I /applic/netcdf64/src/f90 $compiler_options";; 966 1075 (ibmy) compiler_options="-I ${netcdf_path}/include $compiler_options";; 967 (lcmuk) compiler_options="-I ${netcdf_path}/include $compiler_options";;968 1076 (lctit) compiler_options="-I ${netcdf_path}/include $compiler_options";; 969 1077 (nech|neck) compiler_options="-I ${netcdf_path}/include $compiler_options";; 970 1078 esac 971 1079 fi 972 973 1080 974 1081 … … 992 1099 # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN 993 1100 loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 994 fi 1101 1102 # NETCDF-LIBRARY HINZUFUEGEN 1103 loader_options="$loader_options $netcdf_lib" 1104 fi 1105 995 1106 if [[ $netcdf_support = true ]] 996 1107 then 997 1108 case $remote_host in 998 (decalpha) 999 (ibmb|ibmh| lcmuk|nech|neck) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";;1000 (ibms) 1001 (ibmy) 1002 (lctit) 1109 (decalpha) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 1110 (ibmb|ibmh|nech|neck) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 1111 (ibms) loader_options="$loader_options -L${netcdf_path} -lnetcdf";; 1112 (ibmy) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 1113 (lctit) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 1003 1114 esac 1004 1115 fi -
palm/trunk/SCRIPTS/mrun
r79 r82 114 114 # 29/03/07 - Siggi - global revision transfered to batch job by new 115 115 # option -G 116 # 30/03/07 - Siggi - compilation "by hand" removed, cpp-directives/options 117 # + netcdf/dvrp-options are read from configuration 118 # file, host identifier (local_host) is read from 119 # config file, code related to ftp filetransfer 120 # removed (incl. option -f) 116 121 117 122 … … 135 140 config_file=.mrun.config 136 141 cpp_opts="" 142 cpp_options="" 137 143 cpumax=0 138 144 cpurest=0 … … 148 154 executable="" 149 155 execution_error=false 150 filetransfer_protocol=""151 156 fimm=false 152 157 fname=test … … 172 177 done 173 178 module_files="" 174 MODULE_OPTIONS=""175 179 mrun_script_name=$mc 180 netcdf_inc="" 181 netcdf_lib="" 176 182 netcdf_support=false 177 183 node_usage=default … … 213 219 transfer_problems=false 214 220 usern=$LOGNAME 215 use_makefile=""216 221 working_directory=`pwd` 217 222 TOPT="" … … 335 340 336 341 337 # EVTL. NAMEN DES LOKALEN RECHNERS MIT UEBERGREIFENDEM NAMEN VERSEHEN 338 case $localhost_realname in 339 (atmos) localhost=lcide;; 340 (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias) localhost=lcmuk;; 341 (breg*-en0|berni*-en0) localhost=ibmb; archive_system=tivoli;; 342 (cs*) localhost=nech; archive_system=ut;; 343 (fimm.bccs.uib.no) localhost=lcmuk;; 344 (gate|n-sx) PATH=$PALM_BIN:$PATH:/usr/bin/nqsII; localhost=neck;; 345 (ground.yonsei.ac.kr) localhost=decalpha;; 346 (gfdl3.yonsei.ac.kr) localhost=decalpha;; 347 (gfdl5) localhost=ibmy;; 348 (hreg*-en0|hanni*-en0) localhost=ibmh; archive_system=tivoli;; 349 (nobel*) localhost=ibms;; 350 (sun1|sun2) localhost=unics;; 351 (tgg*) localhost=lctit;; 352 (*) printf "\n +++ Host \"$localhost_realname\" not admitted for mrun \n" 353 locat=localhost; exit;; 354 esac 355 356 [[ $localhost_realname = scirocco ]] && scirocco=true 357 [[ $localhost_realname = fimm.bccs.uib.no ]] && fimm=true 358 359 360 342 361 343 # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES 362 344 # FUER FOLGEJOBS BENOETIGT WIRD 363 while getopts :a:AbBc:Cd:D: f:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option345 while getopts :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option 364 346 do 365 347 case $option in … … 372 354 (d) fname=$OPTARG; mc="$mc -d$OPTARG";; 373 355 (D) cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D$OPTARG";; 374 (f) filetransfer_protocol=$OPTARG; mc="$mc -f$OPTARG";;375 356 (F) job_on_file="-D"; mc="$mc -F";; 376 357 (G) global_revision=$OPTARG; mc="$mc -G'$OPTARG'";; … … 426 407 printf "\n -d base name of files attached to program test" 427 408 printf "\n -D preprocessor(cpp)-directives \"\" " 428 printf "\n -f filetransfer protocol (ftp or scp) depending on -h"429 409 printf "\n -F create remote job file only ---" 430 410 printf "\n -h execution host $localhost_realname" … … 472 452 473 453 454 455 # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN 456 if [[ ! -f $config_file ]] 457 then 458 printf "\n\n +++ configuration file: " 459 printf "\n $config_file" 460 printf "\n does not exist" 461 locat=connect; exit 462 fi 463 464 465 # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN 466 line="" 467 grep "%host_identifier" $config_file > tmp_mrun 468 while read line 469 do 470 if [[ "$line" != "" || $(echo $line | cut -c1) != "#" ]] 471 then 472 HOSTNAME=`echo $line | cut -d" " -s -f2` 473 host_identifier=`echo $line | cut -d" " -s -f3` 474 if [[ "$HOSTNAME" = $localhost_realname ]] 475 then 476 localhost=$host_identifier 477 break 478 fi 479 fi 480 done < tmp_mrun 481 482 if [[ "$localhost" = "" ]] 483 then 484 printf "\n\n +++ no host identifier found in configuration file \"$config_file\"" 485 printf "\n for local host \"$localhost_realname\"." 486 printf "\n Please add line" 487 printf "\n \"\%host_identifier $localhost_realname <identifier>\"" 488 printf "\n to the configuration file." 489 locat=localhost; exit 490 fi 491 492 493 494 # HOSTSPEZIFISCHE VARIABLEN SETZEN 495 case $localhost_realname in 496 (breg*-en0|berni*-en0) archive_system=tivoli;; 497 (cs*) archive_system=ut;; 498 (fimm.bccs.uib.no) fimm=true;; 499 (gate|n-sx) PATH=$PALM_BIN:$PATH:/usr/bin/nqsII;; 500 (hreg*-en0|hanni*-en0) archive_system=tivoli;; 501 (scirocco) scirocco=true;; 502 esac 503 504 505 474 506 # BASISNAME DER INPUT-DATEIEN GLEICH ALLGEMEINEM BASISNAMEN SETZEN, 475 507 # WENN NICHT VOM BENUTZER ANDERS BESTIMMT … … 555 587 556 588 557 # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN558 if [[ ! -f $config_file ]]559 then560 printf "\n\n +++ configuration file: "561 printf "\n $config_file"562 printf "\n does not exist"563 locat=connect; exit564 fi565 566 567 589 568 590 # LESEN UND INTERPRETIEREN DER KONFIGURATIONS-DATEI VOM SHELLSCRIPT AUS … … 1030 1052 fi 1031 1053 1032 # DEFAULT-DATEITRANSFER-PROTOKOLL FESTLEGEN1033 if [[ "$filetransfer_protocol" = "" ]]1034 then1035 case $host in1036 (nech|neck|ibm|ibmb|ibmh|ibms|ibmy|lctit) filetransfer_protocol=scp;;1037 (*) filetransfer_protocol=ftp;;1038 esac1039 fi1040 1041 # PRUEFEN, OB ZULAESSIGES DATEITRANSFER-PROTOKOLL GEWAEHLT WURDE1042 if [[ "$filetransfer_protocol" != ftp && "$filetransfer_protocol" != scp ]]1043 then1044 printf "\n"1045 printf "\n +++ illegal value \"$filetransfer_protocol\" for Option -f"1046 printf "\n only \"ftp\" or \"scp\" are allowed"1047 locat=options; exit1048 fi1049 1054 1050 1055 … … 1075 1080 1076 1081 # EVTL. NETCDF-UNTERSTUETZUNG SETZEN 1077 case $host in 1078 (decalpha) netcdf_support=true 1079 netcdf_path=/usr/local/netcdf-3.5.1;; 1080 (ibmb|ibmh) netcdf_support=true 1081 netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;; 1082 (ibms) netcdf_support=true 1083 netcdf_path=/applic/lib/NETCDF64;; 1084 (ibmy) netcdf_support=true 1085 netcdf_path=/usr1/users/raasch/pub/netcdf-3.6.0-p1;; 1086 (lcmuk) netcdf_support=true 1087 if [[ $scirocco = true ]] 1088 then 1089 netcdf_path=/opt/netcdf/3.6.2-beta4 1090 elif [[ $fimm = true ]] 1091 then 1092 netcdf_path=/local/netcdf 1093 else 1094 netcdf_path=/muksoft/packages/netcdf/linux 1095 fi;; 1096 (lctit) netcdf_support=true 1097 netcdf_path=/home2/usr5/mkanda/netcdf-3.6.2;; 1098 (nech) netcdf_support=true 1099 netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;; 1100 (neck) netcdf_support=true 1101 netcdf_path=/home/DSRC/NC/tatuyama/pub/netcdf-3.6.0-p1;; 1102 esac 1082 # case $host in 1083 # (decalpha) netcdf_support=true 1084 # netcdf_path=/usr/local/netcdf-3.5.1;; 1085 # (ibmb|ibmh) netcdf_support=true 1086 # netcdf_path=/aws/dataformats/netcdf-3.6.0-p1/64-32;; 1087 # (ibms) netcdf_support=true 1088 # netcdf_path=/applic/lib/NETCDF64;; 1089 # (ibmy) netcdf_support=true 1090 # netcdf_path=/usr1/users/raasch/pub/netcdf-3.6.0-p1;; 1091 # (lcmuk) if [[ $scirocco = true ]] 1092 # then 1093 # netcdf_path=/opt/netcdf/3.6.2-beta4 1094 # elif [[ $fimm = true ]] 1095 # then 1096 # netcdf_path=/local/netcdf 1097 # else 1098 # netcdf_path=/muksoft/packages/netcdf/linux 1099 # fi;; 1100 # (lctit) netcdf_support=true 1101 # netcdf_path=/home2/usr5/mkanda/netcdf-3.6.2;; 1102 # (nech) netcdf_support=true 1103 # netcdf_path=/pool/SX-6/netcdf/netcdf-3.6.0-p1;; 1104 # (neck) netcdf_support=true 1105 # netcdf_path=/home/DSRC/NC/tatuyama/pub/netcdf-3.6.0-p1;; 1106 # esac 1103 1107 1104 1108 … … 1626 1630 # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN 1627 1631 # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN... 1628 if [[ "$ use_makefile" = true && "$restart_run" != true ]]1632 if [[ "$restart_run" != true ]] 1629 1633 then 1630 1634 [[ "$makefile" = "" ]] && makefile=$source_path/Makefile … … 1632 1636 then 1633 1637 printf "\n +++ file \"$makefile\" does not exist" 1634 printf "\n provide this file or set \"use_makefile=false\" in configuration file\n"1635 1638 locat=make; exit 1636 1639 else … … 1651 1654 if [[ $(echo $localhost | cut -c1-3) = ibm ]] 1652 1655 then 1653 PPOPTS=-Dibm=ibm1656 cpp_options="${cpp_options},-D__ibm=__ibm" 1654 1657 elif [[ $(echo $localhost | cut -c1-3) = nec ]] 1655 1658 then 1656 PPOPTS=-Dnec 1659 cpp_options="$cpp_options -D__nec" 1660 elif [[ $(echo $localhost | cut -c1-2) = lc ]] 1661 then 1662 cpp_options="$cpp_options -D__lc" 1657 1663 else 1658 PPOPTS=-D$localhost1664 cpp_options="$cpp_options -D__$localhost" 1659 1665 fi 1660 1666 if [[ $(echo $localhost | cut -c1-3) = ibm ]] 1661 1667 then 1662 [[ -n $cond1 ]] && PPOPTS="$PPOPTS -D$cond1=$cond1"1663 [[ -n $cond2 ]] && PPOPTS="$PPOPTS -D$cond2=$cond2"1664 if [[ $netcdf_support = true ]]1665 then1666 PPOPTS="$PPOPTS -Dnetcdf=netcdf"1667 [[ $localhost != ibms ]] && PPOPTS="$PPOPTS -Dnetcdf_64bit=netcdf_64bit"1668 fi1669 if [[ $localhost = ibmy ]]1670 then1671 PPOPTS="$PPOPTS -Dibmy_special=ibmy_special"1672 fi1668 [[ -n $cond1 ]] && cpp_options="${cpp_options},-D__$cond1=__$cond1" 1669 [[ -n $cond2 ]] && cpp_options="${cpp_options},-D__$cond2=__$cond2" 1670 # if [[ $netcdf_support = true ]] 1671 # then 1672 # PPOPTS="$PPOPTS -Dnetcdf=netcdf" 1673 # [[ $localhost != ibms ]] && PPOPTS="$PPOPTS -Dnetcdf_64bit=netcdf_64bit" 1674 # fi 1675 # if [[ $localhost = ibmy ]] 1676 # then 1677 # PPOPTS="$PPOPTS -Dibmy_special=ibmy_special" 1678 # fi 1673 1679 else 1674 [[ -n $cond1 ]] && PPOPTS="$PPOPTS -D$cond1"1675 [[ -n $cond2 ]] && PPOPTS="$PPOPTS -D$cond2"1676 if [[ $netcdf_support = true ]]1677 then1678 PPOPTS="$PPOPTS -Dnetcdf"1679 [[ $localhost != decalpha && $localhost != lctit ]] && PPOPTS="$PPOPTS -Dnetcdf_64bit"1680 fi1680 [[ -n $cond1 ]] && cpp_options="$cpp_options -D__$cond1" 1681 [[ -n $cond2 ]] && cpp_options="$cpp_options -D__$cond2" 1682 # if [[ $netcdf_support = true ]] 1683 # then 1684 # PPOPTS="$PPOPTS -Dnetcdf" 1685 # [[ $localhost != decalpha && $localhost != lctit ]] && PPOPTS="$PPOPTS -Dnetcdf_64bit" 1686 # fi 1681 1687 fi 1682 1688 if [[ -n $package_list ]] … … 1688 1694 if [[ $package != "dvrp_graphics+1PE" ]] 1689 1695 then 1690 PPOPTS="$PPOPTS -D$package=$package"1696 cpp_options="${cpp_options},-D__$package=__$package" 1691 1697 else 1692 PPOPTS="$PPOPTS -Ddvrp_graphics"1698 cpp_options="${cpp_options},-D__dvrp_graphics=__dvrp_graphics" 1693 1699 export use_seperate_pe_for_dvrp_output=true 1694 1700 fi … … 1696 1702 if [[ $package != "dvrp_graphics+1PE" ]] 1697 1703 then 1698 PPOPTS="$PPOPTS -D$package"1704 cpp_options="$cpp_options -D__$package" 1699 1705 else 1700 PPOPTS="$PPOPTS -Ddvrp_graphics"1706 cpp_options="$cpp_options -D__dvrp_graphics" 1701 1707 export use_seperate_pe_for_dvrp_output=true 1702 1708 fi … … 1708 1714 for popts in $cpp_opts 1709 1715 do 1710 PPOPTS="$PPOPTS -D$popts" 1716 if [[ $(echo $localhost | cut -c1-3) = ibm ]] 1717 then 1718 cpp_options="${cpp_options},-D__$popts=__$popts" 1719 else 1720 cpp_options="$cpp_options -D__$popts" 1721 fi 1711 1722 done 1712 1723 fi 1713 1724 1714 # -D ARGUMENTEN EINEN DOPPELTEN UNTERSTRICH VORANSTELLEN1715 PPOPTS=`echo " $PPOPTS" | sed 's/ -D/ -D__/g'`1716 1717 1725 # OPTION ZUM EINSCHALTEN DES PRAEPROZESSORS HINZUFUEGEN 1718 if [[ $host = decalpha ]]1719 then1720 C_PPOPTS="-cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION $PPOPTS"1721 elif [[ $(echo $host | cut -c1-3) = ibm ]]1722 then1723 # blanks in PPOPTS muessen durch "," ersetzt werden1724 PPOPTS=`echo $PPOPTS | sed 's/ -/,-/g'`1725 C_PPOPTS="-qsuffix=cpp=f90 -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION,$PPOPTS"1726 elif [[ $host = lcmuk ]]1727 then1728 C_PPOPTS="$PPOPTS -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"1729 elif [[ $host = lctit ]]1730 then1731 C_PPOPTS="$PPOPTS -Mpreprocess -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION"1732 elif [[ $(echo $host | cut -c1-3) = nec ]]1733 then1734 C_PPOPTS="-Ep -DMPI_REAL=MPI_REAL8 -DMPI_2REAL=MPI_2REAL8 -DSCFFT=dzfft -DCSFFT=zdfft $PPOPTS"1735 else1736 C_PPOPTS="$PPOPTS"1737 fi1726 # if [[ $host = decalpha ]] 1727 # then 1728 # C_PPOPTS="-cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION $PPOPTS" 1729 # elif [[ $(echo $host | cut -c1-3) = ibm ]] 1730 # then 1731 # # blanks in PPOPTS muessen durch "," ersetzt werden 1732 # PPOPTS=`echo $PPOPTS | sed 's/ -/,-/g'` 1733 # C_PPOPTS="-qsuffix=cpp=f90 -WF,-DMPI_REAL=MPI_DOUBLE_PRECISION,$PPOPTS" 1734 # elif [[ $host = lcmuk ]] 1735 # then 1736 # C_PPOPTS="$PPOPTS -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION" 1737 # elif [[ $host = lctit ]] 1738 # then 1739 # C_PPOPTS="$PPOPTS -Mpreprocess -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION" 1740 # elif [[ $(echo $host | cut -c1-3) = nec ]] 1741 # then 1742 # C_PPOPTS="-Ep -DMPI_REAL=MPI_REAL8 -DMPI_2REAL=MPI_2REAL8 -DSCFFT=dzfft -DCSFFT=zdfft $PPOPTS" 1743 # else 1744 # C_PPOPTS="$PPOPTS" 1745 # fi 1738 1746 1739 1747 else … … 1766 1774 if [[ "$compiler_name" = "" ]] 1767 1775 then 1768 case $localhost in 1769 (unics) compiler_name=f77;; 1770 (lcmuk) if [[ "$cond1" = parallel || "$cond2" = parallel ]] 1771 then 1772 compiler_name=mpif90 1773 else 1774 compiler_name=ifc 1775 fi;; 1776 (lctit) if [[ "$cond1" = parallel || "$cond2" = parallel ]] 1777 then 1778 compiler_name=mpif90 1779 echo ">>> compiler=mpif90" 1780 else 1781 compiler_name=pgf95 1782 echo ">>> compiler=pgf95" 1783 fi;; 1784 (nech) compiler_name=sxmpif90;; 1785 (decalpha) compiler_name=f95;; 1786 (ibm|ibmb|ibmh|ibms|ibmy) compiler_name=mpxlf95_r;; 1787 (*) printf "\n +++ unknown host name: $localhost \n"; 1788 locat=localhost; exit;; 1789 esac 1776 1777 printf "\n +++ no compiler specified for \"$localhost $cond1 $cond2\"" 1778 locat=compiler_name; exit 1779 1780 # case $localhost in 1781 # (unics) compiler_name=f77;; 1782 # (lctit) if [[ "$cond1" = parallel || "$cond2" = parallel ]] 1783 # then 1784 # compiler_name=mpif90 1785 # echo ">>> compiler=mpif90" 1786 # else 1787 # compiler_name=pgf95 1788 # echo ">>> compiler=pgf95" 1789 # fi;; 1790 # (nech) compiler_name=sxmpif90;; 1791 # (decalpha) compiler_name=f95;; 1792 # (ibm|ibmb|ibmh|ibms|ibmy) compiler_name=mpxlf95_r;; 1793 # (*) printf "\n +++ unknown host name: $localhost \n"; 1794 # locat=localhost; exit;; 1795 # esac 1790 1796 fi 1791 1797 … … 1846 1852 1847 1853 # COMPILE- UND LINK-OPTIONEN BESTIMMEN 1848 FOPTS="$fopts"1849 LOPTS="$lopts"1854 fopts="$fopts $netcdf_inc $dvrp_inc" 1855 lopts="$lopts $netcdf_lib $dvrp_lib" 1850 1856 ROPTS="$ropts" 1851 1857 if [[ ( $(echo $host | cut -c1-3) = nec || $(echo $host | cut -c1-3) = ibm || $host = lctit ) && -n $numprocs ]] … … 1857 1863 # BEI VERWENDUNG VON DVRP-SOFTWARE MUSS ENTSPECHENDE GRAFIK-BIBLIOTHEK 1858 1864 # MIT EINGEBUNDEN WERDEN 1859 if [[ -n $package_list ]]1860 then1861 if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]1862 then1863 1864 # DVRP-GRAFIK GIBT ES NUR AUF DER IBM AM HLRN, AUF NECH/NECK UND1865 # DEM NOTEBOOK SCIROCCO1866 if [[ $host != ibmh && $host != nech && $host != neck && $host != lcmuk && "$local_compile" != true ]]1867 then1868 printf "\n"1869 printf "\n +++ option -p with package \"dvrp_graphics\" only allowed on nech and ibmh"1870 locat=parameter; exit1871 fi1872 if [[ $host = ibmh ]]1873 then1874 if [[ $cond1 = debug || $cond2 = debug ]]1875 then1876 FOPTS="-I/home/h/hzazchmi/lib/debug $FOPTS"1877 LOPTS="$LOPTS-L/home/h/hzazchmi/lib/debug -lDVRP2 -lftp"1878 else1879 FOPTS="-I/home/h/nikevita/lib_stable/optimize $FOPTS"1880 LOPTS="$LOPTS-L/home/h/nikevita/lib_stable/optimize -lDVRP2 -lftp"1881 fi1882 elif [[ $host = nech ]]1883 then1884 FOPTS="-I/import/ds9b/ipf2/b/b323014/lib/optimize $FOPTS"1885 LOPTS="$LOPTS-L/import/ds9b/ipf2/b/b323014/lib/optimize -lDVRP2 -lftp"1886 elif [[ $host = neck ]]1887 then1888 FOPTS="-I/home/DSRC/NC/tatuyama/pub/dvrp $FOPTS"1889 LOPTS="$LOPTS-L/home/DSRC/NC/tatuyama/pub/dvrp -lDVRP2 -lftp"1890 elif [[ $host = lcmuk ]]1891 then1892 FOPTS="-I/usr/local/lib/dvrp/optimize $FOPTS"1893 LOPTS="$LOPTS-L/usr/local/lib/dvrp/optimize -lDVRP2 -lftp"1894 fi1895 fi1896 fi1865 # if [[ -n $package_list ]] 1866 # then 1867 # if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]] 1868 # then 1869 # 1870 # # DVRP-GRAFIK GIBT ES NUR AUF DER IBM AM HLRN, AUF NECH/NECK UND 1871 # # DEM NOTEBOOK SCIROCCO 1872 # if [[ $host != ibmh && $host != nech && $host != neck && $host != lcmuk && "$local_compile" != true ]] 1873 # then 1874 # printf "\n" 1875 # printf "\n +++ option -p with package \"dvrp_graphics\" only allowed on nech and ibmh" 1876 # locat=parameter; exit 1877 # fi 1878 # if [[ $host = ibmh ]] 1879 # then 1880 # if [[ $cond1 = debug || $cond2 = debug ]] 1881 # then 1882 # fopts="-I/home/h/hzazchmi/lib/debug $fopts" 1883 # lopts="$lopts -L/home/h/hzazchmi/lib/debug -lDVRP2 -lftp" 1884 # else 1885 # fopts="-I/home/h/nikevita/lib_stable/optimize $fopts" 1886 # lopts="$lopts -L/home/h/nikevita/lib_stable/optimize -lDVRP2 -lftp" 1887 # fi 1888 # elif [[ $host = nech ]] 1889 # then 1890 # fopts="-I/import/ds9b/ipf2/b/b323014/lib/optimize $fopts" 1891 # lopts="$lopts -L/import/ds9b/ipf2/b/b323014/lib/optimize -lDVRP2 -lftp" 1892 # elif [[ $host = neck ]] 1893 # then 1894 # fopts="-I/home/DSRC/NC/tatuyama/pub/dvrp $fopts" 1895 # lopts="$lopts -L/home/DSRC/NC/tatuyama/pub/dvrp -lDVRP2 -lftp" 1896 # elif [[ $host = lcmuk ]] 1897 # then 1898 # fopts="-I/usr/local/lib/dvrp/optimize $fopts" 1899 # lopts="$lopts -L/usr/local/lib/dvrp/optimize -lDVRP2 -lftp" 1900 # fi 1901 # fi 1902 # fi 1897 1903 1898 1904 1899 1905 # EVTL. EINBINDEN DER NETCDF-BIBLIOTHEK 1900 if [[ $netcdf_support = true ]]1901 then1902 case $host in1903 (decalpha) FOPTS="-I${netcdf_path}/include $FOPTS"1904 LOPTS="$LOPTS-L${netcdf_path}/lib -lnetcdf";;1905 (ibmb|ibmh) FOPTS="-I ${netcdf_path}/include-64 $FOPTS"1906 LOPTS="$LOPTS-L${netcdf_path}/lib -lnetcdf";;1907 (ibms) FOPTS="-I /applic/netcdf64/src/f90 $FOPTS"1908 LOPTS="$LOPTS-L${netcdf_path} -lnetcdf";;1909 (ibmy) FOPTS="-I ${netcdf_path}/include $FOPTS"1910 LOPTS="$LOPTS-L${netcdf_path}/lib -lnetcdf";;1911 (lcmuk|nech|neck) FOPTS="-I ${netcdf_path}/include $FOPTS"1912 LOPTS="$LOPTS-L${netcdf_path}/lib -lnetcdf";;1913 (lctit) FOPTS="-I ${netcdf_path}/include $FOPTS"1914 LOPTS="$LOPTS-L${netcdf_path}/lib -lnetcdf";;1915 1916 esac1917 fi1906 # if [[ $netcdf_support = true ]] 1907 # then 1908 # case $host in 1909 # (decalpha) fopts="-I${netcdf_path}/include $fopts" 1910 # lopts="$lopts -L${netcdf_path}/lib -lnetcdf";; 1911 # (ibmb|ibmh) fopts="-I ${netcdf_path}/include-64 $fopts" 1912 # lopts="$lopts -L${netcdf_path}/lib -lnetcdf";; 1913 # (ibms) fopts="-I /applic/netcdf64/src/f90 $fopts" 1914 # lopts="$lopts -L${netcdf_path} -lnetcdf";; 1915 # (ibmy) fopts="-I ${netcdf_path}/include $fopts" 1916 # lopts="$lopts -L${netcdf_path}/lib -lnetcdf";; 1917 # (nech|neck) fopts="-I ${netcdf_path}/include $fopts" 1918 # lopts="$lopts -L${netcdf_path}/lib -lnetcdf";; 1919 # (lctit) fopts="-I ${netcdf_path}/include $fopts" 1920 # lopts="$lopts -L${netcdf_path}/lib -lnetcdf";; 1921 # 1922 # esac 1923 # fi 1918 1924 1919 1925 # PRUEFEN DER CPU-ZEIT. (CPUMAX WIRD ALS ENV-VARIABLE VOM HAUTPRO- … … 2014 2020 if [[ $do_compile = true ]] 2015 2021 then 2016 spalte1=cpp-directives:; spalte2=$ C_PPOPTS2022 spalte1=cpp-directives:; spalte2=$cpp_options 2017 2023 printf "| $spalte1$spalte2 | \n" 2018 zeile=$(echo "$ C_PPOPTS" | cut -c41-)2024 zeile=$(echo "$cpp_options" | cut -c41-) 2019 2025 while [[ "$zeile" != "" ]] 2020 2026 do … … 2025 2031 done 2026 2032 2027 spalte1=compiler-options:; spalte2="$ FOPTS $MODULE_OPTIONS"2033 spalte1=compiler-options:; spalte2="$fopts" 2028 2034 printf "| $spalte1$spalte2 | \n" 2029 zeile=$(echo "$ FOPTS $MODULE_OPTIONS" | cut -c41-)2035 zeile=$(echo "$fopts" | cut -c41-) 2030 2036 while [[ "$zeile" != "" ]] 2031 2037 do … … 2036 2042 done 2037 2043 2038 spalte1=linker-options:; spalte2=$ LOPTS2044 spalte1=linker-options:; spalte2=$lopts 2039 2045 printf "| $spalte1$spalte2 | \n" 2040 zeile=$(echo "$ LOPTS" | cut -c41-)2046 zeile=$(echo "$lopts" | cut -c41-) 2041 2047 while [[ "$zeile" != "" ]] 2042 2048 do … … 2049 2055 spalte1="main program":; spalte2=$mainprog 2050 2056 printf "| $spalte1$spalte2 | \n" 2051 if [[ "$use_makefile" = true ]]2052 then2053 spalte1="using \"make\" for com"; spalte2="piling and linking"2054 printf "| $spalte1$spalte2 | \n"2055 fi2056 # if [[ $vtk_graphics = true ]]2057 # then2058 # spalte1=""; spalte2="wird in C++ - Programm eingebunden (vtk)"2059 # printf "| $spalte1$spalte2 | \n"2060 # fi2061 2057 else 2062 2058 spalte1=executable:; spalte2=$executable … … 2212 2208 fi 2213 2209 2214 if [[ "$use_makefile" = true ]] 2215 then 2216 2217 # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN 2218 line="" 2219 grep "%depository_path" $config_file > tmp_mrun 2220 while read line 2221 do 2222 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2223 then 2224 if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]] 2225 then 2226 global_depository_path=`echo $line | cut -d" " -s -f2` 2227 fi 2228 fi 2229 done < tmp_mrun 2230 2231 line="" 2232 grep " $localhost" $config_file | grep "%depository_path" > tmp_mrun 2233 while read line 2234 do 2235 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2236 then 2237 local_depository_path=`echo $line | cut -d" " -s -f2` 2238 fi 2239 done < tmp_mrun 2240 2241 if [[ "$local_depository_path" = "" ]] 2242 then 2243 if [[ "$global_depository_path" != "" ]] 2244 then 2245 local_depository_path=$global_depository_path 2246 else 2247 printf "\n\n +++ no depository path found in configuration file" 2248 printf "\n for local host \"$localhost\" " 2249 printf "\n please set \"\%depository_path\" in configuration file\n" 2250 locat=config_file; exit 2251 fi 2252 fi 2253 eval local_depository_path=$local_depository_path 2254 2255 basename=`print $mainprog | cut -f1 -d"."` 2256 eval make_depository=${local_depository_path}/${basename}_current_version.tar 2257 if [[ ! -f $make_depository ]] 2258 then 2259 printf "\n" 2260 printf "\n *** WARNING: make depository \"$make_depository\" not found" 2261 printf "\n \"make\" will fail, if the Makefile or other source files are missing\n" 2210 2211 # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN 2212 line="" 2213 grep "%depository_path" $config_file > tmp_mrun 2214 while read line 2215 do 2216 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2217 then 2218 if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]] 2219 then 2220 global_depository_path=`echo $line | cut -d" " -s -f2` 2221 fi 2222 fi 2223 done < tmp_mrun 2224 2225 line="" 2226 grep " $localhost" $config_file | grep "%depository_path" > tmp_mrun 2227 while read line 2228 do 2229 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2230 then 2231 local_depository_path=`echo $line | cut -d" " -s -f2` 2232 fi 2233 done < tmp_mrun 2234 2235 if [[ "$local_depository_path" = "" ]] 2236 then 2237 if [[ "$global_depository_path" != "" ]] 2238 then 2239 local_depository_path=$global_depository_path 2262 2240 else 2263 cp $make_depository $TEMPDIR_COMPILE 2264 cd $TEMPDIR_COMPILE 2265 tar -xf $make_depository > /dev/null 2>&1 2266 cd - > /dev/null 2267 fi 2268 2269 cp SOURCES_FOR_RUN_$fname/* $TEMPDIR_COMPILE 2270 2271 # FALLS USER-INTERFACE VORHANDEN UND AUF DATEI MIT ANDEREM NAMEN 2272 # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS 2273 # MAKEFILE EINTRAGEN 2241 printf "\n\n +++ no depository path found in configuration file" 2242 printf "\n for local host \"$localhost\" " 2243 printf "\n please set \"\%depository_path\" in configuration file\n" 2244 locat=config_file; exit 2245 fi 2246 fi 2247 eval local_depository_path=$local_depository_path 2248 2249 basename=`print $mainprog | cut -f1 -d"."` 2250 eval make_depository=${local_depository_path}/${basename}_current_version.tar 2251 if [[ ! -f $make_depository ]] 2252 then 2253 printf "\n" 2254 printf "\n *** WARNING: make depository \"$make_depository\" not found" 2255 printf "\n \"make\" will fail, if the Makefile or other source files are missing\n" 2256 else 2257 cp $make_depository $TEMPDIR_COMPILE 2274 2258 cd $TEMPDIR_COMPILE 2275 interface_file=`grep -l "END SUBROUTINE user_parin" $source_list` 2276 if [[ "$interface_file" != "" ]] 2277 then 2278 interface_file=`echo $interface_file | cut -d"." -f1` 2279 mv Makefile Makefile_old 2280 sed "s/user_interface/$interface_file/g" Makefile_old > Makefile 2281 fi 2259 tar -xf $make_depository > /dev/null 2>&1 2282 2260 cd - > /dev/null 2283 2261 fi 2262 2263 cp SOURCES_FOR_RUN_$fname/* $TEMPDIR_COMPILE 2264 2265 # FALLS USER-INTERFACE VORHANDEN UND AUF DATEI MIT ANDEREM NAMEN 2266 # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS 2267 # MAKEFILE EINTRAGEN 2268 cd $TEMPDIR_COMPILE 2269 interface_file=`grep -l "END SUBROUTINE user_parin" $source_list` 2270 if [[ "$interface_file" != "" ]] 2271 then 2272 interface_file=`echo $interface_file | cut -d"." -f1` 2273 mv Makefile Makefile_old 2274 sed "s/user_interface/$interface_file/g" Makefile_old > Makefile 2275 fi 2276 cd - > /dev/null 2284 2277 else 2285 2278 cp $executable ${TEMPDIR}/a.out … … 2315 2308 2316 2309 # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS) 2317 if [[ "$use_makefile" = true ]] 2318 then 2319 printf "\n\n\n *** compilation starts \n$striche\n" 2320 printf " *** compilation with make using following options:\n" 2321 printf " compilername: $compiler_name\n" 2322 printf " options: $FOPTS\n" 2323 printf " preprocessor-directives: $C_PPOPTS \n" 2324 printf " linker-options: $LOPTS \n" 2325 printf " source code files: $source_list \n" 2326 2327 if [[ $localhost = nech ]] 2328 then 2329 ssh 136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake -f Makefile PROG=a.out F90=$compiler_name COPT=\"$C_PPOPTS\" F90FLAGS=\"$FOPTS\" LDFLAGS=\"$LOPTS\" " 2330 cp $TEMPDIR_COMPILE/a.out . 2331 [[ $? != 0 ]] && compile_error=true 2332 rm -rf $TEMPDIR_COMPILE 2333 else 2334 make -f Makefile PROG=a.out F90=$compiler_name COPT="$C_PPOPTS" F90FLAGS="$FOPTS" LDFLAGS="$LOPTS" 2335 fi 2336 2337 # UEBERSETZUNG "VON HAND" (OHNE MAKE) 2310 printf "\n\n\n *** compilation starts \n$striche\n" 2311 printf " *** compilation with make using following options:\n" 2312 printf " compilername: $compiler_name\n" 2313 printf " options: $fopts\n" 2314 printf " preprocessor-directives: $cpp_options \n" 2315 printf " linker-options: $lopts \n" 2316 printf " source code files: $source_list \n" 2317 2318 if [[ $localhost = nech ]] 2319 then 2320 ssh 136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2321 cp $TEMPDIR_COMPILE/a.out . 2322 [[ $? != 0 ]] && compile_error=true 2323 rm -rf $TEMPDIR_COMPILE 2338 2324 else 2339 2340 2341 # UEBERSETZUNG DER QUELLTEXT-DATEIEN UND DES HAUPTPROGRAMMS 2342 # $CPPOPTS FUER CPP-PRAEPROZESSOR WURDEN OBEN BESTIMMT 2343 printf "\n\n\n *** compilation starts \n$striche\n" 2344 2345 2346 # VORWEG EVTL. UEBERSETZUNG VON PROGRAMMTEILEN MIT SPEZIELLEN 2347 # COMPILERN UND/ODER COMPILEROPTIONEN. DIESE WERDEN BEI DER SPAETEREN 2348 # EIGENTLICHEN UEBERSETZUNG ALS OBJECT-FILES EINGEBUNDEN 2349 new_source_list="" 2350 for filename in $source_list 2351 do 2352 2353 basename=`print $filename | cut -f1 -d"."` 2354 2355 # EVTL. SPEZIELLEN COMPILER FUER UP BESTIMMEN 2356 comp_var=$(eval echo \$comp_$basename) # \$ liefert evtl. fuer source alternativ vereinbarten Compiler 2357 comp_opt_var=$(eval echo \$$basename) # \$$ liefert evtl. fuer source vereinbarte Compiler-Environment-Variable 2358 2359 if [[ "$comp_var" = "" && "$comp_opt_var" = "" ]] 2360 then 2361 new_source_list="$new_source_list "$filename 2362 else 2363 2364 if [[ "$comp_var" = "" ]] 2365 then 2366 SPECIAL_COMPILER=$compiler_name 2367 else 2368 SPECIAL_COMPILER=$comp_var 2369 fi 2370 2371 if [[ "$comp_opt_var" = "" ]] 2372 then 2373 SPECIAL_FOPTS=$FOPTS 2374 else 2375 SPECIAL_FOPTS="$parallel_options $(eval echo \$$comp_opt_var)" 2376 fi 2377 2378 printf " *** compiling of $filename with special compiler call: $SPECIAL_COMPILER $CPPOPTS -c $SPECIAL_FOPTS \n" 2379 $SPECIAL_COMPILER $C_PPOPTS -c $SPECIAL_FOPTS $MODULE_OPTIONS $filename 2380 if [[ $? != 0 ]] 2381 then 2382 printf "\n +++ compiling error occured" 2383 locat=compile 2384 exit 2385 fi 2386 new_source_list="$new_source_list "${basename}.o 2387 fi 2388 done 2389 source_list="$new_source_list" 2390 2391 2392 # EIGENTLICHE UEBERSETZUNG MIT DEN NORMALEN OPTIONEN 2393 printf " *** compilation with standard options: $compiler_name $FOPTS $MODULE_OPTIONS \n" 2394 printf " preprocessor-directives: $C_PPOPTS \n" 2395 printf " linker-options: $LOPTS \n" 2396 printf " source code files: $source_list \n" 2397 2398 $compiler_name $C_PPOPTS $FOPTS $MODULE_OPTIONS $LOPTS $source_list 2399 2400 fi 2325 make -f Makefile PROG=a.out F90=$compiler_name COPT="$cpp_options" F90FLAGS="$fopts" LDFLAGS="$lopts" 2326 fi 2327 2401 2328 if [[ $? != 0 || "$compile_error" = true || "$module_compile_error" = true ]] 2402 2329 then … … 2907 2834 2908 2835 fi 2909 elif [[ $ host = lcmuk]]2836 elif [[ $(echo $host | cut -c1-2) = lc && $host != lctit ]] 2910 2837 then 2911 2838 … … 3106 3033 echo "set -x" > transfer_${localout[$i]} 3107 3034 echo "cd $tmp_data_catalog/TRANSFER" >> transfer_${localout[$i]} 3108 if [[ $filetransfer_protocol = ftp ]] 3109 then 3110 if [[ $files_for_pes = true ]] 3111 then 3112 printf "\n +++ WARNING: no transfer of catalogs via ftpcopy\n" 3113 fi 3114 printf "\n >>> OUTPUT: ${localout[$i]} by FTP in seperate job to" 3115 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}" 3116 printf "\n or higher cycle\n" 3117 echo "ftpcopy -b -m $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3118 else 3119 printf "\n >>> OUTPUT: ${localout[$i]}$cst by SCP in seperate job to" 3120 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst" 3121 printf "\n or higher cycle\n" 3122 echo "batch_scp $cps -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3123 fi 3035 3036 printf "\n >>> OUTPUT: ${localout[$i]}$cst by SCP in seperate job to" 3037 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst" 3038 printf "\n or higher cycle\n" 3039 echo "batch_scp $cps -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3040 3124 3041 echo "[[ \$? = 0 ]] && rm $file_to_transfer" >> transfer_${localout[$i]} 3125 3042 3126 3043 if [[ $localhost = nech ]] 3127 3044 then 3128 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3045 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3129 3046 else 3130 3047 if [[ "$LOGNAME" = b323013 ]] 3131 3048 then 3132 subjob -v -q c1 -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3049 subjob -v -q c1 -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3133 3050 else 3134 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3051 subjob -d -v -q c1 -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3135 3052 fi 3136 3053 fi … … 3140 3057 # TRANSFER INNERHALB DIESES JOBS 3141 3058 transfer_failed=false 3142 if [[ $filetransfer_protocol = ftp ]] 3143 then 3144 if [[ $files_for_pes = true ]] 3145 then 3146 printf "\n +++ WARNING: no transfer of catalogs via ftpcopy\n" 3147 fi 3148 printf "\n >>> OUTPUT: ${localout[$i]} by FTP to" 3149 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n" 3150 ftpcopy -b -m $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3151 [[ $? != 0 ]] && transfer_failed=true 3152 else 3153 printf "\n >>> OUTPUT: ${localout[$i]}$cst by SCP to" 3154 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n" 3155 batch_scp $cps -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3156 [[ $? != 0 ]] && transfer_failed=true 3157 fi 3059 printf "\n >>> OUTPUT: ${localout[$i]}$cst by SCP to" 3060 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n" 3061 batch_scp $cps -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3062 [[ $? != 0 ]] && transfer_failed=true 3158 3063 3159 3064 # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF … … 3203 3108 echo "set -x" > transfer_${localout[$i]} 3204 3109 echo "cd $tmp_data_catalog/TRANSFER" >> transfer_${localout[$i]} 3205 if [[ $filetransfer_protocol = ftp ]] 3206 then 3207 printf "\n >>> OUTPUT: ${localout[$i]} append by FTP in seperate job to" 3208 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}" 3209 printf "\n or higher cycle\n" 3210 echo "ftpcopy -A -b -m $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3211 else 3212 printf "\n >>> OUTPUT: ${localout[$i]} append by SCP in seperate job to" 3213 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}" 3214 printf "\n or higher cycle\n" 3215 echo "batch_scp -A -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3216 fi 3110 3111 printf "\n >>> OUTPUT: ${localout[$i]} append by SCP in seperate job to" 3112 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}" 3113 printf "\n or higher cycle\n" 3114 echo "batch_scp -A -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3115 3217 3116 echo "[[ \$? = 0 ]] && rm $file_to_transfer" >> transfer_${localout[$i]} 3218 3117 3219 3118 if [[ $localhost = nech ]] 3220 3119 then 3221 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3120 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3222 3121 else 3223 3122 if [[ $LOGNAME = b323013 ]] 3224 3123 then 3225 subjob -v -q c1 -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3124 subjob -v -q c1 -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3226 3125 else 3227 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -f $filetransfer_protocoltransfer_${localout[$i]}3126 subjob -d -v -q c1 -X 0 -m 1000 -t 900 transfer_${localout[$i]} 3228 3127 fi 3229 3128 fi … … 3233 3132 # TRANSFER INNERHALB DIESES JOBS 3234 3133 transfer_failed=false 3235 if [[ $filetransfer_protocol = ftp ]] 3236 then 3237 printf "\n >>> OUTPUT: ${localout[$i]} append by FTP to" 3238 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n" 3239 ftpcopy -A -b -m $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3240 [[ $? != 0 ]] && transfer_failed=true 3241 else 3242 printf "\n >>> OUTPUT: ${localout[$i]} append by SCP to" 3243 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n" 3244 batch_scp -A -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3245 [[ $? != 0 ]] && transfer_failed=true 3246 fi 3134 printf "\n >>> OUTPUT: ${localout[$i]} append by SCP to" 3135 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n" 3136 batch_scp -A -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3137 [[ $? != 0 ]] && transfer_failed=true 3247 3138 3248 3139 # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF … … 3413 3304 if [[ $localhost = ibmh || $localhost = ibmb ]] 3414 3305 then 3415 subjob -d -v -q cdata -X 0 -m 1000 -t 7200 -f $filetransfer_protocolarchive_${frelout[$i]}3306 subjob -d -v -q cdata -X 0 -m 1000 -t 7200 archive_${frelout[$i]} 3416 3307 elif [[ $localhost = nech ]] 3417 3308 then 3418 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 7200 -f $filetransfer_protocolarchive_${frelout[$i]}3309 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 7200 archive_${frelout[$i]} 3419 3310 fi 3420 3311 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" … … 3537 3428 fi 3538 3429 3539 subjob -v -d -q cdata -X 0 -m 1000 -t 7200 -f $filetransfer_protocolarchive_${frelout[$i]}3430 subjob -v -d -q cdata -X 0 -m 1000 -t 7200 archive_${frelout[$i]} 3540 3431 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" 3541 3432 file_saved=true … … 3571 3462 fi 3572 3463 3573 subjob -v -c /pf/b/$usern/job_queue -d -q pp -X 0 -m 1000 -t 7200 -f $filetransfer_protocolarchive_${frelout[$i]}3464 subjob -v -c /pf/b/$usern/job_queue -d -q pp -X 0 -m 1000 -t 7200 archive_${frelout[$i]} 3574 3465 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" 3575 3466 file_saved=true … … 3754 3645 3755 3646 # MRUN-BEFEHL FUER REMOTE-MASCHINE ZUSAMMENSTELLEN 3756 mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname - f $filetransfer_protocol -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_addres -U $return_username -u $remote_username"3647 mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_addres -U $return_username -u $remote_username" 3757 3648 [[ "$cpp_opts" != "" ]] && mrun_com=${mrun_com}" -D \"$cpp_opts\"" 3758 3649 [[ "$global_revision" != "" ]] && mrun_com=${mrun_com}" -G \"$global_revision\"" … … 3827 3718 done 3828 3719 3829 if [[ "$use_makefile" = true ]] 3830 then 3831 # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN 3832 echo "cat > Makefile << \"%END%\"" >> $jobfile 3833 cat $source_catalog/Makefile >> $jobfile 3834 echo " " >> $jobfile 3835 echo "%END%" >> $jobfile 3836 echo " " >> $jobfile 3837 fi 3720 # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN 3721 echo "cat > Makefile << \"%END%\"" >> $jobfile 3722 cat $source_catalog/Makefile >> $jobfile 3723 echo " " >> $jobfile 3724 echo "%END%" >> $jobfile 3725 echo " " >> $jobfile 3838 3726 3839 3727 echo "cd - > /dev/null" >> $jobfile … … 3882 3770 echo "%END%" >> $jobfile 3883 3771 else 3884 if [[ $filetransfer_protocol = ftp ]] 3885 then 3886 echo "ftpcopy -b -o -g -s $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >> $jobfile 3887 else 3888 echo "batch_scp -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >> $jobfile 3889 fi 3772 echo "batch_scp -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >> $jobfile 3890 3773 fi 3891 3774 … … 3936 3819 fi 3937 3820 3938 subjob $job_on_file -h $host -u $remote_username -q $queue -m $memory -N $node_usage -t $cpumax $XOPT $TOPT $OOPT -n $fname - f $filetransfer_protocol -v $jobfile3821 subjob $job_on_file -h $host -u $remote_username -q $queue -m $memory -N $node_usage -t $cpumax $XOPT $TOPT $OOPT -n $fname -v $jobfile 3939 3822 rm -rf $jobfile 3940 3823 -
palm/trunk/SCRIPTS/subjob
r69 r82 1 1 #!/bin/ksh 2 # subjob - Plot-Shellskript Version: @(#)SUBJOB 1.0 13/02/072 # subjob - Plot-Shellskript Version: @(#)SUBJOB 1.0 3 3 # $Id: subjob 54 2007-03-08 00:00:02Z raasch $ 4 4 … … 81 81 # 13/02/07 - Siggi - hpmuk releated code removed 82 82 # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx) 83 # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only 83 84 84 85 85 86 # VARIABLENVEREINBARUNGEN + DEFAULTWERTE 86 87 delete_dayfile=false 87 filetransfer_protocol=scp88 88 locat=normal 89 89 no_default_queue=none … … 180 180 181 181 # PROZEDUROPTIONEN EINLESEN 182 while getopts :c:dD f:h:m:n:N:O:q:t:T:u:vX: option182 while getopts :c:dDh:m:n:N:O:q:t:T:u:vX: option 183 183 do 184 184 case $option in … … 186 186 (d) delete_dayfile=true;; 187 187 (D) no_submit=true;; 188 (f) filetransfer_protocol=$OPTARG;;189 188 (h) remote_host=$OPTARG;; 190 189 (m) memory=$OPTARG;; … … 218 217 printf "\n -d no job-protocol will be created ---" 219 218 printf "\n -D only the job-file will be created ---" 220 printf "\n -f filetransfer protocol scp"221 219 printf "\n -h execution host, available hosts: $remote_host" 222 220 printf "\n ibm, ibmb, ibmh, ibms, ibmy, lcmuk," … … 897 895 then 898 896 [[ $verify = true ]] && printf "\n >>> transfering job to \"$remote_host\"..." 899 if [[ $filetransfer_protocol = scp ]] 900 then 901 if [[ $remote_host = ibms || $remote_host = ibmy ]] # ssh on ibms cannot handle "~/" 902 then 903 job_catalog_save=$job_catalog 904 job_catalog=job_queue 905 elif [[ $remote_host = nech ]] 906 then 907 job_catalog_save=$job_catalog 908 job_catalog=/hpf/b/${remote_user}/job_queue 909 fi 910 if [[ $local_host = decalpha ]] 911 then 912 # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE 913 # PASSWORT AB 914 /bin/scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 915 elif [[ $remote_host = nech ]] 916 then 917 # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ 918 # TRANSFERIERT WERDEN 919 scp $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost 920 else 921 scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 922 fi 923 if [[ $? = 1 ]] 924 then 925 locat=scp; exit 926 fi 927 if [[ $remote_host = ibms ]] 928 then 929 job_catalog=$job_catalog_save 930 fi 897 if [[ $remote_host = ibms || $remote_host = ibmy ]] # ssh on ibms cannot handle "~/" 898 then 899 job_catalog_save=$job_catalog 900 job_catalog=job_queue 901 elif [[ $remote_host = nech ]] 902 then 903 job_catalog_save=$job_catalog 904 job_catalog=/hpf/b/${remote_user}/job_queue 905 fi 906 if [[ $local_host = decalpha ]] 907 then 908 # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE 909 # PASSWORT AB 910 /bin/scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 911 elif [[ $remote_host = nech ]] 912 then 913 # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ 914 # TRANSFERIERT WERDEN 915 scp $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost 931 916 else 932 ftpcopy -s -o $remote_addres $job_to_send "$job_catalog" $job_on_remhost 933 if [[ $? = 1 ]] 934 then 935 locat=ftpcopy; exit 936 fi 917 scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 918 fi 919 if [[ $? = 1 ]] 920 then 921 locat=scp; exit 922 fi 923 if [[ $remote_host = ibms ]] 924 then 925 job_catalog=$job_catalog_save 937 926 fi 938 927 [[ $verify = true ]] && printf "\n >>> finished\n" … … 948 937 then 949 938 [[ $verify = true ]] && printf "\n >>> submitting job using \"qsub\"...\n" 950 if [[ $filetransfer_protocol = scp ]] 951 then 952 if [[ $remote_host != lctit ]] 953 then 954 ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 955 else 956 # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS 957 # MIT SSH, DESHALB AUFRUF PER PIPE 958 # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR 959 print "cd $job_catalog; chmod u+x $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 960 echo "first try" > send_protocol 961 while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]] 962 do 963 if [[ $(cat send_protocol | grep -c "first try") = 1 ]] 964 then 965 printf "\n trying to submit job to TIT cluster..." 966 else 967 printf "\n +++ failed ... trying to submit again ..." 968 fi 969 print "cd $job_catalog; $submcom $job_on_remhost" | ssh $remote_addres -l $remote_user > send_protocol 2>&1 970 cat send_protocol 971 done 972 sleep 10 973 print "cd $job_catalog; rm $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 974 echo "$submcom $job_on_remhost" 975 rm send_protocol 976 fi 939 if [[ $remote_host != lctit ]] 940 then 941 ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 977 942 else 978 if [[ $remote_host = ibms ]] 979 then 980 password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'` 981 echo "echo \"$remote_user\" " > telnet_script 982 echo "sleep 5" >> telnet_script 983 echo "echo \"$password\" " >> telnet_script 984 echo "sleep 10" >> telnet_script 985 echo "echo \"\" " >> telnet_script 986 echo "sleep 2" >> telnet_script 987 echo "echo \"cd $job_catalog; $submcom $job_on_remhost; rm -rf $job_on_remhost\" " >> telnet_script 988 echo "sleep 10" >> telnet_script 989 echo "echo \"exit\" " >> telnet_script 990 991 chmod u+x telnet_script 992 telnet_script | telnet $remote_addres 2>&1 | grep "llsubmit:" 993 rm telnet_script 994 elif [[ $remote_host = t3es ]] 995 then 996 password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'` 997 echo "printf \"$remote_user\\\n\" " > telnet_script 998 echo "sleep 10" >> telnet_script 999 echo "printf \"$password\\\n\" " >> telnet_script 1000 echo "sleep 10" >> telnet_script 1001 echo "printf \"\\\n\" " >> telnet_script 1002 echo "sleep 5" >> telnet_script 1003 echo "printf \"\\\n\" " >> telnet_script 1004 echo "sleep 5" >> telnet_script 1005 echo "printf \"cd $job_catalog; $submcom $job_on_remhost; rm -f $job_on_remhost\\\n\" " >> telnet_script 1006 echo "sleep 10" >> telnet_script 1007 echo "printf \"exit\\\n\" " >> telnet_script 1008 1009 chmod u+x telnet_script 1010 cat telnet_script 1011 telnet_script | telnet $remote_addres | grep $remote_user 1012 rm telnet_script 1013 else 1014 remcom.x $remote_addres "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 1015 fi 1016 fi 943 # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS 944 # MIT SSH, DESHALB AUFRUF PER PIPE 945 # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR 946 print "cd $job_catalog; chmod u+x $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 947 echo "first try" > send_protocol 948 while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]] 949 do 950 if [[ $(cat send_protocol | grep -c "first try") = 1 ]] 951 then 952 printf "\n trying to submit job to TIT cluster..." 953 else 954 printf "\n +++ failed ... trying to submit again ..." 955 fi 956 print "cd $job_catalog; $submcom $job_on_remhost" | ssh $remote_addres -l $remote_user > send_protocol 2>&1 957 cat send_protocol 958 done 959 sleep 10 960 print "cd $job_catalog; rm $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 961 echo "$submcom $job_on_remhost" 962 rm send_protocol 963 fi 964 1017 965 [[ $verify = true ]] && printf " >>> o.k.\n" 1018 966 else -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r77 r82 5 5 Changed: 6 6 ------- 7 All system relevant compile and link options as well as the host identifier (local_host) are specified in the configuration file. 7 8 9 Filetransfer by ftp removed (options -f removed from mrun and mbuild). 10 11 Call of (system-)FLUSH routine moved to new routine local_flush. 12 13 return_addres and return_username are read from ENVPAR-NAMELIST-file. 14 15 Preprocessor strings for different linux clusters changed to "lc", some preprocessor directives renamed (new: __intel_openmp_bug), preprocessor directives for old systems removed 16 17 advec_particles, check_open, cpu_log, cpu_statistics, data_output_dvrp, flow_statistics, header, init_dvrp, init_particles, init_1d_model, init_dvrp, init_pegrid, local_getenv, local_system, local_tremain, local_tremain_ini, modules, run_control 18 19 new: 20 local_flush 21 22 mbuild, mrun 8 23 9 24 Errors: -
palm/trunk/SOURCE/Makefile
r77 r82 4 4 # Actual revisions: 5 5 # ----------------- 6 # 6 # +local_flush 7 7 # 8 8 # Former revisions: … … 51 51 init_particles.f90 init_pegrid.f90 init_pt_anomaly.f90 \ 52 52 init_rankine.f90 init_slope.f90 interaction_droplets_ptq.f90 \ 53 local_ getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \53 local_flush.f90 local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \ 54 54 local_tremain_ini.f90 modules.f90 netcdf.f90 package_parin.f90 \ 55 55 palm.f90 parin.f90 particle_boundary_conds.f90 poisfft.f90 \ … … 81 81 init_dvrp.o init_grid.o init_particles.o init_pegrid.o \ 82 82 init_pt_anomaly.o init_rankine.o init_slope.o \ 83 interaction_droplets_ptq.o local_ getenv.o local_stop.o \83 interaction_droplets_ptq.o local_flush.o local_getenv.o local_stop.o \ 84 84 local_system.o local_tremain.o local_tremain_ini.o modules.o netcdf.o \ 85 85 package_parin.o palm.o parin.o particle_boundary_conds.o poisfft.o \ -
palm/trunk/SOURCE/advec_particles.f90
r77 r82 117 117 ! WRITE (9,*) '--- advec_particles: #1' 118 118 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 119 ! CALL FLUSH_( 9 )119 ! CALL local_flush( 9 ) 120 120 ! ENDIF 121 121 ! … … 165 165 166 166 ! WRITE ( 9, * ) '*** advec_particles: ##0.3' 167 ! CALL FLUSH_( 9 )167 ! CALL local_flush( 9 ) 168 168 ! nd = 0 169 169 ! DO n = 1, number_of_particles … … 172 172 ! IF ( nd /= deleted_particles ) THEN 173 173 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 174 ! CALL FLUSH_( 9 )174 ! CALL local_flush( 9 ) 175 175 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 176 176 ! ENDIF … … 1872 1872 1873 1873 ! WRITE ( 9, * ) '*** advec_particles: ##0.4' 1874 ! CALL FLUSH_( 9 )1874 ! CALL local_flush( 9 ) 1875 1875 ! nd = 0 1876 1876 ! DO n = 1, number_of_particles … … 1879 1879 ! IF ( nd /= deleted_particles ) THEN 1880 1880 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 1881 ! CALL FLUSH_( 9 )1881 ! CALL local_flush( 9 ) 1882 1882 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 1883 1883 ! ENDIF … … 1904 1904 ELSE 1905 1905 ! WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory dt_prel' 1906 ! CALL FLUSH_( 9 )1906 ! CALL local_flush( 9 ) 1907 1907 CALL allocate_prt_memory( number_of_initial_particles ) 1908 1908 ! WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory dt_prel' 1909 ! CALL FLUSH_( 9 )1909 ! CALL local_flush( 9 ) 1910 1910 ENDIF 1911 1911 ENDIF … … 1928 1928 ELSE 1929 1929 ! WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory dt_prel' 1930 ! CALL FLUSH_( 9 )1930 ! CALL local_flush( 9 ) 1931 1931 CALL allocate_tail_memory( number_of_initial_tails ) 1932 1932 ! WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory dt_prel' 1933 ! CALL FLUSH_( 9 )1933 ! CALL local_flush( 9 ) 1934 1934 ENDIF 1935 1935 ENDIF … … 2008 2008 ENDIF 2009 2009 ! WRITE ( 9, * ) '*** advec_particles: after setting the beginning of new tails' 2010 ! CALL FLUSH_( 9 )2010 ! CALL local_flush( 9 ) 2011 2011 2012 2012 number_of_particles = number_of_particles + & … … 2017 2017 2018 2018 ! WRITE ( 9, * ) '*** advec_particles: ##0.5' 2019 ! CALL FLUSH_( 9 )2019 ! CALL local_flush( 9 ) 2020 2020 ! nd = 0 2021 2021 ! DO n = 1, number_of_particles … … 2024 2024 ! IF ( nd /= deleted_particles ) THEN 2025 2025 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2026 ! CALL FLUSH_( 9 )2026 ! CALL local_flush( 9 ) 2027 2027 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2028 2028 ! ENDIF … … 2031 2031 ! WRITE (9,*) '--- advec_particles: #2' 2032 2032 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 2033 ! CALL FLUSH_( 9 )2033 ! CALL local_flush( 9 ) 2034 2034 ! ENDIF 2035 2035 ! DO n = 1, number_of_particles … … 2038 2038 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2039 2039 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2040 ! CALL FLUSH_( 9 )2040 ! CALL local_flush( 9 ) 2041 2041 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2042 2042 ! ENDIF … … 2103 2103 2104 2104 ! WRITE ( 9, * ) '*** advec_particles: ##1' 2105 ! CALL FLUSH_( 9 )2105 ! CALL local_flush( 9 ) 2106 2106 ! nd = 0 2107 2107 ! DO n = 1, number_of_particles … … 2111 2111 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2112 2112 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2113 ! CALL FLUSH_( 9 )2113 ! CALL local_flush( 9 ) 2114 2114 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2115 2115 ! ENDIF … … 2117 2117 ! IF ( nd /= deleted_particles ) THEN 2118 2118 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2119 ! CALL FLUSH_( 9 )2119 ! CALL local_flush( 9 ) 2120 2120 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2121 2121 ! ENDIF … … 2274 2274 2275 2275 ! WRITE ( 9, * ) '*** advec_particles: ##2' 2276 ! CALL FLUSH_( 9 )2276 ! CALL local_flush( 9 ) 2277 2277 ! nd = 0 2278 2278 ! DO n = 1, number_of_particles … … 2282 2282 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2283 2283 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2284 ! CALL FLUSH_( 9 )2284 ! CALL local_flush( 9 ) 2285 2285 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2286 2286 ! ENDIF … … 2288 2288 ! IF ( nd /= deleted_particles ) THEN 2289 2289 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2290 ! CALL FLUSH_( 9 )2290 ! CALL local_flush( 9 ) 2291 2291 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2292 2292 ! ENDIF … … 2313 2313 ELSE 2314 2314 ! WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trrp' 2315 ! CALL FLUSH_( 9 )2315 ! CALL local_flush( 9 ) 2316 2316 CALL allocate_prt_memory( trrp_count_recv ) 2317 2317 ! WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trrp' 2318 ! CALL FLUSH_( 9 )2318 ! CALL local_flush( 9 ) 2319 2319 ENDIF 2320 2320 ENDIF … … 2341 2341 ELSE 2342 2342 ! WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trrpt' 2343 ! CALL FLUSH_( 9 )2343 ! CALL local_flush( 9 ) 2344 2344 CALL allocate_tail_memory( trrpt_count_recv ) 2345 2345 ! WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trrpt' 2346 ! CALL FLUSH_( 9 )2346 ! CALL local_flush( 9 ) 2347 2347 ENDIF 2348 2348 ENDIF … … 2370 2370 ! WRITE (9,*) '--- advec_particles: #3' 2371 2371 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 2372 ! CALL FLUSH_( 9 )2372 ! CALL local_flush( 9 ) 2373 2373 ! ENDIF 2374 2374 … … 2390 2390 ELSE 2391 2391 ! WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trlp' 2392 ! CALL FLUSH_( 9 )2392 ! CALL local_flush( 9 ) 2393 2393 CALL allocate_prt_memory( trlp_count_recv ) 2394 2394 ! WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trlp' 2395 ! CALL FLUSH_( 9 )2395 ! CALL local_flush( 9 ) 2396 2396 ENDIF 2397 2397 ENDIF … … 2418 2418 ELSE 2419 2419 ! WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trlpt' 2420 ! CALL FLUSH_( 9 )2420 ! CALL local_flush( 9 ) 2421 2421 CALL allocate_tail_memory( trlpt_count_recv ) 2422 2422 ! WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trlpt' 2423 ! CALL FLUSH_( 9 )2423 ! CALL local_flush( 9 ) 2424 2424 ENDIF 2425 2425 ENDIF … … 2447 2447 ! WRITE (9,*) '--- advec_particles: #4' 2448 2448 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 2449 ! CALL FLUSH_( 9 )2449 ! CALL local_flush( 9 ) 2450 2450 ! ENDIF 2451 2451 … … 2460 2460 2461 2461 ! WRITE ( 9, * ) '*** advec_particles: ##3' 2462 ! CALL FLUSH_( 9 )2462 ! CALL local_flush( 9 ) 2463 2463 ! nd = 0 2464 2464 ! DO n = 1, number_of_particles … … 2468 2468 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2469 2469 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2470 ! CALL FLUSH_( 9 )2470 ! CALL local_flush( 9 ) 2471 2471 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2472 2472 ! ENDIF … … 2474 2474 ! IF ( nd /= deleted_particles ) THEN 2475 2475 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2476 ! CALL FLUSH_( 9 )2476 ! CALL local_flush( 9 ) 2477 2477 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2478 2478 ! ENDIF … … 2538 2538 2539 2539 ! WRITE ( 9, * ) '*** advec_particles: ##4' 2540 ! CALL FLUSH_( 9 )2540 ! CALL local_flush( 9 ) 2541 2541 ! nd = 0 2542 2542 ! DO n = 1, number_of_particles … … 2546 2546 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2547 2547 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2548 ! CALL FLUSH_( 9 )2548 ! CALL local_flush( 9 ) 2549 2549 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2550 2550 ! ENDIF … … 2552 2552 ! IF ( nd /= deleted_particles ) THEN 2553 2553 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2554 ! CALL FLUSH_( 9 )2554 ! CALL local_flush( 9 ) 2555 2555 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2556 2556 ! ENDIF … … 2715 2715 2716 2716 ! WRITE ( 9, * ) '*** advec_particles: ##5' 2717 ! CALL FLUSH_( 9 )2717 ! CALL local_flush( 9 ) 2718 2718 ! nd = 0 2719 2719 ! DO n = 1, number_of_particles … … 2723 2723 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2724 2724 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2725 ! CALL FLUSH_( 9 )2725 ! CALL local_flush( 9 ) 2726 2726 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2727 2727 ! ENDIF … … 2729 2729 ! IF ( nd /= deleted_particles ) THEN 2730 2730 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2731 ! CALL FLUSH_( 9 )2731 ! CALL local_flush( 9 ) 2732 2732 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2733 2733 ! ENDIF … … 2754 2754 ELSE 2755 2755 ! WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trnp' 2756 ! CALL FLUSH_( 9 )2756 ! CALL local_flush( 9 ) 2757 2757 CALL allocate_prt_memory( trnp_count_recv ) 2758 2758 ! WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trnp' 2759 ! CALL FLUSH_( 9 )2759 ! CALL local_flush( 9 ) 2760 2760 ENDIF 2761 2761 ENDIF … … 2782 2782 ELSE 2783 2783 ! WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trnpt' 2784 ! CALL FLUSH_( 9 )2784 ! CALL local_flush( 9 ) 2785 2785 CALL allocate_tail_memory( trnpt_count_recv ) 2786 2786 ! WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trnpt' 2787 ! CALL FLUSH_( 9 )2787 ! CALL local_flush( 9 ) 2788 2788 ENDIF 2789 2789 ENDIF … … 2811 2811 ! WRITE (9,*) '--- advec_particles: #5' 2812 2812 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 2813 ! CALL FLUSH_( 9 )2813 ! CALL local_flush( 9 ) 2814 2814 ! ENDIF 2815 2815 … … 2831 2831 ELSE 2832 2832 ! WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trsp' 2833 ! CALL FLUSH_( 9 )2833 ! CALL local_flush( 9 ) 2834 2834 CALL allocate_prt_memory( trsp_count_recv ) 2835 2835 ! WRITE ( 9, * ) '*** advec_particles: after allocate_prt_memory trsp' 2836 ! CALL FLUSH_( 9 )2836 ! CALL local_flush( 9 ) 2837 2837 ENDIF 2838 2838 ENDIF … … 2859 2859 ELSE 2860 2860 ! WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trspt' 2861 ! CALL FLUSH_( 9 )2861 ! CALL local_flush( 9 ) 2862 2862 CALL allocate_tail_memory( trspt_count_recv ) 2863 2863 ! WRITE ( 9, * ) '*** advec_particles: after allocate_tail_memory trspt' 2864 ! CALL FLUSH_( 9 )2864 ! CALL local_flush( 9 ) 2865 2865 ENDIF 2866 2866 ENDIF … … 2888 2888 ! WRITE (9,*) '--- advec_particles: #6' 2889 2889 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 2890 ! CALL FLUSH_( 9 )2890 ! CALL local_flush( 9 ) 2891 2891 ! ENDIF 2892 2892 … … 2901 2901 2902 2902 ! WRITE ( 9, * ) '*** advec_particles: ##6' 2903 ! CALL FLUSH_( 9 )2903 ! CALL local_flush( 9 ) 2904 2904 ! nd = 0 2905 2905 ! DO n = 1, number_of_particles … … 2909 2909 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 2910 2910 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 2911 ! CALL FLUSH_( 9 )2911 ! CALL local_flush( 9 ) 2912 2912 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2913 2913 ! ENDIF … … 2915 2915 ! IF ( nd /= deleted_particles ) THEN 2916 2916 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 2917 ! CALL FLUSH_( 9 )2917 ! CALL local_flush( 9 ) 2918 2918 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 2919 2919 ! ENDIF … … 3133 3133 3134 3134 ! WRITE ( 9, * ) '*** advec_particles: ##7' 3135 ! CALL FLUSH_( 9 )3135 ! CALL local_flush( 9 ) 3136 3136 ! nd = 0 3137 3137 ! DO n = 1, number_of_particles … … 3141 3141 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 3142 3142 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 3143 ! CALL FLUSH_( 9 )3143 ! CALL local_flush( 9 ) 3144 3144 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3145 3145 ! ENDIF … … 3147 3147 ! IF ( nd /= deleted_particles ) THEN 3148 3148 ! WRITE (9,*) '*** nd=',nd,' deleted_particles=',deleted_particles 3149 ! CALL FLUSH_( 9 )3149 ! CALL local_flush( 9 ) 3150 3150 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3151 3151 ! ENDIF … … 3167 3167 ! IF ( nd /= deleted_particles ) THEN 3168 3168 ! WRITE (9,*) '*** advec_part nd=',nd,' deleted_particles=',deleted_particles 3169 ! CALL FLUSH_( 9 )3169 ! CALL local_flush( 9 ) 3170 3170 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3171 3171 ! ENDIF … … 3189 3189 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_tails,' #oftails)' 3190 3190 ! WRITE (9,*) ' id=',new_tail_id(n) 3191 ! CALL FLUSH_( 9 )3191 ! CALL local_flush( 9 ) 3192 3192 ENDIF 3193 3193 ENDDO … … 3196 3196 ! IF ( nd /= deleted_tails .AND. use_particle_tails ) THEN 3197 3197 ! WRITE (9,*) '*** advec_part nd=',nd,' deleted_tails=',deleted_tails 3198 ! CALL FLUSH_( 9 )3198 ! CALL local_flush( 9 ) 3199 3199 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3200 3200 ! ENDIF … … 3211 3211 ! WRITE (9,*) ' new_tail_id=', new_tail_id(particles(n)%tail_id), & 3212 3212 ! ' of (',number_of_tails,')' 3213 ! CALL FLUSH_( 9 )3213 ! CALL local_flush( 9 ) 3214 3214 ! ENDIF 3215 3215 particles(n)%tail_id = new_tail_id(particles(n)%tail_id) … … 3219 3219 ! IF ( nn /= number_of_tails .AND. use_particle_tails ) THEN 3220 3220 ! WRITE (9,*) '*** advec_part #of_tails=',number_of_tails,' nn=',nn 3221 ! CALL FLUSH_( 9 )3221 ! CALL local_flush( 9 ) 3222 3222 ! DO n = 1, number_of_particles 3223 3223 ! WRITE (9,*) 'prt# ',n,' tail_id=',particles(n)%tail_id, & … … 3233 3233 ! WRITE (9,*) '--- advec_particles: #7' 3234 3234 ! WRITE (9,*) ' #of p=',number_of_particles,' #of t=',number_of_tails 3235 ! CALL FLUSH_( 9 )3235 ! CALL local_flush( 9 ) 3236 3236 ! ENDIF 3237 3237 ! WRITE ( 9, * ) '*** advec_particles: ##8' 3238 ! CALL FLUSH_( 9 )3238 ! CALL local_flush( 9 ) 3239 3239 ! DO n = 1, number_of_particles 3240 3240 ! IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) & … … 3242 3242 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 3243 3243 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 3244 ! CALL FLUSH_( 9 )3244 ! CALL local_flush( 9 ) 3245 3245 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3246 3246 ! ENDIF … … 3252 3252 3253 3253 ! WRITE ( 9, * ) '*** advec_particles: ##9' 3254 ! CALL FLUSH_( 9 )3254 ! CALL local_flush( 9 ) 3255 3255 ! DO n = 1, number_of_particles 3256 3256 ! IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) & … … 3258 3258 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 3259 3259 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 3260 ! CALL FLUSH_( 9 )3260 ! CALL local_flush( 9 ) 3261 3261 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3262 3262 ! ENDIF … … 3341 3341 CALL user_particle_attributes 3342 3342 ! WRITE ( 9, * ) '*** advec_particles: ##10' 3343 ! CALL FLUSH_( 9 )3343 ! CALL local_flush( 9 ) 3344 3344 ! DO n = 1, number_of_particles 3345 3345 ! IF ( particles(n)%tail_id<0 .OR. particles(n)%tail_id>number_of_tails ) & … … 3347 3347 ! WRITE (9,*) '+++ n=',n,' (of ',number_of_particles,')' 3348 3348 ! WRITE (9,*) ' id=',particles(n)%tail_id,' of (',number_of_tails,')' 3349 ! CALL FLUSH_( 9 )3349 ! CALL local_flush( 9 ) 3350 3350 ! CALL MPI_ABORT( comm2d, 9999, ierr ) 3351 3351 ! ENDIF … … 3366 3366 !-- next tailpoint 3367 3367 ! WRITE ( 9, * ) '*** advec_particles: ##10.1 nn=',nn 3368 ! CALL FLUSH_( 9 )3368 ! CALL local_flush( 9 ) 3369 3369 IF ( minimum_tailpoint_distance /= 0.0 ) THEN 3370 3370 distance = ( particle_tail_coordinates(1,1,nn) - & … … 3376 3376 ENDIF 3377 3377 ! WRITE ( 9, * ) '*** advec_particles: ##10.2' 3378 ! CALL FLUSH_( 9 )3378 ! CALL local_flush( 9 ) 3379 3379 ! 3380 3380 !-- First, increase the index of all existings tailpoints by one … … 3395 3395 ENDIF 3396 3396 ! WRITE ( 9, * ) '*** advec_particles: ##10.3' 3397 ! CALL FLUSH_( 9 )3397 ! CALL local_flush( 9 ) 3398 3398 ! 3399 3399 !-- In any case, store the new point at the beginning of the tail … … 3403 3403 particle_tail_coordinates(1,4,nn) = particles(n)%color 3404 3404 ! WRITE ( 9, * ) '*** advec_particles: ##10.4' 3405 ! CALL FLUSH_( 9 )3405 ! CALL local_flush( 9 ) 3406 3406 ! 3407 3407 !-- Increase the age of the tailpoints … … 3418 3418 ENDIF 3419 3419 ! WRITE ( 9, * ) '*** advec_particles: ##10.5' 3420 ! CALL FLUSH_( 9 )3420 ! CALL local_flush( 9 ) 3421 3421 3422 3422 ENDIF … … 3426 3426 ENDIF 3427 3427 ! WRITE ( 9, * ) '*** advec_particles: ##11' 3428 ! CALL FLUSH_( 9 )3428 ! CALL local_flush( 9 ) 3429 3429 3430 3430 ! … … 3533 3533 ENDIF 3534 3534 WRITE (9,*) '*** Request: ',new_maximum_number,' new_maximum_number(tails)' 3535 ! CALL FLUSH_( 9 )3535 ! CALL local_flush( 9 ) 3536 3536 3537 3537 tmp_tail(:,:,1:number_of_tails) = & -
palm/trunk/SOURCE/check_open.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Call of local_getenv removed, preprocessor directives for old systems removed 7 7 ! 8 8 ! Former revisions: … … 42 42 43 43 CHARACTER (LEN=2) :: suffix 44 CHARACTER (LEN=20) :: return_addres, return_usern,xtext = 'time in s'44 CHARACTER (LEN=20) :: xtext = 'time in s' 45 45 CHARACTER (LEN=30) :: filename 46 46 CHARACTER (LEN=40) :: avs_coor_file, avs_coor_file_localname, & … … 151 151 STATUS='OLD' ) 152 152 ELSE 153 #if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej5 )154 !155 !-- Declare a cache layer for faster I/O156 CALL ASNUNIT ( 13, '-F cachea:512:1:1', ierr1 )157 #endif158 153 OPEN ( 13, FILE='BININ/'//myid_char, FORM='UNFORMATTED', & 159 154 STATUS='OLD' ) … … 174 169 !-- directory created by PE0 can open their file 175 170 CALL MPI_BARRIER( comm2d, ierr ) 176 #endif177 #if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej5 )178 !179 !-- Declare a cache layer for faster I/O180 CALL ASNUNIT ( 14, '-F cachea:512:1:1', ierr1 )181 171 #endif 182 172 OPEN ( 14, FILE='BINOUT/'//myid_char_14, FORM='UNFORMATTED', & … … 342 332 CASE ( 30 ) 343 333 344 345 #if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej5 )346 !347 !-- In case of active data compression 32Bit integer output348 IF ( do3d_compress ) THEN349 CALL ASNUNIT( 30, '-F f77 -N ieee_32', ierr1 )350 ENDIF351 #endif352 353 334 OPEN ( 30, FILE='PLOT3D_DATA'//myid_char, FORM='UNFORMATTED' ) 354 335 ! … … 369 350 !-- Therefore path information has to be obtained first. 370 351 IF ( avs_output ) THEN 371 CALL local_getenv( 'return_addres', 13, return_addres, iaddres )372 CALL local_getenv( 'return_username', 15, return_usern, iusern)352 iaddres = LEN_TRIM( return_addres ) 353 iusern = LEN_TRIM( return_username ) 373 354 374 355 OPEN ( 3, FILE='OUTPUT_FILE_CONNECTIONS', FORM='FORMATTED' ) … … 433 414 !-- really transferred. 434 415 command = TRIM( batch_scp ) // ' -n -u ' // & 435 return_usern (1:iusern) // ' ' // &416 return_username(1:iusern) // ' ' // & 436 417 return_addres(1:iaddres) // ' /etc/passwd "' // & 437 418 TRIM( avs_coor_file_catalog ) // '" ' // & … … 445 426 !-- Determine the data file name 446 427 command = TRIM( batch_scp ) // ' -n -u ' // & 447 return_usern (1:iusern) // ' ' // &428 return_username(1:iusern) // ' ' // & 448 429 return_addres(1:iaddres) // ' /etc/passwd "' // & 449 430 TRIM( avs_data_file_catalog ) // '" ' // & -
palm/trunk/SOURCE/cpu_log.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! preprocessor directives for old systems removed 7 8 ! 8 9 ! Former revisions: … … 34 35 TYPE(logpoint) :: log_event 35 36 36 #if defined( __lc muk ) || defined( __lctit ) || defined( __hpmuk) || defined( __decalpha ) || defined( __nec )37 #if defined( __lc ) || defined( __decalpha ) || defined( __nec ) 37 38 INTEGER :: count, count_rate 38 39 #elif defined( __ibm ) 39 40 INTEGER(8) :: IRTC 40 #elif defined( __t3eb )41 REAL :: TIMEF42 41 #endif 43 42 … … 57 56 ! 58 57 !-- Take current time 59 #if defined( __lc muk ) || defined( __lctit ) || defined( __hpmuk) || defined( __decalpha ) || defined( __nec )58 #if defined( __lc ) || defined( __decalpha ) || defined( __nec ) 60 59 CALL SYSTEM_CLOCK( count, count_rate ) 61 60 mtime = REAL( count ) / REAL( count_rate ) 62 61 #elif defined( __ibm ) 63 62 mtime = IRTC( ) * 1E-9 64 !#elif defined( __vpp )65 ! CALL CLOCKV ( mtimevec, mtime, 0, 2 )66 #elif defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )67 #if defined( __parallel )68 IF ( .NOT. PRESENT( barrierwait ) ) THEN69 CALL MPI_BARRIER( comm2d, ierr )70 CONTINUE71 ENDIF72 #endif73 mtime = TIMEF( )74 mtime = mtime * 0.00175 63 #else 76 64 IF ( myid == 0 ) THEN -
palm/trunk/SOURCE/cpu_statistics.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor directives for old systems removed 7 7 ! 8 8 ! Former revisions: … … 37 37 REAL, DIMENSION(:,:), ALLOCATABLE :: pe_log_points 38 38 39 40 !#if defined( __hpmuk ) && ! defined( __chinook )41 ! norm = clock_ticks_per_second()42 !#endif43 39 44 40 ! -
palm/trunk/SOURCE/data_output_dvrp.f90
r77 r82 32 32 ! Actual revisions: 33 33 ! ----------------- 34 ! Preprocessor strings for different linux clusters changed to "lc", 35 ! routine local_flush is used for buffer flushing 34 36 ! TEST: write statements 35 37 ! … … 84 86 85 87 WRITE ( 9, * ) '*** myid=', myid, ' Anfang data_output_dvrp' 86 #if defined( __ibm ) 87 CALL FLUSH_( 9 ) 88 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 89 CALL FLUSH( 9 ) 90 #endif 88 CALL local_flush( 9 ) 91 89 CALL cpu_log( log_point(27), 'data_output_dvrp', 'start' ) 92 90 … … 104 102 lock_steering_update = .TRUE. 105 103 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update' 106 #if defined( __ibm ) 107 CALL FLUSH_( 9 ) 108 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 109 CALL FLUSH( 9 ) 110 #endif 104 CALL local_flush( 9 ) 111 105 CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp ) 112 106 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update' 113 #if defined( __ibm ) 114 CALL FLUSH_( 9 ) 115 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 116 CALL FLUSH( 9 ) 117 #endif 107 CALL local_flush( 9 ) 118 108 lock_steering_update = .FALSE. 119 109 ENDIF … … 150 140 151 141 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang particles' 152 #if defined( __ibm ) 153 CALL FLUSH_( 9 ) 154 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 155 CALL FLUSH( 9 ) 156 #endif 142 CALL local_flush( 9 ) 157 143 ! 158 144 !-- DVRP-Calls for plotting particles: … … 183 169 WRITE (9,*) '--- before ALLOCATE simtime=',simulated_time,' #of_tails=', number_of_tails, & 184 170 ' max#of_tp=', maximum_number_of_tailpoints 185 #if defined( __ibm ) 186 CALL FLUSH_( 9 ) 187 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 188 CALL FLUSH( 9 ) 189 #endif 171 CALL local_flush( 9 ) 190 172 ALLOCATE( psize(number_of_tails), p_t(number_of_tails), & 191 173 p_c(number_of_tails*maximum_number_of_tailpoints), & … … 194 176 p_z(number_of_tails*maximum_number_of_tailpoints) ) 195 177 WRITE (9,*) '--- after ALLOCATE' 196 #if defined( __ibm ) 197 CALL FLUSH_( 9 ) 198 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 199 CALL FLUSH( 9 ) 200 #endif 178 CALL local_flush( 9 ) 201 179 psize = 0.0; p_t = 0; p_c = 0.0; p_x = 0.0; p_y = 0.0 202 180 p_z = 0.0; … … 209 187 IF ( simulated_time > 1338.0 ) THEN 210 188 WRITE (9,*) '--- particle ',n,' tail_id=',nn,' #of_tp=',particles(n)%tailpoints 211 #if defined( __ibm ) 212 CALL FLUSH_( 9 ) 213 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 214 CALL FLUSH( 9 ) 215 #endif 189 CALL local_flush( 9 ) 216 190 ENDIF 217 191 DO j = 1, particles(n)%tailpoints … … 227 201 WRITE (9,*) '--- tp= ',i,' x=',p_x(i),' y=',p_y(i), & 228 202 ' z=',p_z(i),' c=',p_c(i) 229 #if defined( __ibm ) 230 CALL FLUSH_( 9 ) 231 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 232 CALL FLUSH( 9 ) 233 #endif 203 CALL local_flush( 9 ) 234 204 ENDIF 235 205 ENDDO … … 238 208 IF ( simulated_time > 1338.0 ) THEN 239 209 WRITE (9,*) '--- t= ',k,' psize=',psize(k),' p_t=',p_t(k) 240 #if defined( __ibm ) 241 CALL FLUSH_( 9 ) 242 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 243 CALL FLUSH( 9 ) 244 #endif 210 CALL local_flush( 9 ) 245 211 ENDIF 246 212 ENDIF 247 213 ENDDO 248 214 WRITE (9,*) '--- after locally storing the particle attributes' 249 #if defined( __ibm ) 250 CALL FLUSH_( 9 ) 251 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 252 CALL FLUSH( 9 ) 253 #endif 215 CALL local_flush( 9 ) 254 216 ENDIF 255 217 … … 275 237 ELSE 276 238 WRITE (9,*) '--- before DVRP_PARTICLES' 277 #if defined( __ibm ) 278 CALL FLUSH_( 9 ) 279 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 280 CALL FLUSH( 9 ) 281 #endif 239 CALL local_flush( 9 ) 282 240 CALL DVRP_PARTICLES( m-1, number_of_tails, p_x, p_y, p_z, 15, & 283 241 psize, p_c, p_t ) … … 292 250 WRITE (9,*) 'p_t =', p_t 293 251 294 #if defined( __ibm ) 295 CALL FLUSH_( 9 ) 296 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 297 CALL FLUSH( 9 ) 298 #endif 252 CALL local_flush( 9 ) 299 253 ENDIF 300 254 ENDIF … … 302 256 CALL DVRP_VISUALIZE( m-1, 3, dvrp_filecount ) 303 257 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende particles' 304 #if defined( __ibm ) 305 CALL FLUSH_( 9 ) 306 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 307 CALL FLUSH( 9 ) 308 #endif 258 CALL local_flush( 9 ) 309 259 310 260 DEALLOCATE( psize, p_c, p_t, p_x, p_y, p_z ) … … 456 406 457 407 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang isosurface' 458 #if defined( __ibm ) 459 CALL FLUSH_( 9 ) 460 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 461 CALL FLUSH( 9 ) 462 #endif 408 CALL local_flush( 9 ) 463 409 ! 464 410 !-- DVRP-Calls for plotting isosurfaces: … … 481 427 CALL DVRP_VISUALIZE( m-1, 1, dvrp_filecount ) 482 428 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface' 483 #if defined( __ibm ) 484 CALL FLUSH_( 9 ) 485 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 486 CALL FLUSH( 9 ) 487 #endif 429 CALL local_flush( 9 ) 488 430 489 431 CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'stop' ) … … 492 434 493 435 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang slicer' 494 #if defined( __ibm ) 495 CALL FLUSH_( 9 ) 496 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 497 CALL FLUSH( 9 ) 498 #endif 436 CALL local_flush( 9 ) 499 437 ! 500 438 !-- DVRP-Calls for plotting slicers: … … 526 464 527 465 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende slicer' 528 #if defined( __ibm ) 529 CALL FLUSH_( 9 ) 530 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 531 CALL FLUSH( 9 ) 532 #endif 466 CALL local_flush( 9 ) 533 467 ENDIF 534 468 … … 545 479 CALL cpu_log( log_point(27), 'data_output_dvrp', 'stop' ) 546 480 WRITE ( 9, * ) '*** myid=', myid, ' Ende data_output_dvrp' 547 #if defined( __ibm ) 548 CALL FLUSH_( 9 ) 549 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 550 CALL FLUSH( 9 ) 551 #endif 481 CALL local_flush( 9 ) 552 482 553 483 #endif -
palm/trunk/SOURCE/flow_statistics.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Cpp-directive lcmuk changed to intel_openmp_bug 7 7 ! 8 8 ! Former revisions: … … 98 98 tn = 0 99 99 !$OMP PARALLEL PRIVATE( i, j, k, tn ) 100 #if defined( __ lcmuk)100 #if defined( __intel_openmp_bug ) 101 101 tn = omp_get_thread_num() 102 102 #else … … 260 260 !-- rearranged according to the staggered grid. 261 261 tn = 0 262 #if defined( __ lcmuk)262 #if defined( __intel_openmp_bug ) 263 263 !$OMP PARALLEL PRIVATE( i, j, k, pts, sums_ll, sums_l_eper, sums_l_etot, & 264 264 !$OMP tn, ust, ust2, u2, vst, vst2, v2, w2 ) -
palm/trunk/SOURCE/header.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! routine local_flush is used for buffer flushing 7 8 ! 8 9 ! Former revisions: … … 1109 1110 WRITE ( io, 99 ) 1110 1111 1111 #if defined( __ibm )1112 1112 ! 1113 1113 !-- Write buffer contents to disc immediately 1114 CALL FLUSH_( io ) 1115 #elif defined( __lcmuk ) || defined( __nec ) 1116 CALL FLUSH( io ) 1117 #endif 1114 CALL local_flush( io ) 1118 1115 1119 1116 ! -
palm/trunk/SOURCE/init_1d_model.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! routine local_flush is used for buffer flushing 7 8 ! 8 9 ! Former revisions: … … 770 771 WRITE ( 15, 101 ) current_timestep_number_1d, simulated_time_chr, & 771 772 dt_1d, umax, vmax, us1d, alpha, energy 772 #if defined( __ibm )773 773 ! 774 774 !-- Write buffer contents to disc immediately 775 CALL FLUSH_( 15 ) 776 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 777 CALL FLUSH( 15 ) 778 #endif 775 CALL local_flush( 15 ) 779 776 780 777 ENDIF … … 955 952 WRITE ( 17, 101 ) 956 953 957 #if defined( __ibm )958 954 ! 959 955 !-- Write buffer contents to disc immediately 960 CALL FLUSH_( 17 ) 961 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 962 CALL FLUSH( 17 ) 963 #endif 956 CALL local_flush( 17 ) 964 957 965 958 ENDIF -
palm/trunk/SOURCE/init_dvrp.f90
r39 r82 3 3 !------------------------------------------------------------------------------! 4 4 ! Actual revisions: 5 ! ----------------- 5 ! ----------------- 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! routine local_flush is used for buffer flushing 6 8 ! Test output of isosurface on camera file 7 9 ! TEST: print* statements … … 145 147 146 148 WRITE ( 9, * ) '*** vor dvrp_output_rtsp' 147 #if defined( __ibm ) 148 CALL FLUSH_( 9 ) 149 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 150 CALL FLUSH( 9 ) 151 #endif 149 CALL local_flush( 9 ) 152 150 153 151 dvrp_file = TRIM( mode_dvrp(m) ) // '/camera.dvr' … … 157 155 dvrp_file_c ) 158 156 WRITE ( 9, * ) '*** nach dvrp_output_rtsp' 159 #if defined( __ibm ) 160 CALL FLUSH_( 9 ) 161 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 162 CALL FLUSH( 9 ) 163 #endif 157 CALL local_flush( 9 ) 164 158 165 159 ELSEIF ( dvrp_output == 'ftp' ) THEN … … 185 179 CALL DVRP_CAMERA( m-1, center, distance ) 186 180 WRITE ( 9, * ) '*** #1' 187 #if defined( __ibm ) 188 CALL FLUSH_( 9 ) 189 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 190 CALL FLUSH( 9 ) 191 #endif 181 CALL local_flush( 9 ) 192 182 193 183 ! … … 202 192 CALL DVRP_EXIT( m-1 ) 203 193 WRITE ( 9, * ) '*** #2' 204 #if defined( __ibm ) 205 CALL FLUSH_( 9 ) 206 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 207 CALL FLUSH( 9 ) 208 #endif 194 CALL local_flush( 9 ) 209 195 210 196 … … 223 209 dvrp_file_c ) 224 210 WRITE ( 9, * ) '*** #3' 225 #if defined( __ibm ) 226 CALL FLUSH_( 9 ) 227 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 228 CALL FLUSH( 9 ) 229 #endif 211 CALL local_flush( 9 ) 230 212 231 213 ELSEIF ( dvrp_output == 'ftp' ) THEN … … 274 256 CALL DVRP_MATERIAL_RGB( m-1, 1, 0.8, 0.7, 0.6, 0.0 ) 275 257 WRITE ( 9, * ) '*** #4' 276 #if defined( __ibm ) 277 CALL FLUSH_( 9 ) 278 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 279 CALL FLUSH( 9 ) 280 #endif 258 CALL local_flush( 9 ) 281 259 282 260 ! … … 292 270 ENDDO 293 271 WRITE ( 9, * ) '*** #4.1' 294 #if defined( __ibm ) 295 CALL FLUSH_( 9 ) 296 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 297 CALL FLUSH( 9 ) 298 #endif 272 CALL local_flush( 9 ) 299 273 CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, & 300 274 cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) 301 275 WRITE ( 9, * ) '*** #4.2' 302 #if defined( __ibm ) 303 CALL FLUSH_( 9 ) 304 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 305 CALL FLUSH( 9 ) 306 #endif 276 CALL local_flush( 9 ) 307 277 CALL DVRP_THRESHOLD( m-1, 1.0 ) 308 278 WRITE ( 9, * ) '*** #4.3' 309 #if defined( __ibm ) 310 CALL FLUSH_( 9 ) 311 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 312 CALL FLUSH( 9 ) 313 #endif 279 CALL local_flush( 9 ) 314 280 CALL DVRP_VISUALIZE( m-1, 1, 0 ) 315 281 WRITE ( 9, * ) '*** #4.4' 316 #if defined( __ibm ) 317 CALL FLUSH_( 9 ) 318 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 319 CALL FLUSH( 9 ) 320 #endif 282 CALL local_flush( 9 ) 321 283 322 284 DEALLOCATE( local_pf ) … … 324 286 CALL DVRP_EXIT( m-1 ) 325 287 WRITE ( 9, * ) '*** #5' 326 #if defined( __ibm ) 327 CALL FLUSH_( 9 ) 328 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 329 CALL FLUSH( 9 ) 330 #endif 288 CALL local_flush( 9 ) 331 289 332 290 ! … … 344 302 dvrp_file_c ) 345 303 WRITE ( 9, * ) '*** #6' 346 #if defined( __ibm ) 347 CALL FLUSH_( 9 ) 348 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 349 CALL FLUSH( 9 ) 350 #endif 304 CALL local_flush( 9 ) 351 305 352 306 ELSEIF ( dvrp_output == 'ftp' ) THEN … … 395 349 CALL DVRP_MATERIAL_RGB( m-1, 1, 0.0, 0.6, 0.0, 0.0 ) 396 350 WRITE ( 9, * ) '*** #7' 397 #if defined( __ibm ) 398 CALL FLUSH_( 9 ) 399 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 400 CALL FLUSH( 9 ) 401 #endif 351 CALL local_flush( 9 ) 402 352 403 353 ! … … 416 366 CALL DVRP_EXIT( m-1 ) 417 367 WRITE ( 9, * ) '*** #8' 418 #if defined( __ibm ) 419 CALL FLUSH_( 9 ) 420 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 421 CALL FLUSH( 9 ) 422 #endif 368 CALL local_flush( 9 ) 423 369 424 370 … … 461 407 name_c = TRIM( do3d(0,vn) ) 462 408 WRITE ( 9, * ) '*** #9' 463 #if defined( __ibm ) 464 CALL FLUSH_( 9 ) 465 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 466 CALL FLUSH( 9 ) 467 #endif 409 CALL local_flush( 9 ) 468 410 CALL DVRP_STEERING_INIT( m-1, name_c, steering_dvrp(pn)%min, & 469 411 steering_dvrp(pn)%max, threshold(tv) ) 470 412 WRITE ( 9, * ) '*** #10' 471 #if defined( __ibm ) 472 CALL FLUSH_( 9 ) 473 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 474 CALL FLUSH( 9 ) 475 #endif 413 CALL local_flush( 9 ) 476 414 477 415 ELSEIF ( mode_dvrp(pn)(1:6) == 'slicer' ) THEN … … 517 455 518 456 WRITE ( 9, * ) '*** #11' 519 #if defined( __ibm ) 520 CALL FLUSH_( 9 ) 521 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 522 CALL FLUSH( 9 ) 523 #endif 457 CALL local_flush( 9 ) 524 458 525 459 dvrp_file = TRIM( mode_dvrp(m) ) // '/*****.dvr' … … 529 463 dvrp_file_c ) 530 464 WRITE ( 9, * ) '*** #12' 531 #if defined( __ibm ) 532 CALL FLUSH_( 9 ) 533 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 534 CALL FLUSH( 9 ) 535 #endif 465 CALL local_flush( 9 ) 536 466 537 467 ELSEIF ( dvrp_output == 'ftp' ) THEN … … 585 515 !-- Define the grid used by dvrp 586 516 WRITE ( 9, * ) '*** #13' 587 #if defined( __ibm ) 588 CALL FLUSH_( 9 ) 589 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 590 CALL FLUSH( 9 ) 591 #endif 517 CALL local_flush( 9 ) 592 518 593 519 CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, ycoor_dvrp, & 594 520 zcoor_dvrp ) 595 521 WRITE ( 9, * ) '*** #14' 596 #if defined( __ibm ) 597 CALL FLUSH_( 9 ) 598 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 599 CALL FLUSH( 9 ) 600 #endif 522 CALL local_flush( 9 ) 601 523 602 524 … … 631 553 !-- Initialize logging of calls by DVRP graphic software 632 554 WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_INIT' 633 #if defined( __ibm ) 634 CALL FLUSH_( 9 ) 635 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 636 CALL FLUSH( 9 ) 637 #endif 555 CALL local_flush( 9 ) 638 556 CALL DVRP_LOG_INIT( 'DVRP_LOG' // CHAR( 0 ), 0 ) 639 557 WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_INIT' 640 #if defined( __ibm ) 641 CALL FLUSH_( 9 ) 642 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 643 CALL FLUSH( 9 ) 644 #endif 558 CALL local_flush( 9 ) 645 559 646 560 ! 647 561 !-- User-defined logging events: #1 (total time needed by PALM) 648 562 WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_SYMBOL' 649 #if defined( __ibm ) 650 CALL FLUSH_( 9 ) 651 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 652 CALL FLUSH( 9 ) 653 #endif 563 CALL local_flush( 9 ) 654 564 CALL DVRP_LOG_SYMBOL( 1, 'PALM_total' // CHAR( 0 ) ) 655 565 WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_SYMBOL' 656 #if defined( __ibm ) 657 CALL FLUSH_( 9 ) 658 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 659 CALL FLUSH( 9 ) 660 #endif 566 CALL local_flush( 9 ) 661 567 CALL DVRP_LOG_SYMBOL( 2, 'PALM_timestep' // CHAR( 0 ) ) 662 568 WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_LOG_EVENT' 663 #if defined( __ibm ) 664 CALL FLUSH_( 9 ) 665 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 666 CALL FLUSH( 9 ) 667 #endif 569 CALL local_flush( 9 ) 668 570 CALL DVRP_LOG_EVENT( 1, 1 ) 669 571 WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_LOG_EVENT' 670 #if defined( __ibm ) 671 CALL FLUSH_( 9 ) 672 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 673 CALL FLUSH( 9 ) 674 #endif 572 CALL local_flush( 9 ) 675 573 676 574 #if defined( __parallel ) … … 681 579 use_seperate_pe_for_dvrp_output = .TRUE. 682 580 WRITE ( 9, * ) '*** myid=', myid, ' vor DVRP_SPLIT' 683 #if defined( __ibm ) 684 CALL FLUSH_( 9 ) 685 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 686 CALL FLUSH( 9 ) 687 #endif 581 CALL local_flush( 9 ) 688 582 CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm ) 689 583 WRITE ( 9, * ) '*** myid=', myid, ' nach DVRP_SPLIT' 690 #if defined( __ibm ) 691 CALL FLUSH_( 9 ) 692 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 693 CALL FLUSH( 9 ) 694 #endif 584 CALL local_flush( 9 ) 695 585 CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr ) 696 586 ENDIF -
palm/trunk/SOURCE/init_particles.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor directives for old systems removed 7 7 ! 8 8 ! Former revisions: … … 59 59 ! 60 60 !-- Define MPI derived datatype for FORTRAN datatype particle_type (see module 61 !-- particle_attributes). Integer length is 4 byte, Real is 8 byte (=> total 62 !-- length 100, nevertheless, 120 bytes are needed on T3E since integer seems 63 !-- to be 8 bytes long there) 64 blocklengths(1) = 19; blocklengths(2) = 4; blocklengths(3) = 1 65 #if defined( __t3eb ) 66 displacements(1) = 0; displacements(2) = 152; displacements(3) = 184 67 #else 68 displacements(1) = 0; displacements(2) = 152; displacements(3) = 168 69 #endif 61 !-- particle_attributes). Integer length is 4 byte, Real is 8 byte 62 blocklengths(1) = 19; blocklengths(2) = 4; blocklengths(3) = 1 63 displacements(1) = 0; displacements(2) = 152; displacements(3) = 168 64 70 65 types(1) = MPI_REAL 71 66 types(2) = MPI_INTEGER -
palm/trunk/SOURCE/init_pegrid.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Cpp-directive lcmuk changed to intel_openmp_bug, setting of host on lcmuk by 7 ! cpp-directive removed 7 8 ! 8 9 ! Former revisions: … … 56 57 !-- Get the number of OpenMP threads 57 58 !$OMP PARALLEL 58 #if defined( __ lcmuk)59 #if defined( __intel_openmp_bug ) 59 60 threads_per_task = omp_get_num_threads() 60 61 #else … … 72 73 !-- Automatic determination of the topology 73 74 !-- The default on SMP- and cluster-hosts is a 1d-decomposition along x 74 #if defined( __lcmuk )75 host = 'lcmuk'76 #endif77 75 IF ( host(1:3) == 'ibm' .OR. host(1:3) == 'nec' .OR. & 78 76 host(1:2) == 'lc' .OR. host(1:3) == 'dec' ) THEN -
palm/trunk/SOURCE/local_getenv.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor directives for old systems removed 7 7 ! 8 8 ! Former revisions: … … 29 29 CHARACTER (LEN=*) :: var, value 30 30 INTEGER :: ivalue, ivar 31 #if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )32 INTEGER :: dummy33 #endif34 31 #if defined( __lcmuk ) 35 32 INTEGER :: i, ia(20) 36 33 #endif 37 34 38 #if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )39 CALL PXFGETENV( var(1:ivar), ivar, value, ivalue, dummy )40 IF ( ivalue == 0 ) value = ''41 #else42 35 CALL GETENV( var(1:ivar), value ) 43 36 ivalue = LEN_TRIM( value ) 44 #endif45 37 46 38 #if defined( __lcmuk ) && defined( __parallel ) -
palm/trunk/SOURCE/local_system.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor directives for old systems removed 7 7 ! 8 8 ! Former revisions: … … 25 25 CHARACTER (LEN=*) :: command 26 26 27 #if defined( __t3eb ) || defined( __t3eh ) || defined( __t3ej2 ) || defined( __t3ej5 )28 CALL ISHELL( command )29 #else30 27 CALL SYSTEM( command ) 31 #endif32 28 33 29 END SUBROUTINE local_system -
palm/trunk/SOURCE/local_tremain.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! preprocessor directives for old systems removed 7 8 ! 8 9 ! Former revisions: … … 30 31 31 32 REAL :: remaining_time 32 !#if defined( __vpp )33 ! REAL :: cpu_time_used, rdum34 !#endif35 33 #if defined( __ibm ) 36 34 INTEGER(8) :: IRTC 37 35 REAL :: actual_wallclock_time 38 #elif defined( __lc tit)36 #elif defined( __lc ) 39 37 INTEGER :: count, count_rate 40 38 REAL :: actual_wallclock_time 41 39 #endif 42 40 43 #if defined( __ t3eh ) || defined( __t3eb ) || defined( __t3ej2 ) || defined( __t3ej5)41 #if defined( __ibm ) 44 42 45 CALL MPP_TREMAIN( remaining_time )46 47 !#elif defined( __vpp )48 !49 ! CALL CLOCKV( rdum, cpu_time_used, 0, 2 )50 ! remaining_time = maximum_cpu_time_allowed - cpu_time_used51 52 #elif defined( __ibm )53 54 ! CALL SYSTEM_CLOCK( count, count_rate )55 ! actual_wallclock_time = REAL( count ) / REAL( count_rate )56 43 actual_wallclock_time = IRTC( ) * 1E-9 57 44 remaining_time = maximum_cpu_time_allowed - & 58 45 ( actual_wallclock_time - initial_wallclock_time ) 59 46 60 #elif defined( __lc tit)47 #elif defined( __lc ) 61 48 62 49 CALL SYSTEM_CLOCK( count, count_rate ) -
palm/trunk/SOURCE/local_tremain_ini.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Cpp-directive lctit renamed lc 7 7 ! 8 8 ! Former revisions: … … 33 33 INTEGER :: idum 34 34 INTEGER(8) :: IRTC 35 #elif defined( __lc tit)35 #elif defined( __lc ) 36 36 CHARACTER (LEN=10) :: value_chr 37 37 INTEGER :: idum … … 46 46 initial_wallclock_time = IRTC( ) * 1E-9 47 47 48 #elif defined( __lc tit)48 #elif defined( __lc ) 49 49 50 50 CALL SYSTEM_CLOCK( count, count_rate ) -
palm/trunk/SOURCE/modules.f90
r77 r82 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! 7 ! +return_addres, return_username 8 ! Cpp-directive lcmuk renamed lc 8 9 ! 9 10 ! Former revisions: … … 236 237 mixing_length_1d = 'as_in_3d_model', & 237 238 random_generator = 'numerical-recipes', & 239 return_addres, return_username, & 238 240 timestep_scheme = 'runge-kutta-3' 239 241 CHARACTER (LEN=40) :: avs_data_file, topography = 'flat' … … 879 881 880 882 #if defined( __parallel ) 881 #if defined( __lc muk)883 #if defined( __lc ) 882 884 USE MPI 883 ! INCLUDE "mpif.h"884 885 #else 885 886 INCLUDE "mpif.h" -
palm/trunk/SOURCE/parin.f90
r77 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +return_addres, return_username, use_seperate_pe_for_dvrp_output in envpar 7 7 ! 8 8 ! Former revisions: … … 121 121 122 122 123 NAMELIST /envpar/ host, maximum_cpu_time_allowed, revision, &124 r un_identifier, tasks_per_node, write_binary123 NAMELIST /envpar/ host, maximum_cpu_time_allowed, revision, return_addres, & 124 return_username, run_identifier, tasks_per_node, write_binary 125 125 126 126 -
palm/trunk/SOURCE/poisfft.f90
r77 r82 1345 1345 ! tn = omp_get_thread_num() 1346 1346 ! WRITE( 120+tn, * ) '+++ id=',myid,' nx=',nx,' thread=', omp_get_thread_num() 1347 ! CALL FLUSH_( 120+tn )1347 ! CALL local_flush( 120+tn ) 1348 1348 !CDIR NOLOOPCHG 1349 1349 DO k = 0, nz-1 … … 1354 1354 ENDDO 1355 1355 ! WRITE( 120+tn, * ) '+++ id=',myid,' end of first tridia loop thread=', omp_get_thread_num() 1356 ! CALL FLUSH_( 120+tn )1356 ! CALL local_flush( 120+tn ) 1357 1357 1358 1358 IF ( j <= nnyh ) THEN -
palm/trunk/SOURCE/run_control.f90
r4 r82 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Preprocessor strings for different linux clusters changed to "lc", 7 ! routine local_flush is used for buffer flushing 7 8 ! 8 9 ! Former revisions: … … 89 90 advected_distance_x/1000.0, & 90 91 advected_distance_y/1000.0, mgcycles 91 #if defined( __ibm )92 92 ! 93 93 !-- Write buffer contents to disc immediately 94 CALL FLUSH_( 15 ) 95 #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) 96 CALL FLUSH( 15 ) 97 #endif 94 CALL local_flush( 15 ) 95 98 96 ENDIF 99 97 !
Note: See TracChangeset
for help on using the changeset viewer.