[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 | # |
---|
[1310] | 20 | # Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1046] | 21 | #--------------------------------------------------------------------------------# |
---|
| 22 | # |
---|
| 23 | # Current revisions: |
---|
[1090] | 24 | # ------------------ |
---|
[1351] | 25 | # |
---|
[1621] | 26 | # |
---|
[1046] | 27 | # Former revisions: |
---|
| 28 | # ----------------- |
---|
[169] | 29 | # $Id: subjob 1621 2015-07-17 11:39:33Z heinze $ |
---|
[1621] | 30 | # adjustments for Mistral at DKRZ Hamburg (lcbullhh) |
---|
[1200] | 31 | # |
---|
[1576] | 32 | # 1575 2015-03-27 09:56:27Z raasch |
---|
| 33 | # mpp2-queues added to lccrayh |
---|
| 34 | # |
---|
[1548] | 35 | # 1547 2015-01-29 15:09:12Z witha |
---|
| 36 | # adjustments for ForWind computing cluster (lcflow) |
---|
| 37 | # |
---|
[1546] | 38 | # 1545 2015-01-29 06:52:23Z heinze |
---|
| 39 | # local host name for blizzard further specified |
---|
| 40 | # |
---|
[1481] | 41 | # 1480 2014-10-17 14:41:49Z raasch |
---|
| 42 | # adjustments for 2nd stage of HLRNIII |
---|
| 43 | # |
---|
[1469] | 44 | # 1468 2014-09-24 14:06:57Z maronga |
---|
| 45 | # Typo removed (addres->address) |
---|
| 46 | # Adjustments for lcxe6 |
---|
| 47 | # |
---|
[1453] | 48 | # 1452 2014-08-22 09:41:06Z heinze |
---|
| 49 | # local hosts for blizzard added |
---|
| 50 | # |
---|
[1451] | 51 | # 1450 2014-08-21 07:31:51Z heinze |
---|
| 52 | # HLRN-III (lccrayb): testq queue adjusted to mpp1testq |
---|
| 53 | # |
---|
[1443] | 54 | # 1442 2014-07-28 07:09:10Z raasch |
---|
| 55 | # HLRN-III (lccrayb/lccrayh) queues adjusted |
---|
| 56 | # |
---|
[1379] | 57 | # 1378 2014-04-28 06:04:58Z raasch |
---|
| 58 | # -et option added for lctit |
---|
| 59 | # |
---|
[1351] | 60 | # 1350 2014-04-04 13:01:30Z maronga |
---|
| 61 | # location of qsub updated for lcxe6 |
---|
| 62 | # |
---|
[1290] | 63 | # 1289 2014-03-04 07:12:34Z raasch |
---|
| 64 | # German comments translated to English |
---|
| 65 | # fimm-, necriam-, scirocco-, ibmy-, and sgi-specific code removed |
---|
| 66 | # |
---|
[1280] | 67 | # 1279 2014-01-28 12:10:14Z raasch |
---|
| 68 | # node calculation modified due to changes in mrun (tasks_per_node must not be |
---|
| 69 | # an integral divisor of numprocs any more) |
---|
| 70 | # |
---|
[1275] | 71 | # 1274 2014-01-09 13:14:54Z heinze |
---|
| 72 | # adjustments for lccrayh |
---|
| 73 | # |
---|
[1267] | 74 | # 1266 2013-12-11 12:07:34Z heinze |
---|
| 75 | # further adjustments for lccrayb (use msub instead of qsub) |
---|
| 76 | # |
---|
[1265] | 77 | # 1264 2013-12-09 12:46:09Z fricke |
---|
| 78 | # Bugfix: Using number of nodes instead of number of processors (lccrayb) |
---|
| 79 | # |
---|
[1263] | 80 | # 1262 2013-12-09 10:57:20Z fricke |
---|
| 81 | # further adjustments for lccrayb |
---|
| 82 | # |
---|
[1261] | 83 | # 1260 2013-12-04 12:48:04Z raasch |
---|
| 84 | # jaboticaba admitted |
---|
| 85 | # |
---|
[1256] | 86 | # 1255 2013-11-07 14:43:35Z raasch |
---|
| 87 | # further adjustments for lccrayb |
---|
| 88 | # |
---|
[1225] | 89 | # 1224 2013-09-16 07:27:23Z raasch |
---|
| 90 | # first adjustments for lccrayb |
---|
| 91 | # |
---|
[1203] | 92 | # 1202 2013-07-10 16:22:07Z witha |
---|
| 93 | # adjustments for Forwind cluster (lcflow) |
---|
| 94 | # |
---|
[1200] | 95 | # 1199 2013-07-05 14:52:22Z raasch |
---|
| 96 | # adjustments for CSC Helsinki (lccrayf) |
---|
| 97 | # |
---|
[1185] | 98 | # use of cluster/express queue enabled (ibmh) |
---|
| 99 | # vinessa added (imuk) |
---|
[1047] | 100 | # |
---|
[1104] | 101 | # 1103 2013-02-20 02:15:53Z raasch |
---|
| 102 | # bash compatibility adjustments (usage of OPTIND, output formatting with printf |
---|
| 103 | # instead typeset -L/R), |
---|
| 104 | # further adjustments for lckyuh |
---|
| 105 | # |
---|
[1100] | 106 | # 2013-02-10 01:47:43Z raasch |
---|
| 107 | # adjustments for Kyushu-Univeristy computing center (lckyuh - hayaka) |
---|
| 108 | # and for Forwind cluster (lcflow) |
---|
| 109 | # |
---|
[1096] | 110 | # 1094 2013-02-03 01:52:12Z raasch |
---|
| 111 | # new option -P for explicit setting of ssh/scp port, |
---|
| 112 | # decalpha parts (yonsei) removed |
---|
| 113 | # |
---|
[1091] | 114 | # 2013-02-02 07:06:13Z raasch |
---|
[1099] | 115 | # adjustments for Kyushu-University computing center (lckyut - tatara) |
---|
[1091] | 116 | # old changelog messages removed |
---|
| 117 | # |
---|
[1047] | 118 | # 1046 2012-11-09 14:38:45Z maronga |
---|
| 119 | # code put under GPL (PALM 3.9) |
---|
| 120 | # |
---|
[1090] | 121 | # 08/07/94 - Siggi - first version finished |
---|
| 122 | # 29/06/94 - Siggi - script development started |
---|
| 123 | #--------------------------------------------------------------------------------# |
---|
| 124 | # subjob - script for automatic generation and submission of batch-job files |
---|
| 125 | # for various batch queuing systems |
---|
| 126 | #--------------------------------------------------------------------------------# |
---|
[1] | 127 | |
---|
| 128 | |
---|
[1289] | 129 | # VARIABLE-DECLARATIONS AND DEFAULT VALUES |
---|
[352] | 130 | delete_dayfile=false |
---|
[799] | 131 | email_notification=none |
---|
[122] | 132 | group_number=none |
---|
[1] | 133 | locat=normal |
---|
| 134 | no_default_queue=none |
---|
| 135 | no_submit=false |
---|
| 136 | job_catalog="~/job_queue" |
---|
| 137 | job_name=none |
---|
| 138 | local_user=$LOGNAME |
---|
| 139 | node_usage=shared |
---|
[475] | 140 | numprocs=0 |
---|
[1] | 141 | punkte="..........................................................." |
---|
| 142 | submcom=qsub |
---|
| 143 | queue=default |
---|
| 144 | remote_host=none |
---|
| 145 | remote_user="" |
---|
| 146 | verify=true |
---|
| 147 | |
---|
| 148 | typeset -i cputime=0 memory=0 Memory=0 minuten resttime sekunden stunden |
---|
[696] | 149 | typeset -i inumprocs mpi_tasks=0 nodes=0 processes_per_node=0 tasks_per_node=0 threads_per_task=1 |
---|
[1] | 150 | |
---|
| 151 | |
---|
| 152 | |
---|
[1289] | 153 | # ERROR HANDLING |
---|
| 154 | # IN CASE OF EXIT: |
---|
[1] | 155 | trap 'if [[ $locat != normal ]] |
---|
| 156 | then |
---|
| 157 | case $locat in |
---|
| 158 | (option) printf "\n --> available optios can be displayed" |
---|
| 159 | printf " by typing:" |
---|
| 160 | printf "\n \"subjob ?\" \n";; |
---|
| 161 | (ftpcopy|parameter|scp|verify) printf "\n";; |
---|
| 162 | (*) printf "\n +++ unknown error" |
---|
| 163 | printf "\n please inform S. Raasch!\n" |
---|
| 164 | esac |
---|
| 165 | [[ -f $job_to_send ]] && rm $job_to_send |
---|
| 166 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
| 167 | fi' exit |
---|
| 168 | |
---|
| 169 | |
---|
[1289] | 170 | # IN CASE OF TERMINAL-BREAK: |
---|
[1] | 171 | trap '[[ -f $job_to_send ]] && rm $job_to_send |
---|
| 172 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
| 173 | exit |
---|
| 174 | ' 2 |
---|
| 175 | |
---|
| 176 | |
---|
[1289] | 177 | # DETERMINE NAME OF LOCAL HOST |
---|
[1] | 178 | local_host=$(hostname) |
---|
| 179 | |
---|
[1289] | 180 | # SET HOST-SPECIFIC VARIABLES VEREINBAREN (CHECK, IF LOCAL HOST |
---|
| 181 | # IS ADMITTED AT ALL) |
---|
| 182 | # NOTE: ONE OF THE ENTRIES FOR "lck" OR "lckordi" ALWAYS HAS TO BE |
---|
| 183 | # COMMENT OUT, BECAUSE THE HOSTNAME (node*) IS SAME FOR BOTH MACHINES |
---|
[1] | 184 | case $local_host in |
---|
[1468] | 185 | (ambiel-lx) local_address=134.106.74.48; local_host=lcfor;; |
---|
| 186 | (atmos) local_address=172.20.25.35; local_host=lcide;; |
---|
| 187 | (austru) local_address=130.75.105.128; local_host=lcmuk;; |
---|
| 188 | (autan) local_address=130.75.105.57; local_host=lcmuk;; |
---|
| 189 | (bora) local_address=130.75.105.103; local_host=lcmuk;; |
---|
| 190 | (b04*) local_address=133.5.4.33; local_host=lckyuh;; |
---|
[1545] | 191 | (blizzard1|p0*|p1*|p2*|p3*|p4*|p5*|p6*|p7*|p8*|p9*) local_address=136.172.40.15; local_host=ibmh;; |
---|
| 192 | (blizzard2|p0*|p1*|p2*|p3*|p4*|p5*|p6*|p7*|p8*|p9*) local_address=136.172.40.16; local_host=ibmh;; |
---|
[1468] | 193 | (blogin*|bxc*) local_address=130.73.233.1; local_host=lccrayb;; |
---|
| 194 | (hlogin*|hxc*) local_address=130.75.4.1; local_host=lccrayh;; |
---|
| 195 | (breva) local_address=130.75.105.98; local_host=lcmuk;; |
---|
| 196 | (buran) local_address=130.75.105.58; local_host=lcmuk;; |
---|
| 197 | (caurus) local_address=130.75.105.19; local_host=lcmuk;; |
---|
| 198 | (climate*) local_address=165.132.26.68; local_host=lcyon;; |
---|
| 199 | (clogin*) local_address=86.50.166.21; local_host=lccrayf;; |
---|
| 200 | (cs*) local_address=136.172.44.131; local_host=nech;; |
---|
| 201 | (elephanta) local_address=130.75.105.6; local_host=lcmuk;; |
---|
| 202 | (flow01) local_address=10.141.255.71; local_host=lcflow;; |
---|
| 203 | (flow02) local_address=10.141.255.72; local_host=lcflow;; |
---|
| 204 | (node*) local_address=165.132.26.61 local_host=lck;; |
---|
| 205 | # (node*) local_address=210.219.61.8 local_host=lckordi;; |
---|
| 206 | (gaia*) local_address=150.183.146.24; local_host=ibmkisti;; |
---|
| 207 | (gallego) local_address=130.75.105.10; local_host=lcmuk;; |
---|
| 208 | (gregale) local_address=130.75.105.109; local_host=lcmuk;; |
---|
| 209 | (hababai) local_address=130.75.105.108; local_host=lcmuk;; |
---|
| 210 | (hayaka*) local_address=133.5.4.33; local_host=lckyuh;; |
---|
| 211 | (hexagon.bccs.uib.no) local_address=129.177.20.113; local_host=lcxe6;; |
---|
| 212 | (hx*) local_address=133.3.51.11; local_host=lckyoto;; |
---|
| 213 | (inferno) local_address=130.75.105.5; local_host=lcmuk;; |
---|
| 214 | (irifi) local_address=130.75.105.104; local_host=lcmuk;; |
---|
| 215 | (jaboticaba) local_address=150.163.25.181; local_host=lcbr;; |
---|
| 216 | (sno) local_address=130.75.105.113; local_host=lcmuk;; |
---|
| 217 | (levanto) local_address=130.75.105.45; local_host=lcmuk;; |
---|
| 218 | (login*) local_address=118.128.66.223; local_host=lckiaps;; |
---|
| 219 | (maestro) local_address=130.75.105.2; local_host=lcmuk;; |
---|
| 220 | (meller) local_address=134.106.74.155; local_host=lcfor;; |
---|
| 221 | (meteo-login*) local_address=193.166.211.144;local_host=lcxt5m;; |
---|
[1620] | 222 | (mlogin1*|m1*) local_address=136.172.50.13; local_host=lcbullhh;; |
---|
[1468] | 223 | (hexagon*) local_address=129.177.20.113; local_host=lcxe6;; |
---|
| 224 | (nobel*) local_address=150.183.5.101; local_host=ibms;; |
---|
| 225 | (orkan) local_address=130.75.105.3; local_host=lcmuk;; |
---|
| 226 | (ostria) local_address=130.75.105.106; local_host=lcmuk;; |
---|
| 227 | (paesano) local_address=130.75.105.46; local_host=lcmuk;; |
---|
| 228 | (pcj*) local_address=172.31.120.1; local_host=lckyut;; |
---|
| 229 | (pingui) local_address=134.106.74.118; local_host=lcfor;; |
---|
| 230 | (quanero) local_address=130.75.105.107; local_host=lcmuk;; |
---|
| 231 | (rte*) local_address=133.5.185.60; local_host=lcrte;; |
---|
| 232 | (shiokaze-lx) local_address=134.106.74.123; local_host=lcfor;; |
---|
| 233 | (sisu-login*) local_address=86.50.166.21; local_host=lccrayf;; |
---|
| 234 | (solano) local_address=130.75.105.110; local_host=lcmuk;; |
---|
| 235 | (sugoka*) local_address=172.31.120.1; local_host=lckyut;; |
---|
| 236 | (t2a*) local_address=10.1.6.165; local_host=lctit;; |
---|
| 237 | (urban*) local_address=147.46.30.151 local_host=lcsb;; |
---|
| 238 | (vinessa) local_address=130.75.105.112; local_host=lcmuk;; |
---|
| 239 | (vorias) local_address=172.20.25.43; local_host=lcmuk;; |
---|
| 240 | (*.cc.kyushu-u.ac.jp) local_address=133.5.4.129; local_host=ibmku;; |
---|
[1] | 241 | (*) printf "\n +++ \"$local_host\" unknown"; |
---|
[1255] | 242 | printf "\n please contact the PALM group at IMUK"; |
---|
[1] | 243 | locat=parameter; exit;; |
---|
| 244 | esac |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | |
---|
[1289] | 248 | # BY DEFAULT, THE REMOTE HOST IS THE LOCAL HOST |
---|
[1] | 249 | remote_host=$local_host |
---|
| 250 | |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | |
---|
[1289] | 254 | # READ THE SHELLSCRIPT-OPTIONS |
---|
[1094] | 255 | while getopts :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX: option |
---|
[1] | 256 | do |
---|
| 257 | case $option in |
---|
| 258 | (c) job_catalog=$OPTARG;; |
---|
| 259 | (d) delete_dayfile=true;; |
---|
| 260 | (D) no_submit=true;; |
---|
[352] | 261 | (e) email_notification=$OPTARG;; |
---|
[125] | 262 | (g) group_number=$OPTARG;; |
---|
[1] | 263 | (h) remote_host=$OPTARG;; |
---|
| 264 | (m) memory=$OPTARG;; |
---|
| 265 | (n) job_name=$OPTARG;; |
---|
| 266 | (N) node_usage=$OPTARG;; |
---|
| 267 | (O) threads_per_task=$OPTARG;; |
---|
[1094] | 268 | (P) scp_port=$OPTARG;; |
---|
[1] | 269 | (q) no_default_queue=$OPTARG;; |
---|
| 270 | (t) cputime=$OPTARG;; |
---|
| 271 | (T) tasks_per_node=$OPTARG;; |
---|
| 272 | (u) remote_user=$OPTARG;; |
---|
| 273 | (v) verify=false;; |
---|
| 274 | (X) numprocs=$OPTARG;; |
---|
| 275 | (\?) printf "\n +++ Option $OPTARG unknown \n"; |
---|
| 276 | locat=option; exit;; |
---|
| 277 | esac |
---|
| 278 | done |
---|
| 279 | |
---|
| 280 | |
---|
[1289] | 281 | # GET THE NAME OF THE JOBFILE AS NEXT ARGUMENT |
---|
[1103] | 282 | (( to_shift = $OPTIND - 1 )) |
---|
| 283 | shift $to_shift; file_to_send=$1 |
---|
[1] | 284 | |
---|
| 285 | |
---|
[1289] | 286 | # OUTPUT OF SHORT DESCRIPTION OF SCRIPT-OPTIONS |
---|
[1] | 287 | if [ "$1" = "?" ] |
---|
| 288 | then |
---|
| 289 | (printf "\n *** subjob can be called as follows:\n" |
---|
| 290 | printf "\n subjob -c.. -d -D -h.. -m.. -q.. -t.. -u.. -v <jobfile>\n" |
---|
| 291 | printf "\n Description of available options:\n" |
---|
| 292 | printf "\n Option Description Default-Value" |
---|
| 293 | printf "\n -c job-input- and output-catalog ~/job_queue" |
---|
| 294 | printf "\n -d no job-protocol will be created ---" |
---|
| 295 | printf "\n -D only the job-file will be created ---" |
---|
| 296 | printf "\n -h execution host, available hosts: $remote_host" |
---|
[1289] | 297 | printf "\n ibm, ibmh, ibmkisti, ibmku, ibms, lc...," |
---|
| 298 | printf "\n lckiaps, lctit, nech" |
---|
[1] | 299 | printf "\n -m memory demand per process in MByte ---" |
---|
| 300 | printf "\n -n jobname <jobdatei>" |
---|
| 301 | printf "\n -O threads per task (for OpenMP usage) 1" |
---|
[1094] | 302 | printf "\n -P ssh/scp port default port" |
---|
[1] | 303 | printf "\n -q job-queue to be used default" |
---|
| 304 | printf "\n -t allowed cpu-time in seconds ---" |
---|
| 305 | printf "\n -T tasks per node (on parallel hosts) ---" |
---|
| 306 | printf "\n -u username on execution host from .netrc" |
---|
| 307 | printf "\n -v no prompt for confirmation ---" |
---|
| 308 | printf "\n -X # of processors (on parallel hosts) 1" |
---|
| 309 | printf "\n " |
---|
| 310 | printf "\n The only possible positional parameter is <jobfile>:" |
---|
| 311 | printf "\n The complete NQS-job must be provided here." |
---|
| 312 | printf "\n <jobfile>=? creates this outline\n\n") | more |
---|
| 313 | exit |
---|
| 314 | fi |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
[1289] | 318 | # CHECK, IF JOB-FILE HAS BEEN GIVEN AS ARGUMENT AND IF THE FILE ITSELF EXISTS |
---|
[1] | 319 | if [[ "$file_to_send" = "" ]] |
---|
| 320 | then |
---|
| 321 | printf "\n +++ job-file missing" |
---|
| 322 | locat=parameter; exit |
---|
| 323 | else |
---|
| 324 | if [[ -f $file_to_send ]] |
---|
| 325 | then |
---|
| 326 | true |
---|
| 327 | else |
---|
| 328 | printf "\n +++ job-file: " |
---|
| 329 | printf "\n $file_to_send" |
---|
| 330 | printf "\n does not exist" |
---|
| 331 | locat=parameter; exit |
---|
| 332 | fi |
---|
| 333 | fi |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | |
---|
[1289] | 337 | # IF NO JOBNAME HAS BEEN GIVEN, JOBNAME IS SET TO THE NAME OF THE JOB-FILE, |
---|
| 338 | # PROVIDED THAT THE JOB-FILE NAME DOES NOT CONTAIN ANY PATH |
---|
[1] | 339 | if [[ $job_name = none ]] |
---|
| 340 | then |
---|
| 341 | job_name=$file_to_send |
---|
| 342 | fi |
---|
| 343 | if [[ $(echo $job_name | grep -c "/") != 0 ]] |
---|
| 344 | then |
---|
| 345 | printf "\n +++ job-file name: " |
---|
| 346 | printf "\n $job_name" |
---|
| 347 | printf "\n must not contain \"/\"-characters" |
---|
| 348 | locat=parameter; exit |
---|
| 349 | fi |
---|
| 350 | |
---|
| 351 | |
---|
| 352 | |
---|
| 353 | |
---|
[1289] | 354 | # SET HOST-SPECIFIC QUANTITIES, OR TERMINATE IN CASE OF UNKNOWN HOST, |
---|
| 355 | # OR IF NO HOST HAS BEEN GIVEN |
---|
[1] | 356 | if [[ $remote_host = none ]] |
---|
| 357 | then |
---|
| 358 | printf "\n +++ host missing" |
---|
| 359 | locat=option; exit |
---|
| 360 | else |
---|
| 361 | case $remote_host in |
---|
[1468] | 362 | (ibm) queue=p690_standard; remote_address=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
| 363 | (ibmh) queue=cluster; remote_address=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
| 364 | (ibmkisti) queue=class.32plus; remote_address=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
| 365 | (ibmku) queue=s4; remote_address=133.5.4.129; submcom=/usr/local/bin/llsubmit;; |
---|
| 366 | (ibms) queue=p_normal; remote_address=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
[1620] | 367 | (lcbullhh) queue=compute; remote_address=136.172.50.13; submcom=/usr/bin/sbatch;; |
---|
[1480] | 368 | (lccrayb) queue=mpp1testq; remote_address=130.73.233.1; submcom=/opt/moab/default/bin/msub;; |
---|
| 369 | (lccrayh) queue=mpp1testq; remote_address=130.75.4.1; submcom=/opt/moab/default/bin/msub;; |
---|
[1468] | 370 | (lccrayf) queue=small; remote_address=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;; |
---|
[1547] | 371 | (lcflow) remote_address=10.140.1.72; submcom=qsub;; |
---|
[1468] | 372 | (lckyoto) remote_address=133.3.51.11; submcom=/thin/local/bin/qsub;; |
---|
| 373 | (lck) remote_address=165.132.26.61; submcom=/usr/torque/bin/qsub;; |
---|
| 374 | (lckiaps) remote_address=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;; |
---|
| 375 | (lckordi) remote_address=210.219.61.8; submcom=/usr/torque/bin/qsub;; |
---|
| 376 | (lckyuh) remote_address=133.5.4.33; submcom=/usr/bin/pjsub;; |
---|
| 377 | (lckyut) remote_address=133.5.4.37; submcom=/usr/bin/pjsub;; |
---|
| 378 | (lcsb) remote_address=147.46.30.151; submcom=/usr/torque/bin/qsub;; |
---|
| 379 | (lctit) queue=S; remote_address=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;; |
---|
| 380 | (lcxe6) remote_address=129.177.20.113; submcom=/opt/torque/default/bin/qsub;; |
---|
| 381 | (lcxt5m) remote_address=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;; |
---|
| 382 | (lcyon) remote_address=165.132.26.68; submcom=/usr/torque/bin/qsub;; |
---|
| 383 | (nech) qsubmem=memsz_job; qsubtime=cputim_job; remote_address=136.172.44.147; submcom="/usr/local/bin/qsub";; |
---|
[251] | 384 | (*) printf "\n +++ hostname \"$remote_host\" not allowed"; |
---|
| 385 | locat=parameter; exit;; |
---|
[1] | 386 | esac |
---|
| 387 | fi |
---|
| 388 | |
---|
| 389 | |
---|
[1289] | 390 | # CHECK, IF A VALID QUEUE HAS BEEN GIVEN |
---|
[1] | 391 | if [[ $no_default_queue != none ]] |
---|
| 392 | then |
---|
| 393 | error=false |
---|
| 394 | ndq=$no_default_queue |
---|
| 395 | case $remote_host in |
---|
| 396 | (ibm) case $ndq in |
---|
| 397 | (p690_express|p690_standard|p690_long) error=false;; |
---|
| 398 | (*) error=true;; |
---|
| 399 | esac;; |
---|
| 400 | (ibmh) case $ndq in |
---|
[1184] | 401 | (cluster|express) error=false;; |
---|
[1] | 402 | (*) error=true;; |
---|
| 403 | esac;; |
---|
[693] | 404 | (ibmkisti) case $ndq in |
---|
| 405 | (class.32plus|class.1-2|class.2-32) error=false;; |
---|
| 406 | (*) error=true;; |
---|
| 407 | esac;; |
---|
[622] | 408 | (ibmku) case $ndq in |
---|
| 409 | (sdbg1|sdbg2|sdbg4|s4|s16|s32|s32-s) error=false;; |
---|
| 410 | (*) error=true;; |
---|
| 411 | esac;; |
---|
[1] | 412 | (ibms) case $ndq in |
---|
| 413 | (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand) error=false;; |
---|
| 414 | (*) error=true;; |
---|
| 415 | esac;; |
---|
[1620] | 416 | (lcbullhh) case $ndq in |
---|
| 417 | (compute|shared) error=false;; |
---|
| 418 | (*) error=true;; |
---|
| 419 | esac;; |
---|
[1224] | 420 | (lccrayb) case $ndq in |
---|
[1480] | 421 | (dataq|mpp1q|mpp1testq|mpp2q|mpp2testq|smp1q|smp1testq|specialm1q) error=false;; |
---|
[1224] | 422 | (*) error=true;; |
---|
| 423 | esac;; |
---|
[1274] | 424 | (lccrayh) case $ndq in |
---|
[1575] | 425 | (dataq|mpp1q|mpp1testq|mpp2q|mpp2testq|smp1q|smp1testq|specialm1q) error=false;; |
---|
[1274] | 426 | (*) error=true;; |
---|
| 427 | esac;; |
---|
[1197] | 428 | (lccrayf) case $ndq in |
---|
| 429 | (usup|test*|small|large) error=false;; |
---|
| 430 | (*) error=true;; |
---|
| 431 | esac;; |
---|
[1099] | 432 | (lcflow) case $ndq in |
---|
[1547] | 433 | (cfd_lom_long.q|cfd_him_long.q|cfd_lom_serl.q|cfd_lom_shrt.q|cfd_him_shrt.q|cfd_ivy_shrt.q) error=false;; |
---|
[1099] | 434 | (*) error=true;; |
---|
| 435 | esac;; |
---|
[1040] | 436 | (lckiaps) case $ndq in |
---|
| 437 | (express|normal) error=false;; |
---|
| 438 | (*) error=true;; |
---|
| 439 | esac;; |
---|
[440] | 440 | (lckyoto) case $ndq in |
---|
| 441 | (eh|ph) error=false;; |
---|
| 442 | (*) error=true;; |
---|
| 443 | esac;; |
---|
[1099] | 444 | (lckyuh) case $ndq in |
---|
| 445 | (fx-dbg|fx-single|fx-small|fx-middle|fx-large) error=false;; |
---|
| 446 | (*) error=true;; |
---|
| 447 | esac;; |
---|
[1090] | 448 | (lckyut) case $ndq in |
---|
| 449 | (cx-dbg|cx-single|cx-small|cx-middle|cx-large) error=false;; |
---|
| 450 | (*) error=true;; |
---|
| 451 | esac;; |
---|
[1] | 452 | (lctit) case $ndq in |
---|
[635] | 453 | (G|L128|L256|L512H|S|S96|V) error=false;; |
---|
[1] | 454 | (*) error=true;; |
---|
| 455 | esac;; |
---|
| 456 | (t3eb) case $ndq in |
---|
| 457 | (berte|p50|p100|p392|forfree|p25himem) error=false;; |
---|
| 458 | (*) error=true;; |
---|
| 459 | esac;; |
---|
| 460 | (t3eh) case $ndq in |
---|
| 461 | (para_t3e|em|k|l|lm|comp_t3e|c|p|ht) error=false;; |
---|
| 462 | (*) error=true;; |
---|
| 463 | esac;; |
---|
| 464 | (t3ej2|t3ej5) case $ndq in |
---|
| 465 | (low|normal|high) error=false;; |
---|
| 466 | (*) error=true;; |
---|
| 467 | esac;; |
---|
| 468 | (t3es) case $ndq in |
---|
| 469 | (batch|serial-4|pe4|p48|pe16|pe32|pe64|pe128) error=false;; |
---|
| 470 | (*) error=true;; |
---|
| 471 | esac;; |
---|
| 472 | esac |
---|
| 473 | if [[ $error = true ]] |
---|
| 474 | then |
---|
| 475 | printf "\n +++ queue \"$no_default_queue\" on host \"$remote_host\" not allowed" |
---|
| 476 | locat=parameter; exit |
---|
| 477 | else |
---|
| 478 | queue=$no_default_queue |
---|
| 479 | fi |
---|
| 480 | fi |
---|
| 481 | |
---|
| 482 | |
---|
| 483 | |
---|
[1289] | 484 | # CHECK THE CPU-TIME |
---|
| 485 | # SPLIT TIME INTO HOURS, MINUTES, AND SECONDS |
---|
[1] | 486 | done=false |
---|
| 487 | while [[ $done = false ]] |
---|
| 488 | do |
---|
| 489 | if (( $cputime <= 0 )) |
---|
| 490 | then |
---|
| 491 | printf "\n +++ wrong cpu-time or cpu-time missing" |
---|
| 492 | printf "\n >>> Please type cpu-time in seconds as INTEGER:" |
---|
| 493 | printf "\n >>> " |
---|
| 494 | read cputime 1>/dev/null 2>&1 |
---|
| 495 | else |
---|
| 496 | done=true |
---|
| 497 | fi |
---|
| 498 | done |
---|
| 499 | if [[ $remote_host = nech ]] |
---|
| 500 | then |
---|
| 501 | if (( tasks_per_node != 0 )) |
---|
| 502 | then |
---|
| 503 | (( cputime = cputime * tasks_per_node )) |
---|
| 504 | elif [[ $numprocs != 0 ]] |
---|
| 505 | then |
---|
| 506 | (( cputime = cputime * numprocs )) |
---|
| 507 | fi |
---|
| 508 | fi |
---|
| 509 | (( stunden = cputime / 3600 )) |
---|
| 510 | (( resttime = cputime - stunden * 3600 )) |
---|
| 511 | (( minuten = resttime / 60 )) |
---|
| 512 | (( sekunden = resttime - minuten * 60 )) |
---|
| 513 | timestring=${stunden}:${minuten}:${sekunden} |
---|
| 514 | |
---|
| 515 | |
---|
| 516 | |
---|
[1289] | 517 | # CHECK THE MEMORY DEMAND |
---|
[1] | 518 | done=false |
---|
| 519 | while [[ $done = false ]] |
---|
| 520 | do |
---|
| 521 | if (( memory <= 0 )) |
---|
| 522 | then |
---|
| 523 | printf "\n +++ wrong memory demand or memory demand missing" |
---|
| 524 | printf "\n >>> Please type memory in MByte per process as INTEGER:" |
---|
| 525 | printf "\n >>> " |
---|
| 526 | read memory 1>/dev/null 2>&1 |
---|
| 527 | else |
---|
| 528 | done=true |
---|
| 529 | fi |
---|
| 530 | done |
---|
| 531 | |
---|
[1289] | 532 | if [[ $remote_host = nech ]] |
---|
[1] | 533 | then |
---|
| 534 | if (( tasks_per_node != 0 )) |
---|
| 535 | then |
---|
| 536 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
| 537 | elif [[ $numprocs != 0 ]] |
---|
| 538 | then |
---|
| 539 | (( Memory = memory * numprocs / 1000 )) |
---|
| 540 | else |
---|
| 541 | (( Memory = memory / 1000 )) |
---|
| 542 | fi |
---|
[635] | 543 | elif [[ $remote_host = lctit ]] |
---|
| 544 | then |
---|
| 545 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
[1] | 546 | fi |
---|
| 547 | |
---|
| 548 | |
---|
[1289] | 549 | # MEMORY DEMAND IN CASE OF OPENMP-USAGE ON IBM-SYSTEMS |
---|
[1] | 550 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 551 | then |
---|
| 552 | (( memory = memory * threads_per_task )) |
---|
| 553 | fi |
---|
| 554 | |
---|
| 555 | |
---|
[1289] | 556 | # CALCULATE NUMBER OF REQUIRED NODES |
---|
[1] | 557 | if (( tasks_per_node != 0 )) |
---|
| 558 | then |
---|
[1279] | 559 | (( nodes = ( numprocs - 1 ) / ( tasks_per_node * threads_per_task ) + 1 )) |
---|
[1] | 560 | fi |
---|
| 561 | |
---|
[1094] | 562 | |
---|
[1289] | 563 | # CALCULATE NUMBER OF PROCESSES PER NODE |
---|
[622] | 564 | (( processes_per_node = tasks_per_node * threads_per_task )) |
---|
[1] | 565 | |
---|
[1094] | 566 | |
---|
[1289] | 567 | # CALCULATE NUMBER OF MPI TASKS |
---|
[696] | 568 | (( mpi_tasks = numprocs / threads_per_task )) |
---|
[1] | 569 | |
---|
[696] | 570 | |
---|
[1289] | 571 | # SET PORT NUMBER OPTION FOR CALLS OF ssh/scp, subjob AND batch_scp SCRIPTS |
---|
[1094] | 572 | if [[ "$scp_port" != "" ]] |
---|
| 573 | then |
---|
| 574 | PORTOPT="-P $scp_port" |
---|
| 575 | SSH_PORTOPT="-p $scp_port" |
---|
| 576 | fi |
---|
| 577 | |
---|
| 578 | |
---|
[1289] | 579 | # HEADER-OUTPUT |
---|
[1] | 580 | if [[ $verify = true ]] |
---|
| 581 | then |
---|
| 582 | printf "\n\n" |
---|
| 583 | printf "#--------------------------------------------------------------# \n" |
---|
| 584 | spalte1=SUBJOB;spalte2=$(date) |
---|
[1103] | 585 | printf "| %-20s%40s | \n" "$spalte1" "$spalte2" |
---|
[1] | 586 | printf "| | \n" |
---|
| 587 | printf "| values of parameters/options: | \n" |
---|
[1103] | 588 | spalte1=$(echo local_host$punkte | cut -c-20) |
---|
| 589 | spalte2=$punkte$local_host |
---|
| 590 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 591 | spalte1=$(echo remote_host$punkte | cut -c-20) |
---|
| 592 | spalte2=$punkte$remote_host |
---|
| 593 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 594 | spalte1=$(echo queue$punkte | cut -c-20) |
---|
| 595 | spalte2=$punkte$queue |
---|
| 596 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 597 | spalte1=$(echo memory$punkte | cut -c-20) |
---|
| 598 | spalte2="$punkte$memory mb" |
---|
| 599 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 600 | spalte1=$(echo cputime$punkte | cut -c-20) |
---|
| 601 | spalte2="$punkte$cputime sec" |
---|
| 602 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
| 603 | spalte1=$(echo job_name$punkte | cut -c-20) |
---|
| 604 | spalte2="$punkte$job_name" |
---|
| 605 | printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}" |
---|
[1] | 606 | printf "#--------------------------------------------------------------# \n\n" |
---|
| 607 | |
---|
| 608 | |
---|
[1289] | 609 | # QUERY CHECK |
---|
[1] | 610 | antwort="dummy" |
---|
| 611 | while [[ $antwort != y && $antwort != Y && $antwort != n && $antwort != N ]] |
---|
| 612 | do |
---|
| 613 | read antwort?" >>> continue (y/n) ? " |
---|
| 614 | done |
---|
| 615 | if [[ $antwort = n || $antwort = N ]] |
---|
| 616 | then |
---|
| 617 | locat=verify; exit |
---|
| 618 | fi |
---|
| 619 | printf "\n" |
---|
| 620 | fi |
---|
| 621 | |
---|
[1289] | 622 | # GENERATE RANDOM IDENTIFIER, AND DETERMINE THE JOBNAME ON THE TARGET HOST |
---|
| 623 | identifier=$RANDOM |
---|
| 624 | job_on_remhost=${job_name}_${identifier}_$local_host |
---|
| 625 | job_to_send=job_to_send_$identifier |
---|
[1] | 626 | if [[ $delete_dayfile = false ]] |
---|
| 627 | then |
---|
[1289] | 628 | remote_dayfile=${local_host}_${job_name}_result_$identifier |
---|
[1] | 629 | local_dayfile=${remote_host}_${job_name} |
---|
| 630 | else |
---|
| 631 | remote_dayfile=/dev/null |
---|
| 632 | fi |
---|
| 633 | |
---|
| 634 | |
---|
[1289] | 635 | # GENERATE THE BATCH-JOB SCRIPTS (FOR QUEUEING-SYSTEMS qsub/msub/LoadLeveler) |
---|
[1] | 636 | if [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs != 0 ]] |
---|
| 637 | then |
---|
| 638 | |
---|
[1289] | 639 | # GENERAL LOADLEVELER SETTINGS |
---|
[622] | 640 | execute_in_shell="#!/bin/ksh" |
---|
| 641 | use_shell="# @ shell = /bin/ksh" |
---|
| 642 | consumable_memory="ConsumableMemory($memory mb)" |
---|
| 643 | class="# @ class = $queue" |
---|
| 644 | environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes" |
---|
| 645 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
| 646 | data_limit="# @ data_limit = 1.76gb" |
---|
| 647 | image_size="# @ image_size = 50" |
---|
[693] | 648 | wall_clock_limit="# @ wall_clock_limit = ${timestring},$timestring" |
---|
[312] | 649 | |
---|
[693] | 650 | if [[ $email_notification = none ]] |
---|
| 651 | then |
---|
| 652 | notify_user="" |
---|
| 653 | else |
---|
| 654 | notify_user="# @ notify_user = $email_notification" |
---|
| 655 | if [[ $delete_dayfile = true ]] |
---|
| 656 | then |
---|
| 657 | notification='# @ notification = never' |
---|
| 658 | fi |
---|
| 659 | fi |
---|
[622] | 660 | |
---|
[312] | 661 | if [[ $remote_host = ibmh ]] |
---|
[1] | 662 | then |
---|
[312] | 663 | data_limit="" |
---|
| 664 | network_to_use="" |
---|
[1184] | 665 | class="# @ class = $queue" |
---|
[312] | 666 | environment="" |
---|
[814] | 667 | rset="# @ rset = RSET_MCM_AFFINITY" |
---|
| 668 | task_affinity="# @ task_affinity = core(1)" |
---|
[693] | 669 | elif [[ $remote_host = ibmkisti ]] |
---|
| 670 | then |
---|
| 671 | network_to_use="# @ network.MPI = sn_all,shared,US" |
---|
| 672 | wall_clock_limit="# @ wall_clock_limit = $timestring" |
---|
[696] | 673 | if [[ $threads_per_task = 1 ]] |
---|
| 674 | then |
---|
| 675 | rset="# @ rset = RSET_MCM_AFFINITY" |
---|
| 676 | mcm_affinity_options="# @ mcm_affinity_options = mcm_mem_pref mcm_sni_none mcm_distribute" |
---|
| 677 | fi |
---|
[693] | 678 | environment="" |
---|
| 679 | use_shell="" |
---|
| 680 | data_limit="" |
---|
| 681 | image_size="" |
---|
[622] | 682 | elif [[ $remote_host = ibmku ]] |
---|
| 683 | then |
---|
| 684 | execute_in_shell="#!/usr/bin/ksh" |
---|
| 685 | use_shell="# @ shell = /usr/bin/ksh" |
---|
| 686 | consumable_memory="" |
---|
| 687 | environment="" |
---|
| 688 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
| 689 | data_limit="" |
---|
| 690 | image_size="" |
---|
| 691 | elif [[ $remote_host = ibms ]] |
---|
| 692 | then |
---|
| 693 | network_to_use="# @ network.mpi = csss,shared,us" |
---|
[1] | 694 | fi |
---|
| 695 | |
---|
| 696 | cat > $job_to_send << %%END%% |
---|
[622] | 697 | $execute_in_shell |
---|
| 698 | $use_shell |
---|
[1] | 699 | |
---|
| 700 | # @ job_type = parallel |
---|
[693] | 701 | # @ job_name = $job_name |
---|
[1] | 702 | # @ resources = ConsumableCpus($threads_per_task) $consumable_memory |
---|
| 703 | # @ output = $remote_dayfile |
---|
| 704 | # @ error = $remote_dayfile |
---|
[693] | 705 | $wall_clock_limit |
---|
[622] | 706 | $image_size |
---|
[312] | 707 | $class |
---|
| 708 | $environment |
---|
[1] | 709 | $network_to_use |
---|
| 710 | $data_limit |
---|
[693] | 711 | $rset |
---|
| 712 | $mcm_affinity_options |
---|
[814] | 713 | $task_affinity |
---|
[1] | 714 | $notification |
---|
[693] | 715 | $notify_user |
---|
[1] | 716 | |
---|
| 717 | %%END%% |
---|
| 718 | |
---|
| 719 | if (( nodes > 0 )) |
---|
| 720 | then |
---|
| 721 | |
---|
[693] | 722 | if [[ $remote_host != ibmkisti ]] |
---|
| 723 | then |
---|
| 724 | |
---|
| 725 | cat >> $job_to_send << %%END%% |
---|
[1] | 726 | # @ node = $nodes |
---|
[622] | 727 | # @ tasks_per_node = $processes_per_node |
---|
[1] | 728 | # @ node_usage = $node_usage |
---|
| 729 | # @ queue |
---|
| 730 | |
---|
| 731 | %%END%% |
---|
| 732 | |
---|
[693] | 733 | else |
---|
| 734 | |
---|
| 735 | cat >> $job_to_send << %%END%% |
---|
[696] | 736 | # @ total_tasks = $mpi_tasks |
---|
[693] | 737 | # @ blocking = unlimited |
---|
| 738 | # @ queue |
---|
| 739 | |
---|
| 740 | %%END%% |
---|
| 741 | |
---|
| 742 | fi |
---|
| 743 | |
---|
[1] | 744 | else |
---|
| 745 | |
---|
[1289] | 746 | cat >> $job_to_send << %%END%% |
---|
[1] | 747 | # @ blocking = unlimited |
---|
| 748 | # @ total_tasks = $numprocs |
---|
| 749 | # @ node_usage = $node_usage |
---|
| 750 | # @ queue |
---|
| 751 | |
---|
| 752 | %%END%% |
---|
| 753 | |
---|
| 754 | fi |
---|
| 755 | |
---|
[1289] | 756 | # WORKAROUND BECAUSE OF SILLY JOB FILTER ON ibmkisti |
---|
[696] | 757 | if [[ $remote_host = ibmkisti && $threads_per_task != 1 ]] |
---|
| 758 | then |
---|
| 759 | echo "export OMP_NUM_THREADS=$threads_per_task" >> $job_to_send |
---|
| 760 | fi |
---|
| 761 | |
---|
[1] | 762 | elif [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs = 0 ]] |
---|
| 763 | then |
---|
| 764 | |
---|
| 765 | cat > $job_to_send << %%END%% |
---|
| 766 | #!/bin/ksh |
---|
| 767 | |
---|
| 768 | # @ job_type = serial |
---|
| 769 | # @ node_usage = $node_usage |
---|
| 770 | # @ job_name = palm |
---|
| 771 | # @ wall_clock_limit = ${timestring},$timestring |
---|
| 772 | # @ resources = ConsumableCpus(1) ConsumableMemory(1 gb) |
---|
| 773 | # @ output = $remote_dayfile |
---|
| 774 | # @ error = $remote_dayfile |
---|
[312] | 775 | $class |
---|
[1] | 776 | $notification |
---|
| 777 | |
---|
| 778 | # @ queue |
---|
| 779 | |
---|
| 780 | %%END%% |
---|
| 781 | |
---|
[1620] | 782 | elif [[ $remote_host = lcbullhh ]] |
---|
| 783 | then |
---|
| 784 | if [[ $numprocs != 0 ]] |
---|
| 785 | then |
---|
| 786 | cat > $job_to_send << %%END%% |
---|
| 787 | #!/bin/bash -l |
---|
| 788 | #SBATCH -J $job_name |
---|
| 789 | #SBATCH -t $timestring |
---|
| 790 | #SBATCH -N $nodes |
---|
| 791 | #SBATCH --ntasks-per-node=$processes_per_node |
---|
| 792 | #SBATCH -p $queue |
---|
| 793 | #SBATCH -o $remote_dayfile |
---|
| 794 | #SBATCH -e $remote_dayfile |
---|
| 795 | #SBATCH -A $project_account |
---|
| 796 | |
---|
| 797 | $init_cmds |
---|
| 798 | $module_calls |
---|
| 799 | |
---|
| 800 | %%END%% |
---|
| 801 | |
---|
| 802 | else |
---|
| 803 | cat > $job_to_send << %%END%% |
---|
| 804 | #!/bin/bash -l |
---|
| 805 | #SBATCH -J $job_name |
---|
| 806 | #SBATCH -t $timestring |
---|
| 807 | #SBATCH -l ncpus=1 |
---|
| 808 | #SBATCH -l pmem=${memory}mb |
---|
| 809 | #SBATCH -m abe |
---|
| 810 | #SBATCH -o $remote_dayfile |
---|
| 811 | #SBATCH -e $remote_dayfile |
---|
| 812 | #SBATCH -A $project_account |
---|
| 813 | |
---|
| 814 | $init_cmds |
---|
| 815 | $module_calls |
---|
| 816 | |
---|
| 817 | %%END%% |
---|
| 818 | |
---|
| 819 | fi |
---|
| 820 | |
---|
[1274] | 821 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1224] | 822 | then |
---|
| 823 | |
---|
[1480] | 824 | if [[ "$feature" != "" ]] |
---|
| 825 | then |
---|
| 826 | featuredir="#PBS -l feature=$feature" |
---|
| 827 | fi |
---|
| 828 | |
---|
[1224] | 829 | if [[ $numprocs != 0 ]] |
---|
| 830 | then |
---|
| 831 | cat > $job_to_send << %%END%% |
---|
[1255] | 832 | #!/bin/bash |
---|
[1224] | 833 | #PBS -N $job_name |
---|
| 834 | #PBS -l walltime=$timestring |
---|
[1264] | 835 | #PBS -l nodes=$nodes:ppn=$processes_per_node |
---|
[1224] | 836 | #PBS -o $remote_dayfile |
---|
| 837 | #PBS -j oe |
---|
| 838 | #PBS -q $queue |
---|
[1480] | 839 | $featuredir |
---|
[1224] | 840 | |
---|
| 841 | $module_calls |
---|
| 842 | |
---|
| 843 | %%END%% |
---|
| 844 | |
---|
| 845 | else |
---|
| 846 | |
---|
| 847 | continue |
---|
| 848 | |
---|
| 849 | fi |
---|
| 850 | |
---|
[1197] | 851 | elif [[ $remote_host = lccrayf ]] |
---|
| 852 | then |
---|
| 853 | |
---|
| 854 | if [[ $numprocs != 0 ]] |
---|
| 855 | then |
---|
| 856 | cat > $job_to_send << %%END%% |
---|
| 857 | #!/bin/bash -l |
---|
| 858 | #SBATCH -J $job_name |
---|
| 859 | #SBATCH -t $timestring |
---|
| 860 | #SBATCH -N $nodes |
---|
| 861 | #SBATCH --ntasks-per-node=$processes_per_node |
---|
| 862 | #SBATCH -p $queue |
---|
| 863 | #SBATCH -o $remote_dayfile |
---|
| 864 | #SBATCH -e $remote_dayfile |
---|
| 865 | |
---|
| 866 | $init_cmds |
---|
| 867 | $module_calls |
---|
| 868 | |
---|
| 869 | %%END%% |
---|
| 870 | |
---|
| 871 | else |
---|
| 872 | cat > $job_to_send << %%END%% |
---|
| 873 | #!/bin/bash -l |
---|
| 874 | #SBATCH -J $job_name |
---|
| 875 | #SBATCH -t $timestring |
---|
| 876 | #SBATCH -l ncpus=1 |
---|
| 877 | #SBATCH -l pmem=${memory}mb |
---|
| 878 | #SBATCH -m abe |
---|
| 879 | #SBATCH -o $remote_dayfile |
---|
| 880 | #SBATCH -e $remote_dayfile |
---|
| 881 | |
---|
| 882 | $init_cmds |
---|
| 883 | $module_calls |
---|
| 884 | |
---|
| 885 | %%END%% |
---|
| 886 | |
---|
| 887 | fi |
---|
| 888 | |
---|
[1099] | 889 | elif [[ $remote_host = lcflow ]] |
---|
| 890 | then |
---|
| 891 | if [[ $numprocs != 0 ]] |
---|
| 892 | then |
---|
[1547] | 893 | pe_set="#$ -pe impi $numprocs" |
---|
[1099] | 894 | else |
---|
[1547] | 895 | pe_set="#$ -pe impi 1" |
---|
[1099] | 896 | fi |
---|
| 897 | if [[ $queue = default ]] |
---|
| 898 | then |
---|
| 899 | queue_set="" |
---|
| 900 | else |
---|
| 901 | queue_set="#$ -q $queue" |
---|
| 902 | fi |
---|
| 903 | [[ "$disc_space" = "" ]] && disc_space=50 |
---|
| 904 | |
---|
| 905 | cat > $job_to_send << %%END%% |
---|
| 906 | #!/bin/bash |
---|
| 907 | #$ -S /bin/bash |
---|
| 908 | #$ -N $job_name |
---|
| 909 | #$ -cwd |
---|
| 910 | #$ -l h_rt=$timestring |
---|
| 911 | #$ -l h_vmem=${memory}M |
---|
| 912 | #$ -o $remote_dayfile |
---|
| 913 | #$ -j y |
---|
| 914 | $pe_set |
---|
| 915 | #$ -R y |
---|
| 916 | #$ -l h_fsize=${disc_space}G |
---|
| 917 | $queue_set |
---|
| 918 | |
---|
| 919 | %%END%% |
---|
| 920 | |
---|
[1021] | 921 | elif [[ $remote_host = lck || $remote_host = lckordi || $remote_host = lcsb ]] |
---|
[368] | 922 | then |
---|
| 923 | |
---|
| 924 | if [[ $numprocs != 0 ]] |
---|
| 925 | then |
---|
| 926 | cat > $job_to_send << %%END%% |
---|
| 927 | #!/bin/ksh |
---|
| 928 | #PBS -N $job_name |
---|
| 929 | #PBS -l walltime=$timestring |
---|
| 930 | #PBS -l ncpus=$numprocs |
---|
| 931 | #PBS -l pmem=${memory}mb |
---|
| 932 | #PBS -o $remote_dayfile |
---|
[1021] | 933 | #PBS -l nodes=$nodes:ppn=${processes_per_node} |
---|
[368] | 934 | #PBS -j oe |
---|
| 935 | |
---|
| 936 | mpd & |
---|
| 937 | |
---|
| 938 | %%END%% |
---|
| 939 | |
---|
| 940 | else |
---|
| 941 | cat > $job_to_send << %%END%% |
---|
| 942 | #!/bin/ksh |
---|
| 943 | #PBS -N $job_name |
---|
| 944 | #PBS -l walltime=$timestring |
---|
| 945 | #PBS -l ncpus=1 |
---|
| 946 | #PBS -l pmem=${memory}mb |
---|
| 947 | #PBS -o $remote_dayfile |
---|
| 948 | #PBS -j oe |
---|
| 949 | |
---|
| 950 | %%END%% |
---|
| 951 | |
---|
| 952 | fi |
---|
| 953 | |
---|
[1040] | 954 | elif [[ $remote_host = lckiaps ]] |
---|
| 955 | then |
---|
| 956 | |
---|
| 957 | if [[ $numprocs != 0 ]] |
---|
| 958 | then |
---|
| 959 | cat > $job_to_send << %%END%% |
---|
| 960 | #!/bin/ksh |
---|
| 961 | #PBS -N $job_name |
---|
| 962 | #PBS -l walltime=$timestring |
---|
| 963 | #PBS -l select=1:ncpus=$numprocs |
---|
| 964 | #PBS -l pmem=${memory}mb |
---|
| 965 | #PBS -q $queue |
---|
| 966 | #PBS -o $remote_dayfile |
---|
| 967 | #PBS -j oe |
---|
| 968 | #PBS -V |
---|
| 969 | |
---|
| 970 | %%END%% |
---|
| 971 | |
---|
| 972 | else |
---|
| 973 | cat > $job_to_send << %%END%% |
---|
| 974 | #!/bin/ksh |
---|
| 975 | #PBS -N $job_name |
---|
| 976 | #PBS -l walltime=$timestring |
---|
| 977 | #PBS -l ncpus=1 |
---|
| 978 | #PBS -l pmem=${memory}mb |
---|
| 979 | #PBS -o $remote_dayfile |
---|
| 980 | #PBS -j oe |
---|
| 981 | |
---|
| 982 | %%END%% |
---|
| 983 | |
---|
| 984 | fi |
---|
| 985 | |
---|
[693] | 986 | elif [[ $remote_host = lcyon ]] |
---|
| 987 | then |
---|
| 988 | |
---|
| 989 | if [[ $numprocs != 0 ]] |
---|
| 990 | then |
---|
| 991 | cat > $job_to_send << %%END%% |
---|
| 992 | #!/bin/ksh |
---|
| 993 | #PBS -N $job_name |
---|
| 994 | #PBS -l walltime=$timestring |
---|
| 995 | #PBS -l ncpus=$numprocs |
---|
| 996 | #PBS -l pmem=${memory}mb |
---|
| 997 | #PBS -o $remote_dayfile |
---|
| 998 | #PBS -j oe |
---|
| 999 | |
---|
| 1000 | %%END%% |
---|
| 1001 | |
---|
| 1002 | else |
---|
| 1003 | cat > $job_to_send << %%END%% |
---|
| 1004 | #!/bin/ksh |
---|
| 1005 | #PBS -N $job_name |
---|
| 1006 | #PBS -l walltime=$timestring |
---|
| 1007 | #PBS -l ncpus=1 |
---|
| 1008 | #PBS -l pmem=${memory}mb |
---|
| 1009 | #PBS -o $remote_dayfile |
---|
| 1010 | #PBS -j oe |
---|
| 1011 | |
---|
| 1012 | %%END%% |
---|
| 1013 | |
---|
| 1014 | fi |
---|
| 1015 | |
---|
[892] | 1016 | elif [[ $remote_host = lcxe6 ]] |
---|
[164] | 1017 | then |
---|
| 1018 | |
---|
| 1019 | if [[ $numprocs != 0 ]] |
---|
| 1020 | then |
---|
| 1021 | cat > $job_to_send << %%END%% |
---|
[799] | 1022 | #!/bin/ksh |
---|
[164] | 1023 | #PBS -S /bin/ksh |
---|
| 1024 | #PBS -N $job_name |
---|
[552] | 1025 | #PBS -A $project_account |
---|
[206] | 1026 | #PBS -j oe |
---|
[164] | 1027 | #PBS -l walltime=$timestring |
---|
| 1028 | #PBS -l mppwidth=${numprocs} |
---|
[622] | 1029 | #PBS -l mppnppn=${processes_per_node} |
---|
[164] | 1030 | #PBS -m abe |
---|
| 1031 | #PBS -o $remote_dayfile |
---|
[492] | 1032 | $email_directive |
---|
[164] | 1033 | |
---|
[892] | 1034 | $init_cmds |
---|
[493] | 1035 | $module_calls |
---|
[343] | 1036 | |
---|
[164] | 1037 | %%END%% |
---|
| 1038 | |
---|
[108] | 1039 | else |
---|
| 1040 | cat > $job_to_send << %%END%% |
---|
| 1041 | #!/bin/ksh |
---|
[168] | 1042 | #PBS -S /bin/ksh |
---|
[108] | 1043 | #PBS -N $job_name |
---|
[552] | 1044 | #PBS -A $project_account |
---|
[206] | 1045 | #PBS -j oe |
---|
[108] | 1046 | #PBS -l walltime=$timestring |
---|
| 1047 | #PBS -l ncpus=1 |
---|
| 1048 | #PBS -l pmem=${memory}mb |
---|
| 1049 | #PBS -m abe |
---|
[492] | 1050 | $email_directive |
---|
[108] | 1051 | #PBS -o $remote_dayfile |
---|
| 1052 | |
---|
[892] | 1053 | $init_cmds |
---|
[493] | 1054 | $module_calls |
---|
[343] | 1055 | |
---|
[108] | 1056 | %%END%% |
---|
| 1057 | |
---|
| 1058 | fi |
---|
| 1059 | |
---|
[440] | 1060 | elif [[ $remote_host = lckyoto ]] |
---|
[437] | 1061 | then |
---|
| 1062 | |
---|
[440] | 1063 | cat > $job_to_send << %%END%% |
---|
[799] | 1064 | #!/bin/ksh |
---|
[440] | 1065 | # @\$-o $remote_dayfile |
---|
| 1066 | # @\$-eo -oi |
---|
| 1067 | # @\$-lP 16 |
---|
[799] | 1068 | # @\$-lp 1 |
---|
[440] | 1069 | # @\$-lm 28gb -llm unlimited -ls unlimited |
---|
| 1070 | # @\$-q $queue |
---|
| 1071 | # @\$-Pvn abs_pack |
---|
| 1072 | ##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack |
---|
| 1073 | #. /thin/local/etc/setprofile/intel-11.0.sh |
---|
| 1074 | #. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh |
---|
| 1075 | . ~/.myprofile |
---|
| 1076 | #. /home2/t/t51254/palm/current_version/myprofile |
---|
| 1077 | #. /thin/apps/pgi/mpi.sh |
---|
| 1078 | # |
---|
| 1079 | env |
---|
| 1080 | # |
---|
| 1081 | set -x |
---|
| 1082 | |
---|
| 1083 | %%END%% |
---|
| 1084 | |
---|
| 1085 | elif [[ $remote_host = lcxt5m ]] |
---|
| 1086 | then |
---|
| 1087 | |
---|
[437] | 1088 | if [[ $numprocs != 0 ]] |
---|
| 1089 | then |
---|
| 1090 | cat > $job_to_send << %%END%% |
---|
[799] | 1091 | #!/bin/ksh |
---|
[437] | 1092 | #PBS -S /bin/ksh |
---|
| 1093 | #PBS -N $job_name |
---|
| 1094 | #PBS -j oe |
---|
| 1095 | #PBS -l walltime=$timestring |
---|
| 1096 | #PBS -l mppwidth=${numprocs} |
---|
[622] | 1097 | #PBS -l mppnppn=${processes_per_node} |
---|
[437] | 1098 | #PBS -m abe |
---|
| 1099 | #PBS -o $remote_dayfile |
---|
| 1100 | |
---|
[892] | 1101 | $init_cmds |
---|
[493] | 1102 | $module_calls |
---|
[437] | 1103 | |
---|
| 1104 | %%END%% |
---|
| 1105 | |
---|
| 1106 | else |
---|
| 1107 | cat > $job_to_send << %%END%% |
---|
| 1108 | #!/bin/ksh |
---|
| 1109 | #PBS -S /bin/ksh |
---|
| 1110 | #PBS -N $job_name |
---|
| 1111 | #PBS -j oe |
---|
| 1112 | #PBS -l walltime=$timestring |
---|
| 1113 | #PBS -l ncpus=1 |
---|
| 1114 | #PBS -l pmem=${memory}mb |
---|
| 1115 | #PBS -m abe |
---|
| 1116 | #PBS -o $remote_dayfile |
---|
| 1117 | |
---|
[892] | 1118 | $init_cmds |
---|
[493] | 1119 | $module_calls |
---|
[437] | 1120 | |
---|
| 1121 | %%END%% |
---|
| 1122 | |
---|
| 1123 | fi |
---|
| 1124 | |
---|
[1099] | 1125 | elif [[ $remote_host = lckyuh ]] |
---|
| 1126 | then |
---|
| 1127 | cat > $job_to_send << %%END%% |
---|
| 1128 | #!/bin/bash |
---|
| 1129 | #PJM -L "rscgrp=$queue" |
---|
| 1130 | #PJM -L "node=$nodes" |
---|
| 1131 | #PJM --mpi "proc=$numprocs" |
---|
| 1132 | #PJM -L "elapse=$timestring" |
---|
| 1133 | #PJM -o $remote_dayfile |
---|
| 1134 | #PJM -j |
---|
| 1135 | #PJM -X |
---|
| 1136 | #PJM --no-stging |
---|
| 1137 | |
---|
| 1138 | export LANG=en_US.UTF-8 |
---|
| 1139 | %%END%% |
---|
| 1140 | |
---|
[1090] | 1141 | elif [[ $remote_host = lckyut ]] |
---|
| 1142 | then |
---|
| 1143 | cat > $job_to_send << %%END%% |
---|
| 1144 | #!/bin/bash |
---|
[1099] | 1145 | #PJM -L "rscgrp=$queue" |
---|
[1090] | 1146 | #PJM -L "vnode=$numprocs" |
---|
| 1147 | #PJM -L "vnode-core=1" |
---|
| 1148 | #PJM -L "elapse=$timestring" |
---|
| 1149 | #PJM --mpi proc=$numprocs |
---|
| 1150 | #PJM -o $remote_dayfile |
---|
| 1151 | #PJM -j |
---|
[1099] | 1152 | #PJM -X |
---|
| 1153 | #PJM --no-stging |
---|
[1090] | 1154 | |
---|
| 1155 | export LANG=en_US.UTF-8 |
---|
| 1156 | %%END%% |
---|
| 1157 | |
---|
[1] | 1158 | elif [[ $remote_host = nech ]] |
---|
| 1159 | then |
---|
| 1160 | |
---|
| 1161 | if (( nodes > 1 )) |
---|
| 1162 | then |
---|
| 1163 | cat > $job_to_send << %%END%% |
---|
| 1164 | #!/bin/ksh |
---|
[622] | 1165 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
[1] | 1166 | #PBS -l ${qsubmem}=${Memory}gb |
---|
| 1167 | #PBS -b $nodes |
---|
| 1168 | #PBS -o $remote_dayfile |
---|
| 1169 | #PBS -N palm |
---|
| 1170 | #PBS -j o |
---|
| 1171 | #PBS -T mpisx |
---|
| 1172 | |
---|
| 1173 | %%END%% |
---|
| 1174 | |
---|
| 1175 | elif [[ $numprocs != 0 ]] |
---|
| 1176 | then |
---|
| 1177 | cat > $job_to_send << %%END%% |
---|
| 1178 | #!/bin/ksh |
---|
[622] | 1179 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
[1] | 1180 | #PBS -l ${qsubmem}=${Memory}gb |
---|
| 1181 | #PBS -o $remote_dayfile |
---|
| 1182 | #PBS -N palm |
---|
| 1183 | #PBS -j o |
---|
| 1184 | |
---|
| 1185 | %%END%% |
---|
| 1186 | |
---|
| 1187 | else |
---|
| 1188 | cat > $job_to_send << %%END%% |
---|
| 1189 | #!/bin/ksh |
---|
| 1190 | #PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime |
---|
| 1191 | #PBS -o $remote_dayfile |
---|
| 1192 | #PBS -j o |
---|
| 1193 | |
---|
| 1194 | %%END%% |
---|
| 1195 | |
---|
| 1196 | fi |
---|
| 1197 | |
---|
| 1198 | elif [[ $remote_host = lctit ]] |
---|
| 1199 | then |
---|
| 1200 | cat > $job_to_send << %%END%% |
---|
[635] | 1201 | #!/bin/ksh |
---|
[892] | 1202 | $init_cmds |
---|
[678] | 1203 | $module_calls |
---|
| 1204 | |
---|
[1] | 1205 | %%END%% |
---|
| 1206 | |
---|
[1289] | 1207 | # SET OPTIONS FOR SUBMIT-COMMAND |
---|
[678] | 1208 | if [[ $tasks_per_node != $processes_per_node ]] |
---|
| 1209 | then |
---|
[1378] | 1210 | 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 -et 1 -q $queue " |
---|
[678] | 1211 | else |
---|
[1378] | 1212 | 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 -et 1 -q $queue " |
---|
[678] | 1213 | fi |
---|
[1] | 1214 | |
---|
| 1215 | else |
---|
| 1216 | |
---|
| 1217 | cat > $job_to_send << %%END%% |
---|
| 1218 | # @\$-q ${queue} |
---|
| 1219 | # @\$-l${qsubtime} $timestring |
---|
| 1220 | # @\$-l${qsubmem} ${memory}mb |
---|
| 1221 | # @\$-o $remote_dayfile |
---|
| 1222 | # @\$-eo |
---|
| 1223 | |
---|
| 1224 | %%END%% |
---|
| 1225 | |
---|
| 1226 | fi |
---|
| 1227 | |
---|
| 1228 | |
---|
[1289] | 1229 | # IN CASE OF JOBS EXECUTING ON REMOTE-HOSTS, THE TRANSFER OF THE DAYFILES |
---|
| 1230 | # TO THE LOCAL HOSTS WILL BE INITIATED BY TRAP ON EXIT |
---|
| 1231 | # NO TRANSFER POSSIBLE ON IBM IN SEOUL |
---|
[1] | 1232 | if [[ $delete_dayfile = false && $remote_host != $local_host ]] |
---|
| 1233 | then |
---|
| 1234 | echo "set +vx" >> $job_to_send |
---|
| 1235 | echo "trap '" >> $job_to_send |
---|
| 1236 | echo "set +vx" >> $job_to_send |
---|
[1620] | 1237 | if [[ $(echo $remote_host | cut -c1-3) = ibm || $remote_host = lcbullhh || $remote_host = lccrayb || $remote_host = lccrayh || $(echo $remote_host | cut -c1-3) = nec || $remote_host = lcflow || $remote_host = lckiaps || $remote_host = lckyu* || $remote_host = lcxe6 ]] |
---|
[1] | 1238 | then |
---|
[622] | 1239 | if [[ $remote_host = ibmh ]] |
---|
[1] | 1240 | then |
---|
| 1241 | return_queue=c1 |
---|
[693] | 1242 | elif [[ $remote_host = ibmkisti ]] |
---|
| 1243 | then |
---|
| 1244 | return_queue=class.1-2 |
---|
[622] | 1245 | elif [[ $remote_host = ibmku ]] |
---|
| 1246 | then |
---|
| 1247 | return_queue=sdbg2 |
---|
[1] | 1248 | elif [[ $remote_host = ibms ]] |
---|
| 1249 | then |
---|
| 1250 | return_queue=p_normal |
---|
[1620] | 1251 | elif [[ $remote_host = lcbullhh ]] |
---|
| 1252 | then |
---|
| 1253 | return_queue=shared |
---|
[1274] | 1254 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1255 | then |
---|
| 1256 | return_queue=dataq |
---|
[1468] | 1257 | elif [[ $remote_host = lcxe6 ]] |
---|
| 1258 | then |
---|
| 1259 | return_queue=debug |
---|
[1040] | 1260 | elif [[ $remote_host = lckiaps ]] |
---|
| 1261 | then |
---|
| 1262 | return_queue=express |
---|
[1099] | 1263 | elif [[ $remote_host = lckyuh ]] |
---|
| 1264 | then |
---|
| 1265 | return_queue=cx-single |
---|
[1090] | 1266 | elif [[ $remote_host = lckyut ]] |
---|
| 1267 | then |
---|
| 1268 | return_queue=cx-single |
---|
[1] | 1269 | else |
---|
| 1270 | return_queue=unknown |
---|
| 1271 | fi |
---|
| 1272 | |
---|
| 1273 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 1274 | then |
---|
| 1275 | |
---|
[622] | 1276 | if [[ $remote_host = ibmku ]] |
---|
| 1277 | then |
---|
[1289] | 1278 | echo "echo \"#!/usr/bin/ksh\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1279 | echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$identifier" >> $job_to_send |
---|
[622] | 1280 | else |
---|
[1289] | 1281 | echo "echo \"#!/bin/ksh\" >> scpjob.$identifier" >> $job_to_send |
---|
[622] | 1282 | fi |
---|
[1289] | 1283 | echo "echo \"# @ job_type = serial\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1284 | echo "echo \"# @ job_name = transfer\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1285 | echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1286 | echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$identifier " >> $job_to_send |
---|
| 1287 | echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1288 | echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier" >> $job_to_send |
---|
[312] | 1289 | if [[ $host != "ibmh" ]] |
---|
| 1290 | then |
---|
[1289] | 1291 | echo "echo \"# @ class = $return_queue\" >> scpjob.$identifier" >> $job_to_send |
---|
[312] | 1292 | fi |
---|
[1289] | 1293 | echo "echo \"# @ image_size = 10\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1294 | echo "echo \"# @ notification = never\" >> scpjob.$identifier" >> $job_to_send |
---|
[1] | 1295 | |
---|
[1289] | 1296 | echo "echo \"# @ queue\" >> scpjob.$identifier" >> $job_to_send |
---|
| 1297 | echo "echo \" \" >> scpjob.$identifier" >> $job_to_send |
---|
[1] | 1298 | |
---|
[1289] | 1299 | echo "echo \"set -x\" >> scpjob.$identifier" >> $job_to_send |
---|
[1468] | 1300 | echo "echo \"batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \\\"$job_catalog\\\" $local_dayfile\" >> scpjob.$identifier" >> $job_to_send |
---|
[622] | 1301 | if [[ $remote_host = ibmku ]] |
---|
| 1302 | then |
---|
[1289] | 1303 | echo "echo \"rm scpjob.$identifier\" >> scpjob.$identifier" >> $job_to_send |
---|
[622] | 1304 | fi |
---|
[1289] | 1305 | echo "echo \"exit\" >> scpjob.$identifier" >> $job_to_send |
---|
[1] | 1306 | |
---|
| 1307 | elif [[ $remote_host = nech ]] |
---|
| 1308 | then |
---|
| 1309 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
[1289] | 1310 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
[1] | 1311 | echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100" >> $job_to_send |
---|
| 1312 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
| 1313 | echo "#PBS -j o" >> $job_to_send |
---|
| 1314 | echo " " >> $job_to_send |
---|
| 1315 | echo "set -x" >> $job_to_send |
---|
| 1316 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
[1468] | 1317 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1] | 1318 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1319 | echo "%%END%%" >> $job_to_send |
---|
| 1320 | |
---|
[1620] | 1321 | elif [[ $remote_host = lcbullhh ]] |
---|
| 1322 | then |
---|
| 1323 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
| 1324 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1325 | echo "#SBATCH --job-name=job_protocol_transfer" >> $job_to_send |
---|
| 1326 | echo "#SBATCH -t 00:20:00" >> $job_to_send |
---|
| 1327 | echo "#SBATCH -N 1" >> $job_to_send |
---|
| 1328 | echo "#SBATCH -n 1" >> $job_to_send |
---|
| 1329 | echo "#SBATCH -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1330 | echo "#SBATCH -o $remote_dayfile" >> $job_to_send |
---|
| 1331 | echo "#SBATCH -e $remote_dayfile" >> $job_to_send |
---|
| 1332 | echo "#SBATCH -A $project_account" >> $job_to_send |
---|
| 1333 | echo "#SBATCH -p $return_queue" >> $job_to_send |
---|
| 1334 | echo " " >> $job_to_send |
---|
| 1335 | echo "set -x" >> $job_to_send |
---|
| 1336 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1337 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1338 | echo "%%END%%" >> $job_to_send |
---|
| 1339 | |
---|
[1099] | 1340 | elif [[ $remote_host = lckyuh ]] |
---|
| 1341 | then |
---|
[1289] | 1342 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
[1099] | 1343 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1344 | echo "#PJM -L \"node=1\"" >> $job_to_send |
---|
| 1345 | echo "#PJM -L \"rscgrp=$return_queue\"" >> $job_to_send |
---|
| 1346 | echo "#PJM --no-stging" >> $job_to_send |
---|
| 1347 | echo "#PJM -L \"elapse=30:00\"" >> $job_to_send |
---|
| 1348 | echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1349 | echo "#PJM -j" >> $job_to_send |
---|
| 1350 | echo " " >> $job_to_send |
---|
| 1351 | echo "export LANG=en_US.UTF-8" >> $job_to_send |
---|
| 1352 | echo "set -x" >> $job_to_send |
---|
[1468] | 1353 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1099] | 1354 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1355 | echo "%%END%%" >> $job_to_send |
---|
| 1356 | |
---|
[1090] | 1357 | elif [[ $remote_host = lckyut ]] |
---|
| 1358 | then |
---|
[1289] | 1359 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
[1090] | 1360 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1361 | echo "#PJM -L \"vnode=1\"" >> $job_to_send |
---|
| 1362 | echo "#PJM -L \"rscgrp=$return_queue\"" >> $job_to_send |
---|
| 1363 | echo "#PJM --no-stging" >> $job_to_send |
---|
| 1364 | echo "#PJM -L \"elapse=30:00\"" >> $job_to_send |
---|
| 1365 | echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1366 | echo "#PJM -j" >> $job_to_send |
---|
| 1367 | echo " " >> $job_to_send |
---|
| 1368 | echo "export LANG=en_US.UTF-8" >> $job_to_send |
---|
| 1369 | echo "set -x" >> $job_to_send |
---|
[1468] | 1370 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1090] | 1371 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1372 | echo "%%END%%" >> $job_to_send |
---|
| 1373 | |
---|
[1274] | 1374 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1375 | then |
---|
[1289] | 1376 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
[1255] | 1377 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1378 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
| 1379 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
[1262] | 1380 | echo "#PBS -l nodes=1:ppn=1" >> $job_to_send |
---|
[1255] | 1381 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1382 | echo "#PBS -j oe" >> $job_to_send |
---|
| 1383 | echo " " >> $job_to_send |
---|
| 1384 | echo "set -x" >> $job_to_send |
---|
[1468] | 1385 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1255] | 1386 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1387 | echo "%%END%%" >> $job_to_send |
---|
| 1388 | |
---|
[1099] | 1389 | elif [[ $remote_host = lcflow ]] |
---|
| 1390 | then |
---|
[1289] | 1391 | echo "cat > scpjob.${identifier}.tmp << %%END%%" >> $job_to_send |
---|
[1099] | 1392 | echo "#!/bin/bash" >> $job_to_send |
---|
| 1393 | echo "SGEPREFIX -S /bin/bash" >> $job_to_send |
---|
| 1394 | echo "SGEPREFIX -N transfer_$job_name" >> $job_to_send |
---|
| 1395 | echo "SGEPREFIX -cwd" >> $job_to_send |
---|
| 1396 | echo "SGEPREFIX -l h_rt=01:00:00" >> $job_to_send |
---|
[1202] | 1397 | echo "SGEPREFIX -l h_vmem=500M" >> $job_to_send |
---|
[1099] | 1398 | echo "SGEPREFIX -j y" >> $job_to_send |
---|
[1289] | 1399 | echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$identifier" >> $job_to_send |
---|
[1099] | 1400 | echo " " >> $job_to_send |
---|
| 1401 | echo "set -x" >> $job_to_send |
---|
| 1402 | echo "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:' >> $job_to_send |
---|
| 1403 | echo "export PATH=\$PATH:\$PALM_BIN" >> $job_to_send |
---|
| 1404 | echo "" >> $job_to_send |
---|
[1468] | 1405 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1099] | 1406 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
[1289] | 1407 | echo "rm -f scpjob.${identifier}" >> $job_to_send |
---|
[1099] | 1408 | echo "%%END%%" >> $job_to_send |
---|
[1289] | 1409 | echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >> $job_to_send |
---|
| 1410 | echo "rm -f scpjob.${identifier}.tmp" >> $job_to_send |
---|
[1468] | 1411 | elif [[ $remote_host = lcxe6 ]] |
---|
| 1412 | then |
---|
| 1413 | echo "cat > scpjob.${identifier} << %%END%%" >> $job_to_send |
---|
| 1414 | echo "#!/bin/ksh" >> $job_to_send |
---|
| 1415 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
| 1416 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
| 1417 | echo "#PBS -A $project_account" >> $job_to_send |
---|
| 1418 | echo "#PBS -l mppwidth=1" >> $job_to_send |
---|
| 1419 | echo "#PBS -l mppnppn=1" >> $job_to_send |
---|
| 1420 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
| 1421 | echo "#PBS -j oe" >> $job_to_send |
---|
| 1422 | echo " " >> $job_to_send |
---|
| 1423 | echo "set -x" >> $job_to_send |
---|
| 1424 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
| 1425 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1426 | echo "%%END%%" >> $job_to_send |
---|
[1] | 1427 | else |
---|
| 1428 | |
---|
[1289] | 1429 | echo "cat > scpjob.$identifier << %%END%%" >> $job_to_send |
---|
[1] | 1430 | echo "# @\\\$-q $return_queue" >> $job_to_send |
---|
| 1431 | echo "# @\\\$-l${qsubtime} 10" >> $job_to_send |
---|
| 1432 | echo "# @\\\$-l${qsubmem} 10mb" >> $job_to_send |
---|
| 1433 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es ]] |
---|
| 1434 | then |
---|
| 1435 | echo "# @\$-l mpp_p=0" >> $job_to_send |
---|
| 1436 | fi |
---|
| 1437 | echo '# @\$-lF 10mb' >> $job_to_send |
---|
| 1438 | echo '# @\$-o job_queue/last_job_transfer_protocol' >> $job_to_send |
---|
| 1439 | echo '# @\\\$-eo' >> $job_to_send |
---|
| 1440 | echo " " >> $job_to_send |
---|
| 1441 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
| 1442 | then |
---|
| 1443 | echo "set +vx" >> $job_to_send |
---|
| 1444 | echo ". .profile" >> $job_to_send |
---|
| 1445 | fi |
---|
| 1446 | echo "set -x" >> $job_to_send |
---|
[1468] | 1447 | echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send |
---|
[1] | 1448 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
| 1449 | echo "%%END%%" >> $job_to_send |
---|
[1620] | 1450 | |
---|
[1] | 1451 | fi |
---|
| 1452 | |
---|
| 1453 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
| 1454 | then |
---|
[1289] | 1455 | echo "llsubmit scpjob.$identifier" >> $job_to_send |
---|
[1620] | 1456 | elif [[ $remote_host = lcbullhh ]] |
---|
| 1457 | then |
---|
| 1458 | echo "sbatch scpjob.$identifier" >> $job_to_send |
---|
[1274] | 1459 | elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]] |
---|
[1255] | 1460 | then |
---|
[1289] | 1461 | echo "msub -q $return_queue scpjob.$identifier" >> $job_to_send |
---|
[1] | 1462 | elif [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
| 1463 | then |
---|
[1289] | 1464 | echo "qsub -J n scpjob.$identifier" >> $job_to_send |
---|
[1] | 1465 | elif [[ $remote_host = t3es ]] |
---|
| 1466 | then |
---|
[1289] | 1467 | echo "qsub -J n -s /bin/ksh scpjob.$identifier" >> $job_to_send |
---|
[1043] | 1468 | elif [[ $remote_host = lckiaps ]] |
---|
| 1469 | then |
---|
[1289] | 1470 | echo "mv scpjob.$identifier $job_catalog" >> $job_to_send |
---|
[1468] | 1471 | echo "ssh $SSH_PORTOPT ${remote_username}@${remote_address} \"$submcom ${job_catalog}/scpjob.$identifier\" " >> $job_to_send |
---|
[1289] | 1472 | echo "rm ${job_catalog}/scpjob.$identifier" >> $job_to_send |
---|
[1099] | 1473 | elif [[ $remote_host = lckyu* ]] |
---|
[1090] | 1474 | then |
---|
[1468] | 1475 | echo "scp $PORTOPT scpjob.$identifier ${remote_username}@${remote_address}:job_queue" >> $job_to_send |
---|
| 1476 | echo "ssh $SSH_PORTOPT ${remote_username}@${remote_address} \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" " >> $job_to_send |
---|
[1099] | 1477 | elif [[ $remote_host = lcflow ]] |
---|
| 1478 | then |
---|
[1289] | 1479 | echo "mv scpjob.$identifier $job_catalog" >> $job_to_send |
---|
[1468] | 1480 | echo "/usr/bin/ssh ${remote_username}@${remote_address} \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" " >> $job_to_send |
---|
[1] | 1481 | else |
---|
[1289] | 1482 | echo "$submcom scpjob.$identifier" >> $job_to_send |
---|
[1] | 1483 | fi |
---|
[1043] | 1484 | if [[ $remote_host != ibmku && $remote_host != lckiaps ]] |
---|
[622] | 1485 | then |
---|
[1289] | 1486 | echo "rm scpjob.$identifier" >> $job_to_send |
---|
[622] | 1487 | fi |
---|
[1] | 1488 | if [[ $remote_host = nech ]] |
---|
| 1489 | then |
---|
| 1490 | echo "cd -" >> $job_to_send |
---|
| 1491 | fi |
---|
| 1492 | else |
---|
[1468] | 1493 | # echo "ftpcopy -d $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
[1289] | 1494 | # ??? funktioniert das ÃŒberhaupt noch ??? |
---|
[1468] | 1495 | echo "nohup ftpcopy -d -w 15 $local_address ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null &" >> $job_to_send |
---|
[1] | 1496 | fi |
---|
| 1497 | echo "set -x" >> $job_to_send |
---|
| 1498 | echo " ' exit" >> $job_to_send |
---|
| 1499 | echo "set -x" >> $job_to_send |
---|
| 1500 | fi |
---|
| 1501 | |
---|
| 1502 | |
---|
[1289] | 1503 | # APPEND THE JOB-FILE (CREATE BY mrun) TO THE JOB-DIRECTIVES GENERATED ABOVE |
---|
[1] | 1504 | cat $file_to_send >> $job_to_send |
---|
[69] | 1505 | |
---|
[1] | 1506 | if [[ $remote_host = ibm ]] |
---|
| 1507 | then |
---|
| 1508 | echo " " >> $job_to_send |
---|
| 1509 | echo "exit" >> $job_to_send |
---|
| 1510 | fi |
---|
[635] | 1511 | |
---|
[1289] | 1512 | # REMOVE JOB-FILE |
---|
[1099] | 1513 | if [[ $remote_host = lctit || $remote_host = ibmku || $remote_host = lcflow ]] |
---|
[69] | 1514 | then |
---|
| 1515 | echo " " >> $job_to_send |
---|
| 1516 | echo "rm ~/job_queue/$job_on_remhost" >> $job_to_send |
---|
| 1517 | fi |
---|
[1] | 1518 | |
---|
| 1519 | |
---|
[1289] | 1520 | # TRANSFER JOB TO THE TARGET HOST (JOB-DIRECTORY) |
---|
[1] | 1521 | if [[ $no_submit = false ]] |
---|
| 1522 | then |
---|
| 1523 | if [[ $remote_host != $local_host ]] |
---|
| 1524 | then |
---|
| 1525 | [[ $verify = true ]] && printf "\n >>> transfering job to \"$remote_host\"..." |
---|
[1289] | 1526 | if [[ $remote_host = ibms ]] # ssh on ibms cannot handle "~/" |
---|
[1] | 1527 | then |
---|
[82] | 1528 | job_catalog_save=$job_catalog |
---|
| 1529 | job_catalog=job_queue |
---|
| 1530 | elif [[ $remote_host = nech ]] |
---|
| 1531 | then |
---|
| 1532 | job_catalog_save=$job_catalog |
---|
| 1533 | job_catalog=/hpf/b/${remote_user}/job_queue |
---|
| 1534 | fi |
---|
[1096] | 1535 | if [[ $remote_host = nech ]] |
---|
[82] | 1536 | then |
---|
[1289] | 1537 | # FILES CAN ONLY BE TRANSFERED VIA DKRZ'S ARCHIVE-SERVER |
---|
[1094] | 1538 | scp $PORTOPT $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost |
---|
[1] | 1539 | else |
---|
[1468] | 1540 | scp $PORTOPT $job_to_send ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost |
---|
[1] | 1541 | fi |
---|
[82] | 1542 | if [[ $? = 1 ]] |
---|
| 1543 | then |
---|
| 1544 | locat=scp; exit |
---|
| 1545 | fi |
---|
| 1546 | if [[ $remote_host = ibms ]] |
---|
| 1547 | then |
---|
| 1548 | job_catalog=$job_catalog_save |
---|
| 1549 | fi |
---|
[1] | 1550 | [[ $verify = true ]] && printf "\n >>> finished\n" |
---|
| 1551 | else |
---|
| 1552 | eval job_catalog=$job_catalog |
---|
| 1553 | cp $job_to_send ${job_catalog}/$job_on_remhost |
---|
| 1554 | fi |
---|
| 1555 | |
---|
| 1556 | |
---|
| 1557 | |
---|
[1289] | 1558 | # START NQS- / LOADLEVELER-JOB |
---|
[1] | 1559 | if [[ $remote_host != $local_host ]] |
---|
| 1560 | then |
---|
| 1561 | [[ $verify = true ]] && printf "\n >>> submitting job using \"qsub\"...\n" |
---|
[635] | 1562 | |
---|
[1289] | 1563 | if [[ $remote_host = ibmku ]] |
---|
[1] | 1564 | then |
---|
[1468] | 1565 | ssh $SSH_PORTOPT $remote_address -l $remote_user "cd $job_catalog; $submcom $job_on_remhost" |
---|
[1099] | 1566 | elif [[ $remote_host = lcflow ]] |
---|
| 1567 | then |
---|
[1468] | 1568 | /usr/bin/ssh $SSH_PORTOPT $remote_address -l $remote_user "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost" |
---|
[1] | 1569 | else |
---|
[1468] | 1570 | ssh $SSH_PORTOPT $remote_address -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" |
---|
[82] | 1571 | fi |
---|
[1] | 1572 | |
---|
| 1573 | [[ $verify = true ]] && printf " >>> o.k.\n" |
---|
| 1574 | else |
---|
| 1575 | cd $job_catalog |
---|
[1289] | 1576 | if [[ $(echo $local_host | cut -c1-3) = ibm || $(echo $local_host | cut -c1-6) = lccray ]] |
---|
[1] | 1577 | then |
---|
| 1578 | eval $submcom $job_on_remhost |
---|
[1289] | 1579 | elif [[ $local_host = lctit || $localhost = lcxe6 || $localhost = lck || $localhost = lckordi || $localhost = lcyon || $localhost = lcsb || $localhost = lckyu* ]] |
---|
[108] | 1580 | then |
---|
[635] | 1581 | chmod u+x $job_on_remhost |
---|
[108] | 1582 | eval $submcom $job_on_remhost |
---|
[1] | 1583 | elif [[ $local_host = nech ]] |
---|
| 1584 | then |
---|
| 1585 | if [[ $queue = default ]] |
---|
| 1586 | then |
---|
[799] | 1587 | eval $submcom $job_on_remhost |
---|
[1] | 1588 | else |
---|
[799] | 1589 | eval $submcom -q $queue $job_on_remhost |
---|
[1] | 1590 | fi |
---|
[1620] | 1591 | elif [[ $local_host = lcbullhh ]] |
---|
| 1592 | then |
---|
| 1593 | if [[ $queue = default ]] |
---|
| 1594 | then |
---|
| 1595 | eval $submcom $job_on_remhost |
---|
| 1596 | fi |
---|
[1] | 1597 | else |
---|
| 1598 | qsub $job_on_remhost |
---|
| 1599 | fi |
---|
[622] | 1600 | |
---|
[1289] | 1601 | # JOBFILE MUST NOT BE DELETED ON lctit/ibmku/lcflow. THIS WILL BE DONE |
---|
| 1602 | # AT THE END OF THE JOB |
---|
[1099] | 1603 | if [[ $local_host != lctit && $local_host != ibmku && $local_host != lcflow ]] |
---|
[622] | 1604 | then |
---|
| 1605 | rm $job_on_remhost |
---|
| 1606 | fi |
---|
[1] | 1607 | cd - > /dev/null |
---|
| 1608 | fi |
---|
| 1609 | fi |
---|
| 1610 | |
---|
[1289] | 1611 | # FINAL ACTIONS |
---|
[1] | 1612 | if [[ $no_submit = false ]] |
---|
| 1613 | then |
---|
[1099] | 1614 | rm -f $job_to_send |
---|
[1] | 1615 | fi |
---|
[1266] | 1616 | [[ $verify = true ]] && printf "\n\n *** SUBJOB finished \n\n" |
---|