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