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