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