[1] | 1 | #!/bin/ksh |
---|
[1090] | 2 | |
---|
| 3 | # subjob - script for automatic generation and submission of batch-job files |
---|
| 4 | # for various batch queuing systems |
---|
| 5 | |
---|
[1046] | 6 | #--------------------------------------------------------------------------------# |
---|
| 7 | # This file is part of PALM. |
---|
| 8 | # |
---|
| 9 | # PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 10 | # of the GNU General Public License as published by the Free Software Foundation, |
---|
| 11 | # either version 3 of the License, or (at your option) any later version. |
---|
| 12 | # |
---|
| 13 | # PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 14 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 15 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 16 | # |
---|
| 17 | # You should have received a copy of the GNU General Public License along with |
---|
| 18 | # PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 19 | # |
---|
| 20 | # Copyright 1997-2012 Leibniz University Hannover |
---|
| 21 | #--------------------------------------------------------------------------------# |
---|
| 22 | # |
---|
| 23 | # Current revisions: |
---|
[1090] | 24 | # ------------------ |
---|
[1279] | 25 | # node calculation modified due to changes in mrun (tasks_per_node must not be |
---|
| 26 | # an integral divisor of numprocs any more) |
---|
[1046] | 27 | # |
---|
| 28 | # Former revisions: |
---|
| 29 | # ----------------- |
---|
[169] | 30 | # $Id: subjob 1279 2014-01-28 12:10:14Z raasch $ |
---|
[1200] | 31 | # |
---|
[1275] | 32 | # 1274 2014-01-09 13:14:54Z heinze |
---|
| 33 | # adjustments for lccrayh |
---|
| 34 | # |
---|
[1267] | 35 | # 1266 2013-12-11 12:07:34Z heinze |
---|
| 36 | # further adjustments for lccrayb (use msub instead of qsub) |
---|
| 37 | # |
---|
[1265] | 38 | # 1264 2013-12-09 12:46:09Z fricke |
---|
| 39 | # Bugfix: Using number of nodes instead of number of processors (lccrayb) |
---|
| 40 | # |
---|
[1263] | 41 | # 1262 2013-12-09 10:57:20Z fricke |
---|
| 42 | # further adjustments for lccrayb |
---|
| 43 | # |
---|
[1261] | 44 | # 1260 2013-12-04 12:48:04Z raasch |
---|
| 45 | # jaboticaba admitted |
---|
| 46 | # |
---|
[1256] | 47 | # 1255 2013-11-07 14:43:35Z raasch |
---|
| 48 | # further adjustments for lccrayb |
---|
| 49 | # |
---|
[1225] | 50 | # 1224 2013-09-16 07:27:23Z raasch |
---|
| 51 | # first adjustments for lccrayb |
---|
| 52 | # |
---|
[1203] | 53 | # 1202 2013-07-10 16:22:07Z witha |
---|
| 54 | # adjustments for Forwind cluster (lcflow) |
---|
| 55 | # |
---|
[1200] | 56 | # 1199 2013-07-05 14:52:22Z raasch |
---|
| 57 | # adjustments for CSC Helsinki (lccrayf) |
---|
| 58 | # |
---|
[1185] | 59 | # use of cluster/express queue enabled (ibmh) |
---|
| 60 | # vinessa added (imuk) |
---|
[1047] | 61 | # |
---|
[1104] | 62 | # 1103 2013-02-20 02:15:53Z raasch |
---|
| 63 | # bash compatibility adjustments (usage of OPTIND, output formatting with printf |
---|
| 64 | # instead typeset -L/R), |
---|
| 65 | # further adjustments for lckyuh |
---|
| 66 | # |
---|
[1100] | 67 | # 2013-02-10 01:47:43Z raasch |
---|
| 68 | # adjustments for Kyushu-Univeristy computing center (lckyuh - hayaka) |
---|
| 69 | # and for Forwind cluster (lcflow) |
---|
| 70 | # |
---|
[1096] | 71 | # 1094 2013-02-03 01:52:12Z raasch |
---|
| 72 | # new option -P for explicit setting of ssh/scp port, |
---|
| 73 | # decalpha parts (yonsei) removed |
---|
| 74 | # |
---|
[1091] | 75 | # 2013-02-02 07:06:13Z raasch |
---|
[1099] | 76 | # adjustments for Kyushu-University computing center (lckyut - tatara) |
---|
[1091] | 77 | # old changelog messages removed |
---|
| 78 | # |
---|
[1047] | 79 | # 1046 2012-11-09 14:38:45Z maronga |
---|
| 80 | # code put under GPL (PALM 3.9) |
---|
| 81 | # |
---|
[1090] | 82 | # 08/07/94 - Siggi - first version finished |
---|
| 83 | # 29/06/94 - Siggi - script development started |
---|
| 84 | #--------------------------------------------------------------------------------# |
---|
| 85 | # subjob - script for automatic generation and submission of batch-job files |
---|
| 86 | # for various batch queuing systems |
---|
| 87 | #--------------------------------------------------------------------------------# |
---|
[1] | 88 | |
---|
| 89 | |
---|
| 90 | # VARIABLENVEREINBARUNGEN + DEFAULTWERTE |
---|
[352] | 91 | delete_dayfile=false |
---|
[799] | 92 | email_notification=none |
---|
[122] | 93 | group_number=none |
---|
[1] | 94 | locat=normal |
---|
| 95 | no_default_queue=none |
---|
| 96 | no_submit=false |
---|
| 97 | job_catalog="~/job_queue" |
---|
| 98 | job_name=none |
---|
| 99 | local_user=$LOGNAME |
---|
| 100 | node_usage=shared |
---|
[475] | 101 | numprocs=0 |
---|
[1] | 102 | punkte="..........................................................." |
---|
| 103 | submcom=qsub |
---|
| 104 | queue=default |
---|
| 105 | remote_host=none |
---|
| 106 | remote_user="" |
---|
| 107 | verify=true |
---|
| 108 | |
---|
| 109 | typeset -i cputime=0 memory=0 Memory=0 minuten resttime sekunden stunden |
---|
[696] | 110 | typeset -i inumprocs mpi_tasks=0 nodes=0 processes_per_node=0 tasks_per_node=0 threads_per_task=1 |
---|
[1] | 111 | |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | # FEHLERBEHANDLUNG |
---|
| 115 | # BEI EXIT: |
---|
| 116 | trap 'if [[ $locat != normal ]] |
---|
| 117 | then |
---|
| 118 | case $locat in |
---|
| 119 | (option) printf "\n --> available optios can be displayed" |
---|
| 120 | printf " by typing:" |
---|
| 121 | printf "\n \"subjob ?\" \n";; |
---|
| 122 | (ftpcopy|parameter|scp|verify) printf "\n";; |
---|
| 123 | (*) printf "\n +++ unknown error" |
---|
| 124 | printf "\n please inform S. Raasch!\n" |
---|
| 125 | esac |
---|
| 126 | [[ -f $job_to_send ]] && rm $job_to_send |
---|
| 127 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
| 128 | fi' exit |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | # BEI TERMINAL-BREAK: |
---|
| 132 | trap '[[ -f $job_to_send ]] && rm $job_to_send |
---|
| 133 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
| 134 | exit |
---|
| 135 | ' 2 |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | # LOKALEN HOSTNAMEN FESTSTELLEN |
---|
| 141 | local_host=$(hostname) |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST |
---|
| 146 | # UEBERHAUPT ZULAESSIG IST |
---|
[717] | 147 | # Note: One of the entries for "lck" or "lckordi" always has to be |
---|
| 148 | # comment out, because the hostname (node*) is same for both machines |
---|
[1] | 149 | case $local_host in |
---|
[1204] | 150 | (ambiel-lx) local_addres=134.106.74.48; local_host=lcfor;; |
---|
[1] | 151 | (atmos) local_addres=172.20.25.35; local_host=lcide;; |
---|
[1235] | 152 | (austru) local_addres=130.75.105.128; local_host=lcmuk;; |
---|
[102] | 153 | (autan) local_addres=130.75.105.57; local_host=lcmuk;; |
---|
[5] | 154 | (bora) local_addres=130.75.105.103; local_host=lcmuk;; |
---|
[400] | 155 | (bd1) local_addres=130.73.232.64; local_host=lcsgib;; |
---|
| 156 | (bd2) local_addres=130.73.232.65; local_host=lcsgib;; |
---|
| 157 | (bd3) local_addres=130.73.232.66; local_host=lcsgib;; |
---|
| 158 | (bd4) local_addres=130.73.232.67; local_host=lcsgib;; |
---|
| 159 | (b01*|bicegate1) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
[1103] | 160 | (b04*) local_addres=133.5.4.33; local_host=lckyuh;; |
---|
[291] | 161 | (bicegate2) local_addres=130.73.232.103; local_host=lcsgib;; |
---|
[749] | 162 | (blizzard1) local_addres=136.172.40.15; local_host=ibmh;; |
---|
[1255] | 163 | (blogin*|bxc*) local_addres=130.73.233.1; local_host=lccrayb;; |
---|
[1274] | 164 | (hlogin*|hxc*) local_addres=130.75.4.1; local_host=lccrayh;; |
---|
[12] | 165 | (breva) local_addres=130.75.105.98; local_host=lcmuk;; |
---|
[1174] | 166 | (buran) local_addres=130.75.105.58; local_host=lcmuk;; |
---|
[372] | 167 | (caurus) local_addres=130.75.105.19; local_host=lcmuk;; |
---|
[693] | 168 | (climate*) local_addres=165.132.26.68; local_host=lcyon;; |
---|
[1197] | 169 | (clogin*) local_addres=86.50.166.21; local_host=lccrayf;; |
---|
[108] | 170 | (compute-*.local) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
[1] | 171 | (cs*) local_addres=136.172.44.131; local_host=nech;; |
---|
[5] | 172 | (elephanta) local_addres=130.75.105.6; local_host=lcmuk;; |
---|
[108] | 173 | (fimm.bccs.uib.no) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
[1099] | 174 | (flow01) local_addres=10.141.255.71; local_host=lcflow;; |
---|
| 175 | (flow02) local_addres=10.141.255.72; local_host=lcflow;; |
---|
[367] | 176 | (node*) local_addres=165.132.26.61 local_host=lck;; |
---|
[717] | 177 | # (node*) local_addres=210.219.61.8 local_host=lckordi;; |
---|
[693] | 178 | (gaia*) local_addres=150.183.146.24; local_host=ibmkisti;; |
---|
[101] | 179 | (gallego) local_addres=130.75.105.10; local_host=lcmuk;; |
---|
[1] | 180 | (gfdl5) local_addres=165.132.26.58; local_host=ibmy;; |
---|
[5] | 181 | (gregale) local_addres=130.75.105.109; local_host=lcmuk;; |
---|
| 182 | (hababai) local_addres=130.75.105.108; local_host=lcmuk;; |
---|
[1099] | 183 | (hayaka*) local_addres=133.5.4.33; local_host=lckyuh;; |
---|
[892] | 184 | (hexagon.bccs.uib.no) local_addres=129.177.20.113; local_host=lcxe6;; |
---|
[400] | 185 | (hd1) local_addres=130.75.4.104; local_host=lcsgih;; |
---|
| 186 | (hd2) local_addres=130.75.4.105; local_host=lcsgih;; |
---|
| 187 | (hd3) local_addres=130.75.4.106; local_host=lcsgih;; |
---|
| 188 | (hd4) local_addres=130.75.4.107; local_host=lcsgih;; |
---|
[739] | 189 | (hicegate0) local_addres=130.75.4.101; local_host=lcsgih;; |
---|
[292] | 190 | (h01*|hicegate1) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
[210] | 191 | (hicegate2) local_addres=130.75.4.103; local_host=lcsgih;; |
---|
[440] | 192 | (hx*) local_addres=133.3.51.11; local_host=lckyoto;; |
---|
[749] | 193 | (inferno) local_addres=130.75.105.5; local_host=lcmuk;; |
---|
[5] | 194 | (irifi) local_addres=130.75.105.104; local_host=lcmuk;; |
---|
[1260] | 195 | (jaboticaba) local_addres=150.163.25.181; local_host=lcbr;; |
---|
[407] | 196 | (sno) local_addres=130.75.105.113; local_host=lcmuk;; |
---|
[5] | 197 | (levanto) local_addres=130.75.105.45; local_host=lcmuk;; |
---|
[1040] | 198 | (login*) local_addres=118.128.66.223; local_host=lckiaps;; |
---|
[5] | 199 | (maestro) local_addres=130.75.105.2; local_host=lcmuk;; |
---|
[1099] | 200 | (meller) local_addres=134.106.74.155; local_host=lcfor;; |
---|
[437] | 201 | (meteo-login*) local_addres=193.166.211.144;local_host=lcxt5m;; |
---|
[892] | 202 | (hexagon*) local_addres=129.177.20.113; local_host=lcxe6;; |
---|
[1] | 203 | (nobel*) local_addres=150.183.5.101; local_host=ibms;; |
---|
[5] | 204 | (orkan) local_addres=130.75.105.3; local_host=lcmuk;; |
---|
| 205 | (ostria) local_addres=130.75.105.106; local_host=lcmuk;; |
---|
[205] | 206 | (paesano) local_addres=130.75.105.46; local_host=lcmuk;; |
---|
[1099] | 207 | (pcj*) local_addres=172.31.120.1; local_host=lckyut;; |
---|
[789] | 208 | (pingui) local_addres=134.106.74.118; local_host=lcfor;; |
---|
[5] | 209 | (quanero) local_addres=130.75.105.107; local_host=lcmuk;; |
---|
[622] | 210 | (rte*) local_addres=133.5.185.60; local_host=lcrte;; |
---|
[1197] | 211 | (r1*) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
| 212 | (r2*) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
[1] | 213 | (scirocco) local_addres=172.20.25.41; local_host=lcmuk;; |
---|
[1204] | 214 | (shiokaze-lx) local_addres=134.106.74.123; local_host=lcfor;; |
---|
[1197] | 215 | (sisu-login*) local_addres=86.50.166.21; local_host=lccrayf;; |
---|
[799] | 216 | (solano) local_addres=130.75.105.110; local_host=lcmuk;; |
---|
[1090] | 217 | (sugoka*) local_addres=172.31.120.1; local_host=lckyut;; |
---|
[1] | 218 | (sun1|sun2) local_addres=130.75.6.1; local_host=unics;; |
---|
[259] | 219 | (sx-*) local_addres=172.16.1.131; local_host=necriam;; |
---|
[635] | 220 | (t2a*) local_addres=10.1.6.165; local_host=lctit;; |
---|
[1021] | 221 | (urban*) local_addres=147.46.30.151 local_host=lcsb;; |
---|
[1184] | 222 | (vinessa) local_addres=130.75.105.112; local_host=lcmuk;; |
---|
[1] | 223 | (vorias) local_addres=172.20.25.43; local_host=lcmuk;; |
---|
[622] | 224 | (*.cc.kyushu-u.ac.jp) local_addres=133.5.4.129; local_host=ibmku;; |
---|
[1] | 225 | (*) printf "\n +++ \"$local_host\" unknown"; |
---|
[1255] | 226 | printf "\n please contact the PALM group at IMUK"; |
---|
[1] | 227 | locat=parameter; exit;; |
---|
| 228 | esac |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN |
---|
| 233 | remote_host=$local_host |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | |
---|
| 238 | # PROZEDUROPTIONEN EINLESEN |
---|
[1094] | 239 | while getopts :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX: option |
---|
[1] | 240 | do |
---|
| 241 | case $option in |
---|
| 242 | (c) job_catalog=$OPTARG;; |
---|
| 243 | (d) delete_dayfile=true;; |
---|
| 244 | (D) no_submit=true;; |
---|
[352] | 245 | (e) email_notification=$OPTARG;; |
---|
[125] | 246 | (g) group_number=$OPTARG;; |
---|
[1] | 247 | (h) remote_host=$OPTARG;; |
---|
| 248 | (m) memory=$OPTARG;; |
---|
| 249 | (n) job_name=$OPTARG;; |
---|
| 250 | (N) node_usage=$OPTARG;; |
---|
| 251 | (O) threads_per_task=$OPTARG;; |
---|
[1094] | 252 | (P) scp_port=$OPTARG;; |
---|
[1] | 253 | (q) no_default_queue=$OPTARG;; |
---|
| 254 | (t) cputime=$OPTARG;; |
---|
| 255 | (T) tasks_per_node=$OPTARG;; |
---|
| 256 | (u) remote_user=$OPTARG;; |
---|
| 257 | (v) verify=false;; |
---|
| 258 | (X) numprocs=$OPTARG;; |
---|
| 259 | (\?) printf "\n +++ Option $OPTARG unknown \n"; |
---|
| 260 | locat=option; exit;; |
---|
| 261 | esac |
---|
| 262 | done |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN |
---|
[1103] | 266 | (( to_shift = $OPTIND - 1 )) |
---|
| 267 | shift $to_shift; file_to_send=$1 |
---|
[1] | 268 | |
---|
| 269 | |
---|
| 270 | # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN |
---|
| 271 | if [ "$1" = "?" ] |
---|
| 272 | then |
---|
| 273 | (printf "\n *** subjob can be called as follows:\n" |
---|
| 274 | printf "\n subjob -c.. -d -D -h.. -m.. -q.. -t.. -u.. -v <jobfile>\n" |
---|
| 275 | printf "\n Description of available options:\n" |
---|
| 276 | printf "\n Option Description Default-Value" |
---|
| 277 | printf "\n -c job-input- and output-catalog ~/job_queue" |
---|
| 278 | printf "\n -d no job-protocol will be created ---" |
---|
| 279 | printf "\n -D only the job-file will be created ---" |
---|
| 280 | printf "\n -h execution host, available hosts: $remote_host" |
---|
[693] | 281 | printf "\n ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...," |
---|
[1040] | 282 | printf "\n lckiaps, lctit, nech, necriam, unics" |
---|
[1] | 283 | printf "\n -m memory demand per process in MByte ---" |
---|
| 284 | printf "\n -n jobname <jobdatei>" |
---|
| 285 | printf "\n -O threads per task (for OpenMP usage) 1" |
---|
[1094] | 286 | printf "\n -P ssh/scp port default port" |
---|
[1] | 287 | printf "\n -q job-queue to be used default" |
---|
| 288 | printf "\n -t allowed cpu-time in seconds ---" |
---|
| 289 | printf "\n -T tasks per node (on parallel hosts) ---" |
---|
| 290 | printf "\n -u username on execution host from .netrc" |
---|
| 291 | printf "\n -v no prompt for confirmation ---" |
---|
| 292 | printf "\n -X # of processors (on parallel hosts) 1" |
---|
| 293 | printf "\n " |
---|
| 294 | printf "\n The only possible positional parameter is <jobfile>:" |
---|
| 295 | printf "\n The complete NQS-job must be provided here." |
---|
| 296 | printf "\n <jobfile>=? creates this outline\n\n") | more |
---|
| 297 | exit |
---|
| 298 | fi |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT |
---|
| 303 | if [[ "$file_to_send" = "" ]] |
---|
| 304 | then |
---|
| 305 | printf "\n +++ job-file missing" |
---|
| 306 | locat=parameter; exit |
---|
| 307 | else |
---|
| 308 | if [[ -f $file_to_send ]] |
---|
| 309 | then |
---|
| 310 | true |
---|
| 311 | else |
---|
| 312 | printf "\n +++ job-file: " |
---|
| 313 | printf "\n $file_to_send" |
---|
| 314 | printf "\n does not exist" |
---|
| 315 | locat=parameter; exit |
---|
| 316 | fi |
---|
| 317 | fi |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME |
---|
| 322 | # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE |
---|
| 323 | if [[ $job_name = none ]] |
---|
| 324 | then |
---|
| 325 | job_name=$file_to_send |
---|
| 326 | fi |
---|
| 327 | if [[ $(echo $job_name | grep -c "/") != 0 ]] |
---|
| 328 | then |
---|
| 329 | printf "\n +++ job-file name: " |
---|
| 330 | printf "\n $job_name" |
---|
| 331 | printf "\n must not contain \"/\"-characters" |
---|
| 332 | locat=parameter; exit |
---|
| 333 | fi |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | |
---|
| 338 | # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST |
---|
| 339 | # ODER WENN HOST NICHT ANGEGEBEN WURDE |
---|
| 340 | if [[ $remote_host = none ]] |
---|
| 341 | then |
---|
| 342 | printf "\n +++ host missing" |
---|
| 343 | locat=option; exit |
---|
| 344 | else |
---|
| 345 | case $remote_host in |
---|
[251] | 346 | (ibm) queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
[1184] | 347 | (ibmh) queue=cluster; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
[693] | 348 | (ibmkisti) queue=class.32plus; remote_addres=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
[622] | 349 | (ibmku) queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;; |
---|
[251] | 350 | (ibms) queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
| 351 | (ibmy) queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
[1262] | 352 | (lccrayb) queue=testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;; |
---|
[1274] | 353 | (lccrayh) queue=mpp1testq; remote_addres=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;; |
---|
[1197] | 354 | (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;; |
---|
[251] | 355 | (lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;; |
---|
[1099] | 356 | (lcflow) remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;; |
---|
[440] | 357 | (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;; |
---|
[540] | 358 | (lcsgib) queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;; |
---|
| 359 | (lcsgih) queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;; |
---|
[367] | 360 | (lck) remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;; |
---|
[1040] | 361 | (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;; |
---|
[717] | 362 | (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;; |
---|
[1099] | 363 | (lckyuh) remote_addres=133.5.4.33; submcom=/usr/bin/pjsub;; |
---|
[1090] | 364 | (lckyut) remote_addres=133.5.4.37; submcom=/usr/bin/pjsub;; |
---|
[1021] | 365 | (lcsb) remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;; |
---|
[635] | 366 | (lctit) queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;; |
---|
[892] | 367 | (lcxe6) remote_addres=129.177.20.113; submcom=/opt/torque/2.5.10/bin/qsub;; |
---|
[437] | 368 | (lcxt5m) remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;; |
---|
[693] | 369 | (lcyon) remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;; |
---|
[251] | 370 | (nech) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";; |
---|
| 371 | (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";; |
---|
| 372 | (vpp) qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;; |
---|
| 373 | (unics) qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;; |
---|
| 374 | (*) printf "\n +++ hostname \"$remote_host\" not allowed"; |
---|
| 375 | locat=parameter; exit;; |
---|
[1] | 376 | esac |
---|
| 377 | fi |
---|
| 378 | |
---|
| 379 | |
---|
| 380 | # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST |
---|
| 381 | if [[ $no_default_queue != none ]] |
---|
| 382 | then |
---|
| 383 | error=false |
---|
| 384 | ndq=$no_default_queue |
---|
| 385 | case $remote_host in |
---|
| 386 | (ibm) case $ndq in |
---|
| 387 | (p690_express|p690_standard|p690_long) error=false;; |
---|
| 388 | (*) error=true;; |
---|
| 389 | esac;; |
---|
| 390 | (ibmh) case $ndq in |
---|
[1184] | 391 | (cluster|express) error=false;; |
---|
[1] | 392 | (*) error=true;; |
---|
| 393 | esac;; |
---|
[693] | 394 | (ibmkisti) case $ndq in |
---|
| 395 | (class.32plus|class.1-2|class.2-32) error=false;; |
---|
| 396 | (*) error=true;; |
---|
| 397 | esac;; |
---|
[622] | 398 | (ibmku) case $ndq in |
---|
| 399 | (sdbg1|sdbg2|sdbg4|s4|s16|s32|s32-s) error=false;; |
---|
| 400 | (*) error=true;; |
---|
| 401 | esac;; |
---|
[1] | 402 | (ibms) case $ndq in |
---|
| 403 | (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand) error=false;; |
---|
| 404 | (*) error=true;; |
---|
| 405 | esac;; |
---|
| 406 | (ibmy) case $ndq in |
---|
| 407 | (parallel) error=false;; |
---|
| 408 | (*) error=true;; |
---|
| 409 | esac;; |
---|
[1224] | 410 | (lccrayb) case $ndq in |
---|
[1274] | 411 | (mpp1q|testq|specialm1q) error=false;; |
---|
[1224] | 412 | (*) error=true;; |
---|
| 413 | esac;; |
---|
[1274] | 414 | (lccrayh) case $ndq in |
---|
| 415 | (mpp1q|mpp1testq|specialm1q|dataq) error=false;; |
---|
| 416 | (*) error=true;; |
---|
| 417 | esac;; |
---|
[1197] | 418 | (lccrayf) case $ndq in |
---|
| 419 | (usup|test*|small|large) error=false;; |
---|
| 420 | (*) error=true;; |
---|
| 421 | esac;; |
---|
[1099] | 422 | (lcflow) case $ndq in |
---|
| 423 | (cfd_lom_long.q|cfd_him_long.q|cfd_lom_serl.q|cfd_lom_shrt.q|cfd_him_shrt.q) error=false;; |
---|
| 424 | (*) error=true;; |
---|
| 425 | esac;; |
---|
[1040] | 426 | (lckiaps) case $ndq in |
---|
| 427 | (express|normal) error=false;; |
---|
| 428 | (*) error=true;; |
---|
| 429 | esac;; |
---|
[440] | 430 | (lckyoto) case $ndq in |
---|
| 431 | (eh|ph) error=false;; |
---|
| 432 | (*) error=true;; |
---|
| 433 | esac;; |
---|
[1099] | 434 | (lckyuh) case $ndq in |
---|
| 435 | (fx-dbg|fx-single|fx-small|fx-middle|fx-large) error=false;; |
---|
| 436 | (*) error=true;; |
---|
| 437 | esac;; |
---|
[1090] | 438 | (lckyut) case $ndq in |
---|
| 439 | (cx-dbg|cx-single|cx-small|cx-middle|cx-large) error=false;; |
---|
| 440 | (*) error=true;; |
---|
| 441 | esac;; |
---|
[191] | 442 | (lcsgib|lcsgih) case $ndq in |
---|
[416] | 443 | (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q) error=false;; |
---|
[191] | 444 | (*) error=true;; |
---|
| 445 | esac;; |
---|
[1] | 446 | (lctit) case $ndq in |
---|
[635] | 447 | (G|L128|L256|L512H|S|S96|V) error=false;; |
---|
[1] | 448 | (*) error=true;; |
---|
| 449 | esac;; |
---|
| 450 | (t3eb) case $ndq in |
---|
| 451 | (berte|p50|p100|p392|forfree|p25himem) error=false;; |
---|
| 452 | (*) error=true;; |
---|
| 453 | esac;; |
---|
[251] | 454 | (necriam) case $ndq in |
---|
[253] | 455 | (SP|SS|P6) error=false;; |
---|
[251] | 456 | (*) error=true;; |
---|
| 457 | esac;; |
---|
[1] | 458 | (t3eh) case $ndq in |
---|
| 459 | (para_t3e|em|k|l|lm|comp_t3e|c|p|ht) error=false;; |
---|
| 460 | (*) error=true;; |
---|
| 461 | esac;; |
---|
| 462 | (t3ej2|t3ej5) case $ndq in |
---|
| 463 | (low|normal|high) error=false;; |
---|
| 464 | (*) error=true;; |
---|
| 465 | esac;; |
---|
| 466 | (t3es) case $ndq in |
---|
| 467 | (batch|serial-4|pe4|p48|pe16|pe32|pe64|pe128) error=false;; |
---|
| 468 | (*) error=true;; |
---|
| 469 | esac;; |
---|
| 470 | (unics) case $ndq in |
---|
| 471 | (unics|ht) error=false;; |
---|
| 472 | (*) error=true;; |
---|
| 473 | esac;; |
---|
| 474 | esac |
---|
| 475 | if [[ $error = true ]] |
---|
| 476 | then |
---|
| 477 | printf "\n +++ queue \"$no_default_queue\" on host \"$remote_host\" not allowed" |
---|
| 478 | locat=parameter; exit |
---|
| 479 | else |
---|
| 480 | queue=$no_default_queue |
---|
| 481 | fi |
---|
| 482 | fi |
---|
| 483 | |
---|
| 484 | |
---|
| 485 | |
---|
| 486 | # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN |
---|
| 487 | # AUFTEILEN |
---|
| 488 | done=false |
---|
| 489 | while [[ $done = false ]] |
---|
| 490 | do |
---|
| 491 | if (( $cputime <= 0 )) |
---|
| 492 | then |
---|
| 493 | printf "\n +++ wrong cpu-time or cpu-time missing" |
---|
| 494 | printf "\n >>> Please type cpu-time in seconds as INTEGER:" |
---|
| 495 | printf "\n >>> " |
---|
| 496 | read cputime 1>/dev/null 2>&1 |
---|
| 497 | else |
---|
| 498 | done=true |
---|
| 499 | fi |
---|
| 500 | done |
---|
| 501 | if [[ $remote_host = nech ]] |
---|
| 502 | then |
---|
| 503 | if (( tasks_per_node != 0 )) |
---|
| 504 | then |
---|
| 505 | (( cputime = cputime * tasks_per_node )) |
---|
| 506 | elif [[ $numprocs != 0 ]] |
---|
| 507 | then |
---|
| 508 | (( cputime = cputime * numprocs )) |
---|
| 509 | fi |
---|
| 510 | fi |
---|
| 511 | (( stunden = cputime / 3600 )) |
---|
| 512 | (( resttime = cputime - stunden * 3600 )) |
---|
| 513 | (( minuten = resttime / 60 )) |
---|
| 514 | (( sekunden = resttime - minuten * 60 )) |
---|
| 515 | timestring=${stunden}:${minuten}:${sekunden} |
---|
| 516 | |
---|
| 517 | |
---|
| 518 | |
---|
| 519 | # PRUEFEN DER KERNSPEICHERANFORDERUNG |
---|
| 520 | done=false |
---|
| 521 | while [[ $done = false ]] |
---|
| 522 | do |
---|
| 523 | if (( memory <= 0 )) |
---|
| 524 | then |
---|
| 525 | printf "\n +++ wrong memory demand or memory demand missing" |
---|
| 526 | printf "\n >>> Please type memory in MByte per process as INTEGER:" |
---|
| 527 | printf "\n >>> " |
---|
| 528 | read memory 1>/dev/null 2>&1 |
---|
| 529 | else |
---|
| 530 | done=true |
---|
| 531 | fi |
---|
| 532 | done |
---|
| 533 | |
---|
[251] | 534 | if [[ $remote_host = nech || $remote_host = necriam ]] |
---|
[1] | 535 | then |
---|
| 536 | if (( tasks_per_node != 0 )) |
---|
| 537 | then |
---|
| 538 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
| 539 | elif [[ $numprocs != 0 ]] |
---|
| 540 | then |
---|
| 541 | (( Memory = memory * numprocs / 1000 )) |
---|
| 542 | else |
---|
| 543 | (( Memory = memory / 1000 )) |
---|
| 544 | fi |
---|
[635] | 545 | elif [[ $remote_host = lctit ]] |
---|
| 546 | then |
---|
| 547 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
[1] | 548 | fi |
---|
| 549 | |
---|
| 550 | |
---|
| 551 | # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG |
---|
| 552 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 553 | then |
---|
| 554 | (( memory = memory * threads_per_task )) |
---|
| 555 | fi |
---|
| 556 | |
---|
| 557 | |
---|
| 558 | # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN |
---|
| 559 | if (( tasks_per_node != 0 )) |
---|
| 560 | then |
---|
[1279] | 561 | (( nodes = ( numprocs - 1 ) / ( tasks_per_node * threads_per_task ) + 1 )) |
---|
[1] | 562 | fi |
---|
| 563 | |
---|
[1094] | 564 | |
---|
[622] | 565 | # Calculate number of processes per node |
---|
| 566 | (( processes_per_node = tasks_per_node * threads_per_task )) |
---|
[1] | 567 | |
---|
[1094] | 568 | |
---|
[696] | 569 | # Calculate number of MPI tasks |
---|
| 570 | (( mpi_tasks = numprocs / threads_per_task )) |
---|
[1] | 571 | |
---|
[696] | 572 | |
---|
[1094] | 573 | # Set port number option for calls of ssh/scp, subjob and batch_scp scripts |
---|
| 574 | if [[ "$scp_port" != "" ]] |
---|
| 575 | then |
---|
| 576 | PORTOPT="-P $scp_port" |
---|
| 577 | SSH_PORTOPT="-p $scp_port" |
---|
| 578 | fi |
---|
| 579 | |
---|
| 580 | |
---|
[1] | 581 | # HEADER-AUSGABE |
---|
| 582 | if [[ $verify = true ]] |
---|
| 583 | then |
---|
| 584 | printf "\n\n" |
---|
| 585 | printf "#--------------------------------------------------------------# \n" |
---|
| 586 | spalte1=SUBJOB;spalte2=$(date) |
---|
[1103] | 587 | printf "| %-20s%40s | \n" "$spalte1" "$spalte2" |
---|
[1] | 588 | printf "| | \n" |
---|
| 589 | printf "| values of parameters/options: | \n" |
---|
[1103] | 590 | spalte1=$(echo local_host$punkte | cut -c-20) |
---|
| 591 | spalte2=$punkte$local_host |
---|
| 592 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 593 | spalte1=$(echo remote_host$punkte | cut -c-20) |
---|
| 594 | spalte2=$punkte$remote_host |
---|
| 595 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 596 | spalte1=$(echo queue$punkte | cut -c-20) |
---|
| 597 | spalte2=$punkte$queue |
---|
| 598 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 599 | spalte1=$(echo memory$punkte | cut -c-20) |
---|
| 600 | spalte2="$punkte$memory mb" |
---|
| 601 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 602 | spalte1=$(echo cputime$punkte | cut -c-20) |
---|
| 603 | spalte2="$punkte$cputime sec" |
---|
| 604 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 605 | spalte1=$(echo job_name$punkte | cut -c-20) |
---|
| 606 | spalte2="$punkte$job_name" |
---|
| 607 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
[1] | 608 | printf "#--------------------------------------------------------------# \n\n" |
---|
| 609 | |
---|
| 610 | |
---|
| 611 | # KONTROLLABFRAGE, OB ALLES O.K. |
---|
| 612 | antwort="dummy" |
---|
| 613 | while [[ $antwort != y && $antwort != Y && $antwort != n && $antwort != N ]] |
---|
| 614 | do |
---|
| 615 | read antwort?" >>> continue (y/n) ? " |
---|
| 616 | done |
---|
| 617 | if [[ $antwort = n || $antwort = N ]] |
---|
| 618 | then |
---|
| 619 | locat=verify; exit |
---|
| 620 | fi |
---|
| 621 | printf "\n" |
---|
| 622 | fi |
---|
| 623 | |
---|
| 624 | |
---|
| 625 | |
---|
| 626 | # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN |
---|
| 627 | kennung=$RANDOM |
---|
| 628 | job_on_remhost=${job_name}_${kennung}_$local_host |
---|
| 629 | job_to_send=job_to_send_$kennung |
---|
| 630 | if [[ $delete_dayfile = false ]] |
---|
| 631 | then |
---|
| 632 | remote_dayfile=${local_host}_${job_name}_result_$kennung |
---|
| 633 | local_dayfile=${remote_host}_${job_name} |
---|
| 634 | else |
---|
| 635 | remote_dayfile=/dev/null |
---|
| 636 | fi |
---|
| 637 | |
---|
| 638 | |
---|
| 639 | |
---|
[622] | 640 | # Generate the batch job scripts (qsub/msub/LoadLeveler) |
---|
[1] | 641 | if [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs != 0 ]] |
---|
| 642 | then |
---|
| 643 | |
---|
[622] | 644 | # General LoadLeveler settings |
---|
| 645 | execute_in_shell="#!/bin/ksh" |
---|
| 646 | use_shell="# @ shell = /bin/ksh" |
---|
| 647 | consumable_memory="ConsumableMemory($memory mb)" |
---|
| 648 | class="# @ class = $queue" |
---|
| 649 | environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes" |
---|
| 650 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
| 651 | data_limit="# @ data_limit = 1.76gb" |
---|
| 652 | image_size="# @ image_size = 50" |
---|
[693] | 653 | wall_clock_limit="# @ wall_clock_limit = ${timestring},$timestring" |
---|
[312] | 654 | |
---|
[693] | 655 | if [[ $email_notification = none ]] |
---|
| 656 | then |
---|
| 657 | notify_user="" |
---|
| 658 | else |
---|
| 659 | notify_user="# @ notify_user = $email_notification" |
---|
| 660 | if [[ $delete_dayfile = true ]] |
---|
| 661 | then |
---|
| 662 | notification='# @ notification = never' |
---|
| 663 | fi |
---|
| 664 | fi |
---|
[622] | 665 | |
---|
[312] | 666 | if [[ $remote_host = ibmh ]] |
---|
[1] | 667 | then |
---|
[312] | 668 | data_limit="" |
---|
| 669 | network_to_use="" |
---|
[1184] | 670 | class="# @ class = $queue" |
---|
[312] | 671 | environment="" |
---|
[814] | 672 | rset="# @ rset = RSET_MCM_AFFINITY" |
---|
| 673 | task_affinity="# @ task_affinity = core(1)" |
---|
[693] | 674 | elif [[ $remote_host = ibmkisti ]] |
---|
| 675 | then |
---|
| 676 | network_to_use="# @ network.MPI = sn_all,shared,US" |
---|
| 677 | wall_clock_limit="# @ wall_clock_limit = $timestring" |
---|
[696] | 678 | if [[ $threads_per_task = 1 ]] |
---|
| 679 | then |
---|
| 680 | rset="# @ rset = RSET_MCM_AFFINITY" |
---|
| 681 | mcm_affinity_options="# @ mcm_affinity_options = mcm_mem_pref mcm_sni_none mcm_distribute" |
---|
| 682 | fi |
---|
[693] | 683 | environment="" |
---|
| 684 | use_shell="" |
---|
| 685 | data_limit="" |
---|
| 686 | image_size="" |
---|
[622] | 687 | elif [[ $remote_host = ibmku ]] |
---|
| 688 | then |
---|
| 689 | execute_in_shell="#!/usr/bin/ksh" |
---|
| 690 | use_shell="# @ shell = /usr/bin/ksh" |
---|
| 691 | consumable_memory="" |
---|
| 692 | environment="" |
---|
| 693 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
| 694 | data_limit="" |
---|
| 695 | image_size="" |
---|
| 696 | elif [[ $remote_host = ibms ]] |
---|
| 697 | then |
---|
| 698 | network_to_use="# @ network.mpi = csss,shared,us" |
---|
| 699 | elif [[ $remote_host = ibmy ]] |
---|
| 700 | then |
---|
| 701 | consumable_memory="" |
---|
| 702 | network_to_use="" |
---|
[1] | 703 | fi |
---|
| 704 | |
---|
| 705 | cat > $job_to_send << %%END%% |
---|
[622] | 706 | $execute_in_shell |
---|
| 707 | $use_shell |
---|
[1] | 708 | |
---|
| 709 | # @ job_type = parallel |
---|
[693] | 710 | # @ job_name = $job_name |
---|
[1] | 711 | # @ resources = ConsumableCpus($threads_per_task) $consumable_memory |
---|
| 712 | # @ output = $remote_dayfile |
---|
| 713 | # @ error = $remote_dayfile |
---|
[693] | 714 | $wall_clock_limit |
---|
[622] | 715 | $image_size |
---|
[312] | 716 | $class |
---|
| 717 | $environment |
---|
[1] | 718 | $network_to_use |
---|
| 719 | $data_limit |
---|
[693] | 720 | $rset |
---|
| 721 | $mcm_affinity_options |
---|
[814] | 722 | $task_affinity |
---|
[1] | 723 | $notification |
---|
[693] | 724 | $notify_user |
---|
[1] | 725 | |
---|
| 726 | %%END%% |
---|
| 727 | |
---|
| 728 | if (( nodes > 0 )) |
---|
| 729 | then |
---|
| 730 | |
---|
[693] | 731 | if [[ $remote_host != ibmkisti ]] |
---|
| 732 | then |
---|
| 733 | |
---|
| 734 | cat >> $job_to_send << %%END%% |
---|
[1] | 735 | # @ node = $nodes |
---|
[622] | 736 | # @ tasks_per_node = $processes_per_node |
---|
[1] | 737 | # @ node_usage = $node_usage |
---|
| 738 | # @ queue |
---|
| 739 | |
---|
| 740 | %%END%% |
---|
| 741 | |
---|
[693] | 742 | else |
---|
| 743 | |
---|
| 744 | cat >> $job_to_send << %%END%% |
---|
[696] | 745 | # @ total_tasks = $mpi_tasks |
---|
[693] | 746 | # @ blocking = unlimited |
---|
| 747 | # @ queue |
---|
| 748 | |
---|
| 749 | %%END%% |
---|
| 750 | |
---|
| 751 | fi |
---|
| 752 | |
---|
[1] | 753 | else |
---|
| 754 | |
---|
| 755 | if [[ $remote_host != ibmy ]] |
---|
| 756 | then |
---|
| 757 | |
---|
| 758 | cat >> $job_to_send << %%END%% |
---|
| 759 | # @ blocking = unlimited |
---|
| 760 | # @ total_tasks = $numprocs |
---|
| 761 | # @ node_usage = $node_usage |
---|
| 762 | # @ queue |
---|
| 763 | |
---|
| 764 | %%END%% |
---|
| 765 | |
---|
| 766 | else |
---|
| 767 | |
---|
| 768 | cat >> $job_to_send << %%END%% |
---|
| 769 | # @ node = 1 |
---|
| 770 | # @ total_tasks = $numprocs |
---|
| 771 | # @ queue |
---|
| 772 | |
---|
| 773 | %%END%% |
---|
| 774 | |
---|
| 775 | fi |
---|
| 776 | |
---|
| 777 | fi |
---|
| 778 | |
---|
[696] | 779 | # workaround because of silly job filter on ibmkisti |
---|
| 780 | if [[ $remote_host = ibmkisti && $threads_per_task != 1 ]] |
---|
| 781 | then |
---|
| 782 | echo "export OMP_NUM_THREADS=$threads_per_task" >> $job_to_send |
---|
| 783 | fi |
---|
| 784 | |
---|
[1] | 785 | elif [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs = 0 ]] |
---|
| 786 | then |
---|
| 787 | |
---|
| 788 | cat > $job_to_send << %%END%% |
---|
| 789 | #!/bin/ksh |
---|
| 790 | |
---|
| 791 | # @ job_type = serial |
---|
| 792 | # @ node_usage = $node_usage |
---|
| 793 | # @ job_name = palm |
---|
| 794 | # @ wall_clock_limit = ${timestring},$timestring |
---|
| 795 | # @ resources = ConsumableCpus(1) ConsumableMemory(1 gb) |
---|
| 796 | # @ output = $remote_dayfile |
---|
| 797 | # @ error = $remote_dayfile |
---|
[312] | 798 | $class |
---|
[1] | 799 | $notification |
---|
| 800 | |
---|
| 801 | # @ queue |
---|
| 802 | |
---|
| 803 | %%END%% |
---|
| 804 | |
---|
[1274] | 805 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1224] | 806 | then |
---|
| 807 | |
---|
| 808 | if [[ $numprocs != 0 ]] |
---|
| 809 | then |
---|
| 810 | cat > $job_to_send << %%END%% |
---|
[1255] | 811 | #!/bin/bash |
---|
[1224] | 812 | #PBS -N $job_name |
---|
| 813 | #PBS -l walltime=$timestring |
---|
[1264] | 814 | #PBS -l nodes=$nodes:ppn=$processes_per_node |
---|
[1224] | 815 | #PBS -o $remote_dayfile |
---|
| 816 | #PBS -j oe |
---|
| 817 | #PBS -q $queue |
---|
| 818 | |
---|
| 819 | $module_calls |
---|
| 820 | |
---|
| 821 | %%END%% |
---|
| 822 | |
---|
| 823 | else |
---|
| 824 | |
---|
| 825 | continue |
---|
| 826 | |
---|
| 827 | fi |
---|
| 828 | |
---|
[1197] | 829 | elif [[ $remote_host = lccrayf ]] |
---|
| 830 | then |
---|
| 831 | |
---|
| 832 | if [[ $numprocs != 0 ]] |
---|
| 833 | then |
---|
| 834 | cat > $job_to_send << %%END%% |
---|
| 835 | #!/bin/bash -l |
---|
| 836 | #SBATCH -J $job_name |
---|
| 837 | #SBATCH -t $timestring |
---|
| 838 | #SBATCH -N $nodes |
---|
| 839 | #SBATCH --ntasks-per-node=$processes_per_node |
---|
| 840 | #SBATCH -p $queue |
---|
| 841 | #SBATCH -o $remote_dayfile |
---|
| 842 | #SBATCH -e $remote_dayfile |
---|
| 843 | |
---|
| 844 | $init_cmds |
---|
| 845 | $module_calls |
---|
| 846 | |
---|
| 847 | %%END%% |
---|
| 848 | |
---|
| 849 | else |
---|
| 850 | cat > $job_to_send << %%END%% |
---|
| 851 | #!/bin/bash -l |
---|
| 852 | #SBATCH -J $job_name |
---|
| 853 | #SBATCH -t $timestring |
---|
| 854 | #SBATCH -l ncpus=1 |
---|
| 855 | #SBATCH -l pmem=${memory}mb |
---|
| 856 | #SBATCH -m abe |
---|
| 857 | #SBATCH -o $remote_dayfile |
---|
| 858 | #SBATCH -e $remote_dayfile |
---|
| 859 | |
---|
| 860 | $init_cmds |
---|
| 861 | $module_calls |
---|
| 862 | |
---|
| 863 | %%END%% |
---|
| 864 | |
---|
| 865 | fi |
---|
| 866 | |
---|
[108] | 867 | elif [[ $remote_host = lcfimm ]] |
---|
| 868 | then |
---|
| 869 | |
---|
| 870 | if [[ $numprocs != 0 ]] |
---|
| 871 | then |
---|
| 872 | cat > $job_to_send << %%END%% |
---|
| 873 | #!/bin/ksh |
---|
| 874 | #PBS -N $job_name |
---|
[552] | 875 | #PBS -A $project_account |
---|
[108] | 876 | #PBS -l walltime=$timestring |
---|
[622] | 877 | #PBS -l nodes=${nodes}:ppn=$processes_per_node |
---|
[108] | 878 | #PBS -l pmem=${memory}mb |
---|
| 879 | #PBS -m abe |
---|
| 880 | #PBS -o $remote_dayfile |
---|
| 881 | #PBS -j oe |
---|
| 882 | mpd & |
---|
| 883 | |
---|
| 884 | %%END%% |
---|
| 885 | |
---|
[168] | 886 | else |
---|
| 887 | cat > $job_to_send << %%END%% |
---|
| 888 | #!/bin/ksh |
---|
| 889 | #PBS -N $job_name |
---|
[552] | 890 | #PBS -A $project_account |
---|
[168] | 891 | #PBS -l walltime=$timestring |
---|
| 892 | #PBS -l ncpus=1 |
---|
| 893 | #PBS -l pmem=${memory}mb |
---|
| 894 | #PBS -m abe |
---|
| 895 | #PBS -o $remote_dayfile |
---|
| 896 | #PBS -j oe |
---|
| 897 | |
---|
| 898 | %%END%% |
---|
| 899 | |
---|
| 900 | fi |
---|
| 901 | |
---|
[1099] | 902 | elif [[ $remote_host = lcflow ]] |
---|
| 903 | then |
---|
[1202] | 904 | if [ $memory -gt 1800 ]; then |
---|
[1099] | 905 | use_himem="" |
---|
| 906 | else |
---|
| 907 | use_himem="#" |
---|
| 908 | fi |
---|
| 909 | if [[ $numprocs != 0 ]] |
---|
| 910 | then |
---|
[1202] | 911 | pe_set="#$ -pe impi41 $numprocs" |
---|
[1099] | 912 | else |
---|
[1202] | 913 | pe_set="#$ -pe impi41 1" |
---|
[1099] | 914 | fi |
---|
| 915 | if [[ $queue = default ]] |
---|
| 916 | then |
---|
| 917 | queue_set="" |
---|
| 918 | else |
---|
| 919 | queue_set="#$ -q $queue" |
---|
| 920 | fi |
---|
| 921 | [[ "$disc_space" = "" ]] && disc_space=50 |
---|
| 922 | |
---|
| 923 | cat > $job_to_send << %%END%% |
---|
| 924 | #!/bin/bash |
---|
| 925 | #$ -S /bin/bash |
---|
| 926 | #$ -N $job_name |
---|
| 927 | #$ -cwd |
---|
| 928 | #$ -l h_rt=$timestring |
---|
| 929 | #$ -l h_vmem=${memory}M |
---|
| 930 | #$ -o $remote_dayfile |
---|
| 931 | #$ -j y |
---|
| 932 | $pe_set |
---|
| 933 | #$ -R y |
---|
| 934 | ${use_himem}#$ -l highmem=true |
---|
| 935 | #$ -l h_fsize=${disc_space}G |
---|
| 936 | $queue_set |
---|
| 937 | |
---|
| 938 | %%END%% |
---|
| 939 | |
---|
[1021] | 940 | elif [[ $remote_host = lck || $remote_host = lckordi || $remote_host = lcsb ]] |
---|
[368] | 941 | then |
---|
| 942 | |
---|
| 943 | if [[ $numprocs != 0 ]] |
---|
| 944 | then |
---|
| 945 | cat > $job_to_send << %%END%% |
---|
| 946 | #!/bin/ksh |
---|
| 947 | #PBS -N $job_name |
---|
| 948 | #PBS -l walltime=$timestring |
---|
| 949 | #PBS -l ncpus=$numprocs |
---|
| 950 | #PBS -l pmem=${memory}mb |
---|
| 951 | #PBS -o $remote_dayfile |
---|
[1021] | 952 | #PBS -l nodes=$nodes:ppn=${processes_per_node} |
---|
[368] | 953 | #PBS -j oe |
---|
| 954 | |
---|
| 955 | mpd & |
---|
| 956 | |
---|
| 957 | %%END%% |
---|
| 958 | |
---|
| 959 | else |
---|
| 960 | cat > $job_to_send << %%END%% |
---|
| 961 | #!/bin/ksh |
---|
| 962 | #PBS -N $job_name |
---|
| 963 | #PBS -l walltime=$timestring |
---|
| 964 | #PBS -l ncpus=1 |
---|
| 965 | #PBS -l pmem=${memory}mb |
---|
| 966 | #PBS -o $remote_dayfile |
---|
| 967 | #PBS -j oe |
---|
| 968 | |
---|
| 969 | %%END%% |
---|
| 970 | |
---|
| 971 | fi |
---|
| 972 | |
---|
[1040] | 973 | elif [[ $remote_host = lckiaps ]] |
---|
| 974 | then |
---|
| 975 | |
---|
| 976 | if [[ $numprocs != 0 ]] |
---|
| 977 | then |
---|
| 978 | cat > $job_to_send << %%END%% |
---|
| 979 | #!/bin/ksh |
---|
| 980 | #PBS -N $job_name |
---|
| 981 | #PBS -l walltime=$timestring |
---|
| 982 | #PBS -l select=1:ncpus=$numprocs |
---|
| 983 | #PBS -l pmem=${memory}mb |
---|
| 984 | #PBS -q $queue |
---|
| 985 | #PBS -o $remote_dayfile |
---|
| 986 | #PBS -j oe |
---|
| 987 | #PBS -V |
---|
| 988 | |
---|
| 989 | %%END%% |
---|
| 990 | |
---|
| 991 | else |
---|
| 992 | cat > $job_to_send << %%END%% |
---|
| 993 | #!/bin/ksh |
---|
| 994 | #PBS -N $job_name |
---|
| 995 | #PBS -l walltime=$timestring |
---|
| 996 | #PBS -l ncpus=1 |
---|
| 997 | #PBS -l pmem=${memory}mb |
---|
| 998 | #PBS -o $remote_dayfile |
---|
| 999 | #PBS -j oe |
---|
| 1000 | |
---|
| 1001 | %%END%% |
---|
| 1002 | |
---|
| 1003 | fi |
---|
| 1004 | |
---|
[693] | 1005 | elif [[ $remote_host = lcyon ]] |
---|
| 1006 | then |
---|
| 1007 | |
---|
| 1008 | if [[ $numprocs != 0 ]] |
---|
| 1009 | then |
---|
| 1010 | cat > $job_to_send << %%END%% |
---|
| 1011 | #!/bin/ksh |
---|
| 1012 | #PBS -N $job_name |
---|
| 1013 | #PBS -l walltime=$timestring |
---|
| 1014 | #PBS -l ncpus=$numprocs |
---|
| 1015 | #PBS -l pmem=${memory}mb |
---|
| 1016 | #PBS -o $remote_dayfile |
---|
| 1017 | #PBS -j oe |
---|
| 1018 | |
---|
| 1019 | %%END%% |
---|
| 1020 | |
---|
| 1021 | else |
---|
| 1022 | cat > $job_to_send << %%END%% |
---|
| 1023 | #!/bin/ksh |
---|
| 1024 | #PBS -N $job_name |
---|
| 1025 | #PBS -l walltime=$timestring |
---|
| 1026 | #PBS -l ncpus=1 |
---|
| 1027 | #PBS -l pmem=${memory}mb |
---|
| 1028 | #PBS -o $remote_dayfile |
---|
| 1029 | #PBS -j oe |
---|
| 1030 | |
---|
| 1031 | %%END%% |
---|
| 1032 | |
---|
| 1033 | fi |
---|
| 1034 | |
---|
[181] | 1035 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
[179] | 1036 | then |
---|
| 1037 | |
---|
[376] | 1038 | if [[ "$sgi_feature" != "" ]] |
---|
| 1039 | then |
---|
| 1040 | feature_directive="#PBS -l feature=$sgi_feature" |
---|
| 1041 | else |
---|
| 1042 | feature_directive="" |
---|
| 1043 | fi |
---|
[799] | 1044 | |
---|
[416] | 1045 | if [[ $queue = dataq || $queue = permq ]] |
---|
[399] | 1046 | then |
---|
| 1047 | feature_directive="#PBS -l feature=data" |
---|
| 1048 | fi |
---|
[376] | 1049 | |
---|
[789] | 1050 | if [[ $queue = testq || $queue = mediumq || $queue = bigq || $queue = workq || $queue = dataq || $queue = permq || $queue = serialq || $queue = special1q ]] |
---|
[191] | 1051 | then |
---|
| 1052 | queue_directive="#PBS -q $queue" |
---|
| 1053 | else |
---|
| 1054 | queue_directive="" |
---|
| 1055 | fi |
---|
| 1056 | |
---|
[352] | 1057 | if [[ $email_notification = none ]] |
---|
| 1058 | then |
---|
| 1059 | email_directive="" |
---|
| 1060 | else |
---|
| 1061 | email_directive="#PBS -M $email_notification" |
---|
| 1062 | fi |
---|
| 1063 | |
---|
[179] | 1064 | if [[ $numprocs != 0 ]] |
---|
| 1065 | then |
---|
| 1066 | cat > $job_to_send << %%END%% |
---|
[181] | 1067 | #!/bin/bash |
---|
[179] | 1068 | #PBS -N $job_name |
---|
| 1069 | #PBS -l walltime=$timestring |
---|
[622] | 1070 | #PBS -l nodes=$nodes:ppn=${processes_per_node} |
---|
[181] | 1071 | #PBS -l naccesspolicy=$node_usage |
---|
[179] | 1072 | #PBS -o $remote_dayfile |
---|
| 1073 | #PBS -j oe |
---|
[376] | 1074 | $feature_directive |
---|
[191] | 1075 | $queue_directive |
---|
[352] | 1076 | $email_directive |
---|
[179] | 1077 | |
---|
[622] | 1078 | eval \`/sw/swdist/bin/modulesinit\` |
---|
| 1079 | #. /usr/share/modules/init/bash |
---|
[892] | 1080 | $init_cmds |
---|
[493] | 1081 | $module_calls |
---|
[374] | 1082 | |
---|
[181] | 1083 | echo ld_library_path=\$LD_LIBRARY_PATH |
---|
[179] | 1084 | |
---|
| 1085 | %%END%% |
---|
| 1086 | |
---|
| 1087 | else |
---|
| 1088 | cat > $job_to_send << %%END%% |
---|
| 1089 | #PBS -S /bin/bash |
---|
| 1090 | #PBS -N $job_name |
---|
| 1091 | #PBS -l walltime=$timestring |
---|
| 1092 | #PBS -l ncpus=1 |
---|
| 1093 | #PBS -o $remote_dayfile |
---|
[475] | 1094 | #PBS -j oe |
---|
[400] | 1095 | $queue_directive |
---|
| 1096 | $email_directive |
---|
[179] | 1097 | |
---|
[622] | 1098 | eval \`/sw/swdist/bin/modulesinit\` |
---|
| 1099 | #. /usr/share/modules/init/bash |
---|
[892] | 1100 | $init_cmds |
---|
[493] | 1101 | $module_calls |
---|
[475] | 1102 | |
---|
[179] | 1103 | %%END%% |
---|
| 1104 | |
---|
| 1105 | fi |
---|
| 1106 | |
---|
[892] | 1107 | elif [[ $remote_host = lcxe6 ]] |
---|
[164] | 1108 | then |
---|
| 1109 | |
---|
| 1110 | if [[ $numprocs != 0 ]] |
---|
| 1111 | then |
---|
| 1112 | cat > $job_to_send << %%END%% |
---|
[799] | 1113 | #!/bin/ksh |
---|
[164] | 1114 | #PBS -S /bin/ksh |
---|
| 1115 | #PBS -N $job_name |
---|
[552] | 1116 | #PBS -A $project_account |
---|
[206] | 1117 | #PBS -j oe |
---|
[164] | 1118 | #PBS -l walltime=$timestring |
---|
| 1119 | #PBS -l mppwidth=${numprocs} |
---|
[622] | 1120 | #PBS -l mppnppn=${processes_per_node} |
---|
[164] | 1121 | #PBS -m abe |
---|
| 1122 | #PBS -o $remote_dayfile |
---|
[492] | 1123 | $email_directive |
---|
[164] | 1124 | |
---|
[892] | 1125 | $init_cmds |
---|
[493] | 1126 | $module_calls |
---|
[343] | 1127 | |
---|
[164] | 1128 | %%END%% |
---|
| 1129 | |
---|
[108] | 1130 | else |
---|
| 1131 | cat > $job_to_send << %%END%% |
---|
| 1132 | #!/bin/ksh |
---|
[168] | 1133 | #PBS -S /bin/ksh |
---|
[108] | 1134 | #PBS -N $job_name |
---|
[552] | 1135 | #PBS -A $project_account |
---|
[206] | 1136 | #PBS -j oe |
---|
[108] | 1137 | #PBS -l walltime=$timestring |
---|
| 1138 | #PBS -l ncpus=1 |
---|
| 1139 | #PBS -l pmem=${memory}mb |
---|
| 1140 | #PBS -m abe |
---|
[492] | 1141 | $email_directive |
---|
[108] | 1142 | #PBS -o $remote_dayfile |
---|
| 1143 | |
---|
[892] | 1144 | $init_cmds |
---|
[493] | 1145 | $module_calls |
---|
[343] | 1146 | |
---|
[108] | 1147 | %%END%% |
---|
| 1148 | |
---|
| 1149 | fi |
---|
| 1150 | |
---|
[440] | 1151 | elif [[ $remote_host = lckyoto ]] |
---|
[437] | 1152 | then |
---|
| 1153 | |
---|
[440] | 1154 | cat > $job_to_send << %%END%% |
---|
[799] | 1155 | #!/bin/ksh |
---|
[440] | 1156 | # @\$-o $remote_dayfile |
---|
| 1157 | # @\$-eo -oi |
---|
| 1158 | # @\$-lP 16 |
---|
[799] | 1159 | # @\$-lp 1 |
---|
[440] | 1160 | # @\$-lm 28gb -llm unlimited -ls unlimited |
---|
| 1161 | # @\$-q $queue |
---|
| 1162 | # @\$-Pvn abs_pack |
---|
| 1163 | ##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack |
---|
| 1164 | #. /thin/local/etc/setprofile/intel-11.0.sh |
---|
| 1165 | #. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh |
---|
| 1166 | . ~/.myprofile |
---|
| 1167 | #. /home2/t/t51254/palm/current_version/myprofile |
---|
| 1168 | #. /thin/apps/pgi/mpi.sh |
---|
| 1169 | # |
---|
| 1170 | env |
---|
| 1171 | # |
---|
| 1172 | set -x |
---|
| 1173 | |
---|
| 1174 | %%END%% |
---|
| 1175 | |
---|
| 1176 | elif [[ $remote_host = lcxt5m ]] |
---|
| 1177 | then |
---|
| 1178 | |
---|
[437] | 1179 | if [[ $numprocs != 0 ]] |
---|
| 1180 | then |
---|
| 1181 | cat > $job_to_send << %%END%% |
---|
[799] | 1182 | #!/bin/ksh |
---|
[437] | 1183 | #PBS -S /bin/ksh |
---|
| 1184 | #PBS -N $job_name |
---|
| 1185 | #PBS -j oe |
---|
| 1186 | #PBS -l walltime=$timestring |
---|
| 1187 | #PBS -l mppwidth=${numprocs} |
---|
[622] | 1188 | #PBS -l mppnppn=${processes_per_node} |
---|
[437] | 1189 | #PBS -m abe |
---|
| 1190 | #PBS -o $remote_dayfile |
---|
| 1191 | |
---|
[892] | 1192 | $init_cmds |
---|
[493] | 1193 | $module_calls |
---|
[437] | 1194 | |
---|
| 1195 | %%END%% |
---|
| 1196 | |
---|
| 1197 | else |
---|
| 1198 | cat > $job_to_send << %%END%% |
---|
| 1199 | #!/bin/ksh |
---|
| 1200 | #PBS -S /bin/ksh |
---|
| 1201 | #PBS -N $job_name |
---|
| 1202 | #PBS -j oe |
---|
| 1203 | #PBS -l walltime=$timestring |
---|
| 1204 | #PBS -l ncpus=1 |
---|
| 1205 | #PBS -l pmem=${memory}mb |
---|
| 1206 | #PBS -m abe |
---|
| 1207 | #PBS -o $remote_dayfile |
---|
| 1208 | |
---|
[892] | 1209 | $init_cmds |
---|
[493] | 1210 | $module_calls |
---|
[437] | 1211 | |
---|
| 1212 | %%END%% |
---|
| 1213 | |
---|
| 1214 | fi |
---|
| 1215 | |
---|
[1099] | 1216 | elif [[ $remote_host = lckyuh ]] |
---|
| 1217 | then |
---|
| 1218 | cat > $job_to_send << %%END%% |
---|
| 1219 | #!/bin/bash |
---|
| 1220 | #PJM -L "rscgrp=$queue" |
---|
| 1221 | #PJM -L "node=$nodes" |
---|
| 1222 | #PJM --mpi "proc=$numprocs" |
---|
| 1223 | #PJM -L "elapse=$timestring" |
---|
| 1224 | #PJM -o $remote_dayfile |
---|
| 1225 | #PJM -j |
---|
| 1226 | #PJM -X |
---|
| 1227 | #PJM --no-stging |
---|
| 1228 | |
---|
| 1229 | export LANG=en_US.UTF-8 |
---|
| 1230 | %%END%% |
---|
| 1231 | |
---|
[1090] | 1232 | elif [[ $remote_host = lckyut ]] |
---|
| 1233 | then |
---|
| 1234 | cat > $job_to_send << %%END%% |
---|
| 1235 | #!/bin/bash |
---|
[1099] | 1236 | #PJM -L "rscgrp=$queue" |
---|
[1090] | 1237 | #PJM -L "vnode=$numprocs" |
---|
| 1238 | #PJM -L "vnode-core=1" |
---|
| 1239 | #PJM -L "elapse=$timestring" |
---|
| 1240 | #PJM --mpi proc=$numprocs |
---|
| 1241 | #PJM -o $remote_dayfile |
---|
| 1242 | #PJM -j |
---|
[1099] | 1243 | #PJM -X |
---|
| 1244 | #PJM --no-stging |
---|
[1090] | 1245 | |
---|
| 1246 | export LANG=en_US.UTF-8 |
---|
| 1247 | %%END%% |
---|
| 1248 | |
---|
[1] | 1249 | elif [[ $remote_host = nech ]] |
---|
| 1250 | then |
---|
| 1251 | |
---|
| 1252 | if (( nodes > 1 )) |
---|
| 1253 | then |
---|
| 1254 | cat > $job_to_send << %%END%% |
---|
| 1255 | #!/bin/ksh |
---|
[622] | 1256 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
[1] | 1257 | #PBS -l ${qsubmem}=${Memory}gb |
---|
| 1258 | #PBS -b $nodes |
---|
| 1259 | #PBS -o $remote_dayfile |
---|
| 1260 | #PBS -N palm |
---|
| 1261 | #PBS -j o |
---|
| 1262 | #PBS -T mpisx |
---|
| 1263 | |
---|
| 1264 | %%END%% |
---|
| 1265 | |
---|
| 1266 | elif [[ $numprocs != 0 ]] |
---|
| 1267 | then |
---|
| 1268 | cat > $job_to_send << %%END%% |
---|
| 1269 | #!/bin/ksh |
---|
[622] | 1270 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
[1] | 1271 | #PBS -l ${qsubmem}=${Memory}gb |
---|
| 1272 | #PBS -o $remote_dayfile |
---|
| 1273 | #PBS -N palm |
---|
| 1274 | #PBS -j o |
---|
| 1275 | |
---|
| 1276 | %%END%% |
---|
| 1277 | |
---|
| 1278 | else |
---|
| 1279 | cat > $job_to_send << %%END%% |
---|
| 1280 | #!/bin/ksh |
---|
| 1281 | #PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime |
---|
| 1282 | #PBS -o $remote_dayfile |
---|
| 1283 | #PBS -j o |
---|
| 1284 | |
---|
| 1285 | %%END%% |
---|
| 1286 | |
---|
| 1287 | fi |
---|
| 1288 | |
---|
[251] | 1289 | elif [[ $remote_host = necriam ]] |
---|
[35] | 1290 | then |
---|
| 1291 | |
---|
| 1292 | if (( nodes > 1 )) |
---|
| 1293 | then |
---|
| 1294 | cat > $job_to_send << %%END%% |
---|
| 1295 | #!/bin/ksh |
---|
| 1296 | #PBS -b $nodes |
---|
| 1297 | #PBS -o $remote_dayfile |
---|
[253] | 1298 | #PBS -N $job_name |
---|
[35] | 1299 | #PBS -j o |
---|
[251] | 1300 | #PBS -v MPIPROGINV=YES |
---|
[35] | 1301 | |
---|
| 1302 | %%END%% |
---|
| 1303 | |
---|
| 1304 | elif [[ $numprocs != 0 ]] |
---|
| 1305 | then |
---|
| 1306 | cat > $job_to_send << %%END%% |
---|
| 1307 | #!/bin/ksh |
---|
| 1308 | #PBS -q ${queue} |
---|
| 1309 | #PBS -o $remote_dayfile |
---|
[253] | 1310 | #PBS -N $job_name |
---|
[35] | 1311 | #PBS -j o |
---|
[251] | 1312 | #PBS -v MPIPROGINV=YES |
---|
[35] | 1313 | |
---|
| 1314 | %%END%% |
---|
| 1315 | |
---|
| 1316 | else |
---|
| 1317 | cat > $job_to_send << %%END%% |
---|
| 1318 | #!/bin/ksh |
---|
| 1319 | #PBS -o $remote_dayfile |
---|
| 1320 | #PBS -j o |
---|
| 1321 | |
---|
| 1322 | %%END%% |
---|
| 1323 | |
---|
| 1324 | fi |
---|
| 1325 | |
---|
[1] | 1326 | elif [[ $remote_host = lctit ]] |
---|
| 1327 | then |
---|
| 1328 | cat > $job_to_send << %%END%% |
---|
[635] | 1329 | #!/bin/ksh |
---|
[892] | 1330 | $init_cmds |
---|
[678] | 1331 | $module_calls |
---|
| 1332 | |
---|
[1] | 1333 | %%END%% |
---|
| 1334 | |
---|
| 1335 | # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN |
---|
[678] | 1336 | if [[ $tasks_per_node != $processes_per_node ]] |
---|
| 1337 | then |
---|
| 1338 | submcom="$submcom -W group_list=$group_number -N $job_name -l walltime=$timestring -l select=$nodes:ncpus=$processes_per_node:mpiprocs=$tasks_per_node:mem=${Memory}gb -o $remote_dayfile -j oe -q $queue " |
---|
| 1339 | else |
---|
| 1340 | submcom="$submcom -W group_list=$group_number -N $job_name -l walltime=$timestring -l select=$nodes:ncpus=$processes_per_node:mpiprocs=$tasks_per_node:mem=${Memory}gb -l place=scatter -o $remote_dayfile -j oe -q $queue " |
---|
| 1341 | fi |
---|
[1] | 1342 | |
---|
| 1343 | else |
---|
| 1344 | |
---|
| 1345 | cat > $job_to_send << %%END%% |
---|
| 1346 | # @\$-q ${queue} |
---|
| 1347 | # @\$-l${qsubtime} $timestring |
---|
| 1348 | # @\$-l${qsubmem} ${memory}mb |
---|
| 1349 | # @\$-o $remote_dayfile |
---|
| 1350 | # @\$-eo |
---|
| 1351 | |
---|
| 1352 | %%END%% |
---|
| 1353 | |
---|
| 1354 | fi |
---|
| 1355 | |
---|
| 1356 | |
---|
| 1357 | # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP |
---|
| 1358 | # BEI EXIT VERANLASSEN |
---|
| 1359 | # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT |
---|
| 1360 | # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH |
---|
| 1361 | if [[ $delete_dayfile = false && $remote_host != $local_host ]] |
---|
| 1362 | then |
---|
| 1363 | echo "set +vx" >> $job_to_send |
---|
| 1364 | echo "trap '" >> $job_to_send |
---|
| 1365 | echo "set +vx" >> $job_to_send |
---|
[1274] | 1366 | if [[ $(echo $remote_host | cut -c1-3) = ibm || $remote_host = lccrayb || $remote_host = lccrayh || $(echo $remote_host | cut -c1-5) = lcsgi || $(echo $remote_host | cut -c1-3) = nec || $remote_host = lcflow || $remote_host = lckiaps || $remote_host = lckyu* ]] |
---|
[1] | 1367 | then |
---|
[622] | 1368 | if [[ $remote_host = ibmh ]] |
---|
[1] | 1369 | then |
---|
| 1370 | return_queue=c1 |
---|
[693] | 1371 | elif [[ $remote_host = ibmkisti ]] |
---|
| 1372 | then |
---|
| 1373 | return_queue=class.1-2 |
---|
[622] | 1374 | elif [[ $remote_host = ibmku ]] |
---|
| 1375 | then |
---|
| 1376 | return_queue=sdbg2 |
---|
[1] | 1377 | elif [[ $remote_host = ibms ]] |
---|
| 1378 | then |
---|
| 1379 | return_queue=p_normal |
---|
| 1380 | elif [[ $remote_host = ibmy ]] |
---|
| 1381 | then |
---|
| 1382 | return_queue=serial |
---|
[325] | 1383 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
| 1384 | then |
---|
[326] | 1385 | return_queue=serialq |
---|
[251] | 1386 | elif [[ $remote_host = necriam ]] |
---|
[1] | 1387 | then |
---|
[253] | 1388 | return_queue=SP |
---|
[1274] | 1389 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1390 | then |
---|
| 1391 | return_queue=dataq |
---|
[1040] | 1392 | elif [[ $remote_host = lckiaps ]] |
---|
| 1393 | then |
---|
| 1394 | return_queue=express |
---|
[1099] | 1395 | elif [[ $remote_host = lckyuh ]] |
---|
| 1396 | then |
---|
| 1397 | return_queue=cx-single |
---|
[1090] | 1398 | elif [[ $remote_host = lckyut ]] |
---|
| 1399 | then |
---|
| 1400 | return_queue=cx-single |
---|
[1] | 1401 | else |
---|
| 1402 | return_queue=unknown |
---|
| 1403 | fi |
---|
| 1404 | |
---|
| 1405 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 1406 | then |
---|
| 1407 | |
---|
[622] | 1408 | if [[ $remote_host = ibmku ]] |
---|
| 1409 | then |
---|
| 1410 | echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1411 | echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1412 | else |
---|
| 1413 | echo "echo \"#!/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1414 | fi |
---|
[1] | 1415 | echo "echo \"# @ job_type = serial\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1416 | echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1417 | echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1418 | echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung " >> $job_to_send |
---|
| 1419 | echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1420 | echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
[312] | 1421 | if [[ $host != "ibmh" ]] |
---|
| 1422 | then |
---|
| 1423 | echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1424 | fi |
---|
[1] | 1425 | echo "echo \"# @ image_size = 10\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1426 | echo "echo \"# @ notification = never\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1427 | |
---|
| 1428 | echo "echo \"# @ queue\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1429 | echo "echo \" \" >> scpjob.$kennung" >> $job_to_send |
---|
| 1430 | |
---|
| 1431 | echo "echo \"set -x\" >> scpjob.$kennung" >> $job_to_send |
---|
[1094] | 1432 | echo "echo \"batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \\\"$job_catalog\\\" $local_dayfile\" >> scpjob.$kennung" >> $job_to_send |
---|
[622] | 1433 | if [[ $remote_host = ibmku ]] |
---|
| 1434 | then |
---|
| 1435 | echo "echo \"rm scpjob.$kennung\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1436 | fi |
---|
[1] | 1437 | echo "echo \"exit\" >> scpjob.$kennung" >> $job_to_send |
---|
| 1438 | |
---|
| 1439 | elif [[ $remote_host = nech ]] |
---|
| 1440 | then |
---|
| 1441 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
| 1442 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1443 | echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100" >> $job_to_send |
---|
| 1444 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
| 1445 | echo "#PBS -j o" >> $job_to_send |
---|
| 1446 | echo " " >> $job_to_send |
---|
| 1447 | echo "set -x" >> $job_to_send |
---|
| 1448 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
[1094] | 1449 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1] | 1450 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1451 | echo "%%END%%" >> $job_to_send |
---|
| 1452 | |
---|
[251] | 1453 | elif [[ $remote_host = necriam ]] |
---|
[35] | 1454 | then |
---|
| 1455 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1456 | echo "#PBS -q $return_queue" >> $job_to_send |
---|
| 1457 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
| 1458 | echo "#PBS -j o" >> $job_to_send |
---|
| 1459 | echo " " >> $job_to_send |
---|
| 1460 | echo "set -x" >> $job_to_send |
---|
[1094] | 1461 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[35] | 1462 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1463 | echo "%%END%%" >> $job_to_send |
---|
| 1464 | |
---|
[1099] | 1465 | elif [[ $remote_host = lckyuh ]] |
---|
| 1466 | then |
---|
| 1467 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1468 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1469 | echo "#PJM -L \"node=1\"" >> $job_to_send |
---|
| 1470 | echo "#PJM -L \"rscgrp=$return_queue\"" >> $job_to_send |
---|
| 1471 | echo "#PJM --no-stging" >> $job_to_send |
---|
| 1472 | echo "#PJM -L \"elapse=30:00\"" >> $job_to_send |
---|
| 1473 | echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1474 | echo "#PJM -j" >> $job_to_send |
---|
| 1475 | echo " " >> $job_to_send |
---|
| 1476 | echo "export LANG=en_US.UTF-8" >> $job_to_send |
---|
| 1477 | echo "set -x" >> $job_to_send |
---|
| 1478 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1479 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1480 | echo "%%END%%" >> $job_to_send |
---|
| 1481 | |
---|
[1090] | 1482 | elif [[ $remote_host = lckyut ]] |
---|
| 1483 | then |
---|
| 1484 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1485 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1486 | echo "#PJM -L \"vnode=1\"" >> $job_to_send |
---|
| 1487 | echo "#PJM -L \"rscgrp=$return_queue\"" >> $job_to_send |
---|
| 1488 | echo "#PJM --no-stging" >> $job_to_send |
---|
| 1489 | echo "#PJM -L \"elapse=30:00\"" >> $job_to_send |
---|
| 1490 | echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1491 | echo "#PJM -j" >> $job_to_send |
---|
| 1492 | echo " " >> $job_to_send |
---|
| 1493 | echo "export LANG=en_US.UTF-8" >> $job_to_send |
---|
| 1494 | echo "set -x" >> $job_to_send |
---|
[1094] | 1495 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1090] | 1496 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1497 | echo "%%END%%" >> $job_to_send |
---|
| 1498 | |
---|
[181] | 1499 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
| 1500 | then |
---|
| 1501 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1502 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1503 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
[325] | 1504 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
[181] | 1505 | echo "#PBS -l nodes=1:ppn=1" >> $job_to_send |
---|
[366] | 1506 | echo "#PBS -l feature=data" >> $job_to_send |
---|
[181] | 1507 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1508 | echo "#PBS -j oe" >> $job_to_send |
---|
| 1509 | echo " " >> $job_to_send |
---|
| 1510 | echo ". /usr/share/modules/init/bash" >> $job_to_send |
---|
| 1511 | echo "set -x" >> $job_to_send |
---|
[1094] | 1512 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[181] | 1513 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1514 | echo "%%END%%" >> $job_to_send |
---|
| 1515 | |
---|
[1274] | 1516 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1517 | then |
---|
| 1518 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1519 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1520 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
| 1521 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
[1262] | 1522 | echo "#PBS -l nodes=1:ppn=1" >> $job_to_send |
---|
[1255] | 1523 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1524 | echo "#PBS -j oe" >> $job_to_send |
---|
| 1525 | echo " " >> $job_to_send |
---|
| 1526 | echo "set -x" >> $job_to_send |
---|
| 1527 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1528 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1529 | echo "%%END%%" >> $job_to_send |
---|
| 1530 | |
---|
[1099] | 1531 | elif [[ $remote_host = lcflow ]] |
---|
| 1532 | then |
---|
| 1533 | echo "cat > scpjob.${kennung}.tmp << %%END%%" >> $job_to_send |
---|
| 1534 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1535 | echo "SGEPREFIX -S /bin/bash" >> $job_to_send |
---|
| 1536 | echo "SGEPREFIX -N transfer_$job_name" >> $job_to_send |
---|
| 1537 | echo "SGEPREFIX -cwd" >> $job_to_send |
---|
| 1538 | echo "SGEPREFIX -l h_rt=01:00:00" >> $job_to_send |
---|
[1202] | 1539 | echo "SGEPREFIX -l h_vmem=500M" >> $job_to_send |
---|
| 1540 | echo "SGEPREFIX -l excl_flow=false" >> $job_to_send |
---|
[1099] | 1541 | echo "SGEPREFIX -j y" >> $job_to_send |
---|
| 1542 | echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung" >> $job_to_send |
---|
| 1543 | echo " " >> $job_to_send |
---|
| 1544 | echo "set -x" >> $job_to_send |
---|
| 1545 | echo "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:' >> $job_to_send |
---|
| 1546 | echo "export PATH=\$PATH:\$PALM_BIN" >> $job_to_send |
---|
| 1547 | echo "" >> $job_to_send |
---|
| 1548 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1549 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1550 | echo "rm -f scpjob.${kennung}" >> $job_to_send |
---|
| 1551 | echo "%%END%%" >> $job_to_send |
---|
| 1552 | echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >> $job_to_send |
---|
| 1553 | echo "rm -f scpjob.${kennung}.tmp" >> $job_to_send |
---|
| 1554 | |
---|
[1] | 1555 | else |
---|
| 1556 | |
---|
| 1557 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
| 1558 | echo "# @\\\$-q $return_queue" >> $job_to_send |
---|
| 1559 | echo "# @\\\$-l${qsubtime} 10" >> $job_to_send |
---|
| 1560 | echo "# @\\\$-l${qsubmem} 10mb" >> $job_to_send |
---|
| 1561 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es ]] |
---|
| 1562 | then |
---|
| 1563 | echo "# @\$-l mpp_p=0" >> $job_to_send |
---|
| 1564 | fi |
---|
| 1565 | echo '# @\$-lF 10mb' >> $job_to_send |
---|
| 1566 | # echo '# @\$-o /dev/null' >> $job_to_send |
---|
| 1567 | echo '# @\$-o job_queue/last_job_transfer_protocol' >> $job_to_send |
---|
| 1568 | echo '# @\\\$-eo' >> $job_to_send |
---|
| 1569 | echo " " >> $job_to_send |
---|
| 1570 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
| 1571 | then |
---|
| 1572 | echo "set +vx" >> $job_to_send |
---|
| 1573 | echo ". .profile" >> $job_to_send |
---|
| 1574 | fi |
---|
| 1575 | echo "set -x" >> $job_to_send |
---|
[1094] | 1576 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send |
---|
[1] | 1577 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1578 | echo "%%END%%" >> $job_to_send |
---|
| 1579 | fi |
---|
| 1580 | |
---|
| 1581 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 1582 | then |
---|
| 1583 | echo "llsubmit scpjob.$kennung" >> $job_to_send |
---|
[1274] | 1584 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1585 | then |
---|
[1266] | 1586 | echo "msub -q $return_queue scpjob.$kennung" >> $job_to_send |
---|
[181] | 1587 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
| 1588 | then |
---|
[748] | 1589 | echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1590 | echo "chmod u+x scpjob.$kennung" >> $job_to_send |
---|
| 1591 | echo "msub scpjob.$kennung" >> $job_to_send |
---|
[1] | 1592 | elif [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
| 1593 | then |
---|
| 1594 | echo "qsub -J n scpjob.$kennung" >> $job_to_send |
---|
| 1595 | elif [[ $remote_host = t3es ]] |
---|
| 1596 | then |
---|
| 1597 | echo "qsub -J n -s /bin/ksh scpjob.$kennung" >> $job_to_send |
---|
[1043] | 1598 | elif [[ $remote_host = lckiaps ]] |
---|
| 1599 | then |
---|
| 1600 | echo "mv scpjob.$kennung $job_catalog" >> $job_to_send |
---|
[1094] | 1601 | echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send |
---|
[1043] | 1602 | echo "rm ${job_catalog}/scpjob.$kennung" >> $job_to_send |
---|
[1099] | 1603 | elif [[ $remote_host = lckyu* ]] |
---|
[1090] | 1604 | then |
---|
[1094] | 1605 | echo "scp $PORTOPT scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send |
---|
| 1606 | echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send |
---|
[1099] | 1607 | elif [[ $remote_host = lcflow ]] |
---|
| 1608 | then |
---|
| 1609 | echo "mv scpjob.$kennung $job_catalog" >> $job_to_send |
---|
[1202] | 1610 | echo "/usr/bin/ssh ${remote_username}@${remote_addres} \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" " >> $job_to_send |
---|
[1] | 1611 | else |
---|
[1040] | 1612 | echo "$submcom scpjob.$kennung" >> $job_to_send |
---|
[1] | 1613 | fi |
---|
[1043] | 1614 | if [[ $remote_host != ibmku && $remote_host != lckiaps ]] |
---|
[622] | 1615 | then |
---|
| 1616 | echo "rm scpjob.$kennung" >> $job_to_send |
---|
| 1617 | fi |
---|
[1] | 1618 | if [[ $remote_host = nech ]] |
---|
| 1619 | then |
---|
| 1620 | echo "cd -" >> $job_to_send |
---|
| 1621 | fi |
---|
| 1622 | else |
---|
| 1623 | # echo "ftpcopy -d $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1624 | echo "nohup ftpcopy -d -w 15 $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null &" >> $job_to_send |
---|
| 1625 | fi |
---|
| 1626 | echo "set -x" >> $job_to_send |
---|
| 1627 | echo " ' exit" >> $job_to_send |
---|
| 1628 | echo "set -x" >> $job_to_send |
---|
| 1629 | fi |
---|
| 1630 | |
---|
| 1631 | |
---|
| 1632 | |
---|
| 1633 | # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN |
---|
| 1634 | cat $file_to_send >> $job_to_send |
---|
[69] | 1635 | |
---|
[1] | 1636 | if [[ $remote_host = ibm ]] |
---|
| 1637 | then |
---|
| 1638 | echo " " >> $job_to_send |
---|
| 1639 | echo "exit" >> $job_to_send |
---|
| 1640 | fi |
---|
[635] | 1641 | |
---|
| 1642 | # remove job file |
---|
[1099] | 1643 | if [[ $remote_host = lctit || $remote_host = ibmku || $remote_host = lcflow ]] |
---|
[69] | 1644 | then |
---|
| 1645 | echo " " >> $job_to_send |
---|
| 1646 | echo "rm ~/job_queue/$job_on_remhost" >> $job_to_send |
---|
| 1647 | fi |
---|
[1] | 1648 | |
---|
| 1649 | |
---|
| 1650 | |
---|
| 1651 | # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN |
---|
| 1652 | if [[ -z $remote_user ]] |
---|
| 1653 | then |
---|
| 1654 | if [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es || $remote_host = vpp ]] |
---|
| 1655 | then |
---|
| 1656 | grep $remote_addres ~/.netrc | read dum dum dum remote_user dum dum |
---|
| 1657 | fi |
---|
| 1658 | fi |
---|
| 1659 | |
---|
| 1660 | |
---|
| 1661 | |
---|
| 1662 | # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN |
---|
| 1663 | if [[ $no_submit = false ]] |
---|
| 1664 | then |
---|
| 1665 | if [[ $remote_host != $local_host ]] |
---|
| 1666 | then |
---|
| 1667 | [[ $verify = true ]] && printf "\n >>> transfering job to \"$remote_host\"..." |
---|
[82] | 1668 | if [[ $remote_host = ibms || $remote_host = ibmy ]] # ssh on ibms cannot handle "~/" |
---|
[1] | 1669 | then |
---|
[82] | 1670 | job_catalog_save=$job_catalog |
---|
| 1671 | job_catalog=job_queue |
---|
| 1672 | elif [[ $remote_host = nech ]] |
---|
| 1673 | then |
---|
| 1674 | job_catalog_save=$job_catalog |
---|
| 1675 | job_catalog=/hpf/b/${remote_user}/job_queue |
---|
| 1676 | fi |
---|
[1096] | 1677 | if [[ $remote_host = nech ]] |
---|
[82] | 1678 | then |
---|
| 1679 | # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ |
---|
| 1680 | # TRANSFERIERT WERDEN |
---|
[1094] | 1681 | scp $PORTOPT $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost |
---|
[1] | 1682 | else |
---|
[1094] | 1683 | scp $PORTOPT $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost |
---|
[1] | 1684 | fi |
---|
[82] | 1685 | if [[ $? = 1 ]] |
---|
| 1686 | then |
---|
| 1687 | locat=scp; exit |
---|
| 1688 | fi |
---|
| 1689 | if [[ $remote_host = ibms ]] |
---|
| 1690 | then |
---|
| 1691 | job_catalog=$job_catalog_save |
---|
| 1692 | fi |
---|
[1] | 1693 | [[ $verify = true ]] && printf "\n >>> finished\n" |
---|
| 1694 | else |
---|
| 1695 | eval job_catalog=$job_catalog |
---|
| 1696 | cp $job_to_send ${job_catalog}/$job_on_remhost |
---|
| 1697 | fi |
---|
| 1698 | |
---|
| 1699 | |
---|
| 1700 | |
---|
| 1701 | # NQS- BZW. LOADLEVELER-JOB STARTEN |
---|
| 1702 | if [[ $remote_host != $local_host ]] |
---|
| 1703 | then |
---|
| 1704 | [[ $verify = true ]] && printf "\n >>> submitting job using \"qsub\"...\n" |
---|
[635] | 1705 | |
---|
| 1706 | if [[ $(echo $remote_host | cut -c1-5) = lcsgi && $prio = true ]] |
---|
[1] | 1707 | then |
---|
[635] | 1708 | printf "\n >>> submit with HLRN qos-feature hiprio...\n" |
---|
[1094] | 1709 | ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost" |
---|
[635] | 1710 | elif [[ $remote_host = ibmku ]] |
---|
| 1711 | then |
---|
[1094] | 1712 | ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost" |
---|
[1099] | 1713 | elif [[ $remote_host = lcflow ]] |
---|
| 1714 | then |
---|
[1202] | 1715 | /usr/bin/ssh $SSH_PORTOPT $remote_addres -l $remote_user "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost" |
---|
[1] | 1716 | else |
---|
[1094] | 1717 | ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" |
---|
[82] | 1718 | fi |
---|
[1] | 1719 | |
---|
| 1720 | [[ $verify = true ]] && printf " >>> o.k.\n" |
---|
| 1721 | else |
---|
| 1722 | cd $job_catalog |
---|
[1224] | 1723 | if [[ $(echo $local_host | cut -c1-5) = lcsgi || $(echo $local_host | cut -c1-3) = ibm || $(echo $local_host | cut -c1-6) = lccray ]] |
---|
[1] | 1724 | then |
---|
| 1725 | eval $submcom $job_on_remhost |
---|
[1099] | 1726 | elif [[ $local_host = lcfimm || $local_host = lctit || $localhost = lcxe6 || $localhost = lck || $localhost = lckordi || $localhost = lcyon || $localhost = lcsb || $localhost = lckyu* ]] |
---|
[108] | 1727 | then |
---|
[635] | 1728 | chmod u+x $job_on_remhost |
---|
[108] | 1729 | eval $submcom $job_on_remhost |
---|
[1] | 1730 | elif [[ $local_host = nech ]] |
---|
| 1731 | then |
---|
| 1732 | if [[ $queue = default ]] |
---|
| 1733 | then |
---|
[799] | 1734 | eval $submcom $job_on_remhost |
---|
[1] | 1735 | else |
---|
[799] | 1736 | eval $submcom -q $queue $job_on_remhost |
---|
[1] | 1737 | fi |
---|
| 1738 | else |
---|
| 1739 | qsub $job_on_remhost |
---|
| 1740 | fi |
---|
[622] | 1741 | |
---|
| 1742 | # Jobfile must not be deleted on lctit/ibmku!! This will be done |
---|
| 1743 | # only at the end of the job. |
---|
[1099] | 1744 | if [[ $local_host != lctit && $local_host != ibmku && $local_host != lcflow ]] |
---|
[622] | 1745 | then |
---|
| 1746 | rm $job_on_remhost |
---|
| 1747 | fi |
---|
[1] | 1748 | cd - > /dev/null |
---|
| 1749 | fi |
---|
| 1750 | fi |
---|
| 1751 | |
---|
| 1752 | |
---|
| 1753 | |
---|
| 1754 | # ABSCHLUSSARBEITEN |
---|
| 1755 | |
---|
| 1756 | if [[ $no_submit = false ]] |
---|
| 1757 | then |
---|
[1099] | 1758 | rm -f $job_to_send |
---|
[1] | 1759 | fi |
---|
[1266] | 1760 | [[ $verify = true ]] && printf "\n\n *** SUBJOB finished \n\n" |
---|