Changeset 1090 for palm/trunk/SCRIPTS/subjob
- Timestamp:
- Feb 2, 2013 7:06:13 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/subjob
r1047 r1090 1 1 #!/bin/ksh 2 3 # subjob - script for automatic generation and submission of batch-job files 4 # for various batch queuing systems 5 2 6 #--------------------------------------------------------------------------------# 3 7 # This file is part of PALM. … … 18 22 # 19 23 # Current revisions: 20 # ----------------- 24 # ------------------ 25 # adjustments for Kyushu-University computing center (lckyut) 26 # old changelog messages removed 21 27 # 22 28 # Former revisions: … … 27 33 # code put under GPL (PALM 3.9) 28 34 # 29 # subjob - Plot-Shellskript Version: @(#)SUBJOB 1.0 30 # Prozedur zum automatischen Generieren von Batch-Jobs, die unter NQS 31 # laufen sollen und deren Ergebnis (Dayfile) zum Job-generierenden 32 # Host zurueckgeschickt werden sollen 33 34 35 # letzte Aenderung: 36 # 29/06/94 - Siggi - Beginn mit Erstellung der Originalversion 37 # 08/07/94 - Siggi - Originalversion abgeschlossen (Version 1.0) 38 # 06/02/98 - Siggi - berte validiert 39 # 27/01/01 - Siggi - ground.yonsei.ac.kr validiert, Jobs zur T3E in Korea 40 # moeglich 41 # 08/02/01 - Siggi - alle subjob-Meldungen ins englische uebersetzt 42 # 25/05/02 - Siggi - Unterstuetzung des LoadLeveler 43 # 30/05/02 - Siggi - Validierung fuer ibm-Rechner in Seoul (nobel) sowie 44 # allgemeine Anpassungen fuer ibm-Rechner 45 # 15/10/02 - Siggi - Neue Default-Jobklasse (p_normal) fuer IBM in Seoul 46 # Ruecktransfer des Jobprotokolls fuer diese 47 # Maschine abgeschaltet 48 # 31/10/02 - Siggi - berni validiert 49 # 06/11/02 - Siggi - Neue Jobklassen auf ibmb und ibmh 50 # 08/11/02 - Siggi - quanero validiert 51 # 11/12/02 - Siggi - Notification fuer Transfer-Jobs abgeschaltet 52 # 23/01/03 - Siggi - hostname nobel changed to nobela 53 # 06/02/03 - Siggi - gregale validated 54 # 12/02/03 - Siggi - orkan and maestro validated 55 # 21/02/03 - Siggi - all nobel nodes in Seoul validated 56 # 12/03/03 - Siggi - nec at DKRZ validated 57 # 13/03/03 - Siggi - new nqs resource variable Memory 58 # 07/04/03 - Siggi - processor request option -c on nech needs tasks per 59 # node 60 # 11/04/03 - Siggi - network on ibms has attribute "shared" 61 # 31/07/03 - Siggi - nqs2 on nech implemented (provisional: -h nech2) 62 # cxxl added to ibmh 63 # 29/08/03 - Siggi - changes in job queues and communication system on 64 # ibms 65 # 24/10/03 - Siggi - using alternate hanni address 130.75.4.2 66 # 30/10/03 - Siggi - nech is not supported any more 67 # 10/11/03 - Siggi - nech2 renamed to nech 68 # 20/11/03 - Siggi - submit command on nech changed from qsub.test to qsub 69 # 29/03/04 - Siggi - ground not supported any more, gfdl3 validated 70 # 31/03/04 - Siggi - new option -N for node usage 71 # 12/04/04 - Siggi - scp2 instead of scp used for transfer from decalpha 72 # due to error in ssh installation (otherwise a prompt 73 # for the password appears) 74 # 23/07/04 - Siggi - changes due to the new berni configuration 75 # (federation switch) 76 # 01/09/04 - Gerald new job-classes on hanni 77 # 08/09/04 - Siggi - hanni IP address changed to 130.75.4.10 78 # 23/11/04 - Siggi - new job class cdata on hanni and berni 79 # 03/12/04 - Siggi - notification on ibm switched of in case of 80 # delete_dayfile = true, node usage in cdev set to 81 # shared 82 # 16/02/05 - Gerald hababai validated 83 # 29/03/05 - Micha - new job class channi on hanni 84 # 11/05/05 - Siggi - ConsumableMemory is now required as resource keyword 85 # on ibms 86 # 24/05/05 - Siggi - Default queue on ibms changed from p_normal_1.3 to 87 # p_normal 88 # 30/06/05 - Siggi - network changed for queue cdev from "us" to "ip" 89 # 12/07/05 - Siggi - in network.mpi on ibmh/ibmb "csss" changed to 90 # "sn_all", new job class cexp 91 # 08/09/05 - Siggi - IP-address of gfdl3 changed 92 # 31/10/05 - Siggi - new job class pp on hurricane, serial jobs on 93 # hurricane (with -X0) 94 # 01/11/05 - Siggi - missing queue for jobs submitted on nech (for nech) 95 # added 96 # 30/12/05 - Siggi - change of IP adresses in subnet 130.75.105 97 # 09/02/06 - Siggi - ibmy admitted 98 # 10/02/06 - Siggi - scp2 changed to /bin/scp on decalpha 99 # 13/04/06 - Siggi - ostria admitted 100 # 18/04/06 - Siggi - new option -O for OpenMP usage 101 # 24/05/06 - Siggi - lctit admitted, ftpjob renamed scpjob 102 # 25/07/06 - Siggi - gfdl5 (ibmy) admitted for submitting jobs 103 # 27/09/06 - Siggi - breg/hreg extended with berni/hanni 104 # 25/10/06 - Siggi - data_limit set to 1.76 GByte on hanni and berni 105 # 28/11/06 - Siggi - levanto admitted 106 # 13/02/07 - Siggi - hpmuk releated code removed 107 # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx) 108 # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only 109 # 27/07/07 - Siggi - autan admitted 110 # 03/08/07 - Marcus- lcfimm admitted 111 # 08/10/07 - Siggi - further job classes added for hanni (csoloh...) 112 # 15/10/07 - Siggi - preliminary adjustments for lctit based on Jin's 113 # suggestions 114 # 19/10/07 - Marcus- add new optional argument -g group_number 115 # 19/10/07 - Siggi - a ";" was missing in the last change done by Marcus 116 # 30/10/07 - Marcus- further adjustments for queues on lctit 117 # 15/05/08 - Siggi - adjustments for lcxt4 (Bergen Center for Computational 118 # Science) 119 # 14/07/08 - Siggi - adjustments for lcsgih 120 # 23/09/08 - Gerald- paesano admitted 121 # 02/10/08 - Siggi - PBS adjustments for lcxt4 122 # 02/03/09 - Siggi - Adjustments for new NEC-SX9 at RIAM 123 # 16/04/09 - Marcus- Adjustments for lcsgib and lcsgih 124 # 21/04/09 - Siggi - adjustments for new IBM at DKRZ, which is now ibmh 125 # 18/05/09 - Siggi - Settings for serial jobs on lcsgi changed 126 # 24/06/09 - BjornM- adjustments for lcxt4 (loading modules manually) 127 # 08/07/09 - Siggi - option -e added (email notification on lcsgih/b) 128 # 20/07/09 - Siggi - On lcsgi, jobs for returning the job protocol are 129 # now run on the data nodes (feature=data) 130 # 25/08/09 - BjornM- adapted for lck 131 # 26/08/09 - Marcus- caurus admitted; optional qos feature hiprio on lcsgi 132 # 03/09/09 - Siggi - PBS sgi feature directive only used if explicitly 133 # set in the config file by the user 134 # 16/10/09 - Carolin-adjustments for archiving on SGI-ICE of binary files; 135 # adding special1q 136 # 01/12/09 - BjornM- re-adjustments for lcxt4, added sno (130.75.105.113) 137 # 16/10/09 - Carolin-adding permq 138 # 01/02/10 - Siggi - adapted for lcxt5m and lckyoto (Fujitsu HX600) 139 # 03/02/10 - Siggi - bug in serial jobs removed 140 # 26/02/10 - BjornM- re-adjustments for lcxt4 (new modules, email 141 # notification) 142 # 01/03/10 - Siggi - loading of modules controlled by environment variable 143 # module_calls 144 # 17/08/10 - BjornM- re-adjustments for lcxt4 (location of qsub) 145 # 25/08/10 - BjornM- account geofysisk replaced by guest for lcxt4 146 # 25/08/10 - Siggi - new variable project_account in pbs-statements for 147 # lcxt4 148 # 08/12/10 - Siggi - initialization of the module command changed for 149 # SGI-ICE/lcsgi 150 # adjustments for Kyushu Univ. (lcrte, ibmku) 151 # 14/12/10 - Siggi - adjustments for new Tsubame system at Tokyo 152 # institute of technology (lctit) 153 # 02/02/11 - Siggi - further asjustments for Tsubame concerning openMP 154 # 06/03/11 - Siggi - adjustments for ibmkisti 155 # 17/03/11 - Siggi - adjustments for openmp usage on ibmkisti 156 # 03/04/11 - Micha - added lckordi 157 # 17/08/11 - Siggi - hicegate0 added 158 # 18/08/11 - Siggi - workaround on lcsgi in order to avoid appends to file 159 # last_job_transfer_protocol 160 # 21/08/11 - Siggi - inferno admitted 161 # 29/11/11 - Siggi - adjustments for lcsgih/lcsgib queues, pingui admitted 162 # 21/12/11 - Theres- solano admitted 163 # 31/01/12 - Matthias - adjustments for ibmh 164 # 02/05/12 - Bjoern - lcxt4 is now lcxe6, adjustments for lcxe6, 165 # bugfixes for the parameter file check, initial 166 # commands on ssh calls sourced out to .mrun.config 167 # 02/10/12 - Siggi - adjustments for lcsb 168 # 01/11/12 - Siggi - adjustments for lckiaps 169 35 # 08/07/94 - Siggi - first version finished 36 # 29/06/94 - Siggi - script development started 37 #--------------------------------------------------------------------------------# 38 # subjob - script for automatic generation and submission of batch-job files 39 # for various batch queuing systems 40 #--------------------------------------------------------------------------------# 170 41 171 42 … … 284 155 (scirocco) local_addres=172.20.25.41; local_host=lcmuk;; 285 156 (solano) local_addres=130.75.105.110; local_host=lcmuk;; 157 (sugoka*) local_addres=172.31.120.1; local_host=lckyut;; 286 158 (sun1|sun2) local_addres=130.75.6.1; local_host=unics;; 287 159 (sx-*) local_addres=172.16.1.131; local_host=necriam;; … … 423 295 (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;; 424 296 (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;; 297 (lckyut) remote_addres=133.5.4.37; submcom=/usr/bin/pjsub;; 425 298 (lcsb) remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;; 426 299 (lctit) queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;; … … 474 347 (lckyoto) case $ndq in 475 348 (eh|ph) error=false;; 349 (*) error=true;; 350 esac;; 351 (lckyut) case $ndq in 352 (cx-dbg|cx-single|cx-small|cx-middle|cx-large) error=false;; 476 353 (*) error=true;; 477 354 esac;; … … 1134 1011 fi 1135 1012 1013 elif [[ $remote_host = lckyut ]] 1014 then 1015 cat > $job_to_send << %%END%% 1016 #!/bin/bash 1017 #PJM -L "vnode=$numprocs" 1018 #PJM -L "vnode-core=1" 1019 #PJM -L "rscgrp=$queue" 1020 #PJM --no-stging 1021 #PJM -L "elapse=$timestring" 1022 #PJM --mpi proc=$numprocs 1023 #PJM -o $remote_dayfile 1024 #PJM -j 1025 1026 export LANG=en_US.UTF-8 1027 %%END%% 1028 1136 1029 elif [[ $remote_host = nech ]] 1137 1030 then … … 1251 1144 echo "trap '" >> $job_to_send 1252 1145 echo "set +vx" >> $job_to_send 1253 if [[ $(echo $remote_host | cut -c1-3) = ibm || $(echo $remote_host | cut -c1-5) = lcsgi || $(echo $remote_host | cut -c1-3) = nec || $remote_host = lckiaps ]]1146 if [[ $(echo $remote_host | cut -c1-3) = ibm || $(echo $remote_host | cut -c1-5) = lcsgi || $(echo $remote_host | cut -c1-3) = nec || $remote_host = lckiaps || $remote_host = lckyut ]] 1254 1147 then 1255 1148 if [[ $remote_host = ibmh ]] … … 1277 1170 then 1278 1171 return_queue=express 1172 elif [[ $remote_host = lckyut ]] 1173 then 1174 return_queue=cx-single 1279 1175 else 1280 1176 return_queue=unknown … … 1336 1232 echo "#PBS -j o" >> $job_to_send 1337 1233 echo " " >> $job_to_send 1234 echo "set -x" >> $job_to_send 1235 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1236 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1237 echo "%%END%%" >> $job_to_send 1238 1239 elif [[ $remote_host = lckyut ]] 1240 then 1241 echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send 1242 echo "#!/bin/bash" >> $job_to_send 1243 echo "#PJM -L \"vnode=1\"" >> $job_to_send 1244 echo "#PJM -L \"rscgrp=$return_queue\"" >> $job_to_send 1245 echo "#PJM --no-stging" >> $job_to_send 1246 echo "#PJM -L \"elapse=30:00\"" >> $job_to_send 1247 echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send 1248 echo "#PJM -j" >> $job_to_send 1249 echo " " >> $job_to_send 1250 echo "export LANG=en_US.UTF-8" >> $job_to_send 1338 1251 echo "set -x" >> $job_to_send 1339 1252 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send … … 1403 1316 echo "ssh ${remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send 1404 1317 echo "rm ${job_catalog}/scpjob.$kennung" >> $job_to_send 1318 elif [[ $remote_host = lckyut ]] 1319 then 1320 echo "scp -P 22 scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send 1321 echo "ssh -p 22 ${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send 1405 1322 else 1406 1323 echo "$submcom scpjob.$kennung" >> $job_to_send … … 1520 1437 then 1521 1438 eval $submcom $job_on_remhost 1522 elif [[ $local_host = lcfimm || $local_host = lctit || $localhost = lcxe6 || $localhost = lck || $localhost = lckordi || $localhost = lcyon || $localhost = lcsb ]]1439 elif [[ $local_host = lcfimm || $local_host = lctit || $localhost = lcxe6 || $localhost = lck || $localhost = lckordi || $localhost = lcyon || $localhost = lcsb || $localhost = lckyut ]] 1523 1440 then 1524 1441 chmod u+x $job_on_remhost
Note: See TracChangeset
for help on using the changeset viewer.