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