source: palm/trunk/SCRIPTS/subjob @ 2349

Last change on this file since 2349 was 2295, checked in by raasch, 7 years ago

script adjustments for using lcgeohu, cpp_opts removed

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