Changeset 1094 for palm/trunk/SCRIPTS/subjob
- Timestamp:
- Feb 3, 2013 1:52:12 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/subjob
r1091 r1094 23 23 # Current revisions: 24 24 # ------------------ 25 # 25 # new option -P for explicit setting of ssh/scp port 26 26 # 27 27 # Former revisions: … … 181 181 182 182 # PROZEDUROPTIONEN EINLESEN 183 while getopts :c:dDe:g:h:m:n:N:O: q:t:T:u:vX: option183 while getopts :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX: option 184 184 do 185 185 case $option in … … 194 194 (N) node_usage=$OPTARG;; 195 195 (O) threads_per_task=$OPTARG;; 196 (P) scp_port=$OPTARG;; 196 197 (q) no_default_queue=$OPTARG;; 197 198 (t) cputime=$OPTARG;; … … 226 227 printf "\n -n jobname <jobdatei>" 227 228 printf "\n -O threads per task (for OpenMP usage) 1" 229 printf "\n -P ssh/scp port default port" 228 230 printf "\n -q job-queue to be used default" 229 231 printf "\n -t allowed cpu-time in seconds ---" … … 478 480 fi 479 481 482 480 483 # Calculate number of processes per node 481 484 (( processes_per_node = tasks_per_node * threads_per_task )) 482 485 486 483 487 # Calculate number of MPI tasks 484 488 (( mpi_tasks = numprocs / threads_per_task )) 489 490 491 # Set port number option for calls of ssh/scp, subjob and batch_scp scripts 492 if [[ "$scp_port" != "" ]] 493 then 494 PORTOPT="-P $scp_port" 495 SSH_PORTOPT="-p $scp_port" 496 fi 485 497 486 498 … … 1207 1219 1208 1220 echo "echo \"set -x\" >> scpjob.$kennung" >> $job_to_send 1209 echo "echo \"batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \\\"$job_catalog\\\" $local_dayfile\" >> scpjob.$kennung" >> $job_to_send1221 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 1210 1222 if [[ $remote_host = ibmku ]] 1211 1223 then … … 1224 1236 echo "set -x" >> $job_to_send 1225 1237 echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send 1226 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1238 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1227 1239 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1228 1240 echo "%%END%%" >> $job_to_send … … 1236 1248 echo " " >> $job_to_send 1237 1249 echo "set -x" >> $job_to_send 1238 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1250 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1239 1251 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1240 1252 echo "%%END%%" >> $job_to_send … … 1253 1265 echo "export LANG=en_US.UTF-8" >> $job_to_send 1254 1266 echo "set -x" >> $job_to_send 1255 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1267 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1256 1268 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1257 1269 echo "%%END%%" >> $job_to_send … … 1270 1282 echo ". /usr/share/modules/init/bash" >> $job_to_send 1271 1283 echo "set -x" >> $job_to_send 1272 echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1284 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1273 1285 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1274 1286 echo "%%END%%" >> $job_to_send … … 1295 1307 fi 1296 1308 echo "set -x" >> $job_to_send 1297 echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send1309 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 1298 1310 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1299 1311 echo "%%END%%" >> $job_to_send … … 1317 1329 then 1318 1330 echo "mv scpjob.$kennung $job_catalog" >> $job_to_send 1319 echo "ssh $ {remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send1331 echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send 1320 1332 echo "rm ${job_catalog}/scpjob.$kennung" >> $job_to_send 1321 1333 elif [[ $remote_host = lckyut ]] 1322 1334 then 1323 echo "scp -P 22scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send1324 echo "ssh -p 22${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send1335 echo "scp $PORTOPT scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send 1336 echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send 1325 1337 else 1326 1338 echo "$submcom scpjob.$kennung" >> $job_to_send … … 1393 1405 # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE 1394 1406 # PASSWORT AB 1395 /bin/scp $ job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost1407 /bin/scp $PORTOPT $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 1396 1408 elif [[ $remote_host = nech ]] 1397 1409 then 1398 1410 # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ 1399 1411 # TRANSFERIERT WERDEN 1400 scp $ job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost1412 scp $PORTOPT $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost 1401 1413 else 1402 scp $ job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost1414 scp $PORTOPT $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 1403 1415 fi 1404 1416 if [[ $? = 1 ]] … … 1426 1438 then 1427 1439 printf "\n >>> submit with HLRN qos-feature hiprio...\n" 1428 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"1440 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost" 1429 1441 elif [[ $remote_host = ibmku ]] 1430 1442 then 1431 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost"1443 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost" 1432 1444 else 1433 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"1445 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 1434 1446 fi 1435 1447
Note: See TracChangeset
for help on using the changeset viewer.