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