From 37fd9adb7b30b19b344af42a635a374a34cfea2c Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 6 Jan 2016 16:22:30 +0100 Subject: [PATCH] Fixed bug #46819: --wd is ignored for --nonall. --- doc/release_new_version | 12 +++++-- src/parallel | 4 ++- src/parallel.pod | 34 ++++++++++--------- testsuite/tests-to-run/parallel-local-ssh6.sh | 3 ++ testsuite/wanted-results/parallel-local-ssh5 | 6 ++-- testsuite/wanted-results/parallel-local-ssh6 | 3 ++ 6 files changed, 40 insertions(+), 22 deletions(-) diff --git a/doc/release_new_version b/doc/release_new_version index 3db0601c..c371cea6 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -241,6 +241,8 @@ New in this release: * man parallel_tutorial has been given an overhaul. +* --workdir now accepts replacementstrings. + * << kontakt GNU Parallel was used (unfortunately without citation) in: Instrumentation and Trace Analysis for Ad-hoc Python Workflows in Cloud Environments http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7214035>> * <> GNU Parallel was used (unfortunately without citation) in: MUGBAS: a species free gene-based programme suite for post-GWAS analysis http://www.ncbi.nlm.nih.gov/pubmed/25765345 @@ -257,12 +259,18 @@ for Big Data Applications https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumb * <> -* GNU Parallel is used in LAST: http://last.cbrc.jp/ - * GNU Parallel was cited in: Possum - A Framework for Three-Dimensional Reconstruction of Brain Images rfom Serial Sections http://link.springer.com/article/10.1007/s12021-015-9286-1 +* GNU Parallel was cited in: A Genetic Algorithm for the selection of structural MRI features for classification of Mild Cognitive Impairment and Alzheimer's Disease http://ieeexplore.ieee.org/xpl/abstractReferences.jsp?tp=&arnumber=7359909&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D7359909 + +* GNU Parallel was cited in: The Effect of Domain Modeling on Performance of Planning Algorithms http://isaim2016.cs.virginia.edu/papers/ISAIM2016_Bartak_Vodrazka.pdf + +* Plotting time tables for jobs run by GNU Parallel https://github.com/ziotom78/plot_joblog + * GNU Parallel was used in: Mission Impossible: you have 1 minute to analyze the Ebola Genome https://www.biostars.org/p/119397 +* GNU Parallel is used in LAST: http://last.cbrc.jp/ + * Distributed Log Search Using GNU Parallel http://blog.codehate.com/post/134320079974/distributed-log-search-using-gnu-parallel * Bug fixes and man page updates. diff --git a/src/parallel b/src/parallel index e74cea4c..a30a4ac1 100755 --- a/src/parallel +++ b/src/parallel @@ -3208,6 +3208,7 @@ sub onall { ((defined $opt::retries) ? "--retries ".$opt::retries : ""), ((defined $opt::timeout) ? "--timeout ".$opt::timeout : ""), ((defined $opt::ungroup) ? "-u" : ""), + ((defined $opt::workdir) ? "--wd ".$opt::workdir : ""), (@Global::transfer_files ? map { "--tf ".::shell_quote_scalar($_) } @Global::transfer_files : ""), (@Global::ret_files ? map { "--return ".::shell_quote_scalar($_) } @@ -9737,6 +9738,7 @@ sub new { "pg" => "Pg", "postgres" => "Pg", "postgresql" => "Pg", + "csv" => "CSV", "oracle" => "Oracle", "ora" => "Oracle"); my $driver = $driveralias{$options{'databasedriver'}} || @@ -9840,7 +9842,7 @@ sub parse_dburl { if($url=~m!(?:sql:)? # You can prefix with 'sql:' ((?:oracle|ora|mysql|pg|postgres|postgresql)(?:s|ssl|)| - (?:sqlite|sqlite2|sqlite3)):// # Databasedriver ($1) + (?:sqlite|sqlite2|sqlite3|csv)):// # Databasedriver ($1) (?: ([^:@/][^:@]*|) # Username ($2) (?: diff --git a/src/parallel.pod b/src/parallel.pod index f4ececf0..d8e9e777 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -322,7 +322,7 @@ shell quote a string =item Z<> B -number of jobs in total (alpha testing) +number of jobs in total (beta testing) =back @@ -452,9 +452,9 @@ It is compatible with B: 2> >(zenity --progress --auto-kill) | wc -=item B<--basefile> I (alpha testing) +=item B<--basefile> I (beta testing) -=item B<--bf> I (alpha testing) +=item B<--bf> I (beta testing) I will be transferred to each sshlogin before a jobs is started. It will be removed if B<--cleanup> is active. The file may be @@ -540,7 +540,7 @@ Implies B<--pipe> unless B<--pipepart> is used. See also B<--fifo>. -=item B<--cleanup> (alpha testing) +=item B<--cleanup> (beta testing) Remove transferred files. B<--cleanup> will remove the transferred files on the remote computer after processing is done. @@ -1060,9 +1060,9 @@ the same syntax as B<--jobs>, so I<100%> for one per CPU is a valid setting. Only difference is 0 which is interpreted as 0.01. -=item B<--controlmaster> (alpha testing) +=item B<--controlmaster> (beta testing) -=item B<-M> (alpha testing) +=item B<-M> (beta testing) Use ssh's ControlMaster to make ssh connections faster. Useful if jobs run remote and are very fast to run. This is disabled for sshlogins @@ -1100,7 +1100,7 @@ See also B<-X> for context replace. If in doubt use B<-X> as that will most likely do what is needed. -=item B<--memfree> I (beta testing) +=item B<--memfree> I Minimum memory free when starting another job. The I can be postfixed with K, M, G, T, P, k, m, g, t, or p which would multiply @@ -1161,9 +1161,9 @@ of each job is saved in a file and the filename is then printed. See also: B<--results> -=item B<--pipe> (alpha testing) +=item B<--pipe> (beta testing) -=item B<--spreadstdin> (alpha testing) +=item B<--spreadstdin> (beta testing) Spread input to jobs on stdin (standard input). Read a block of data from stdin (standard input) and give one block of data as input to one @@ -1524,7 +1524,7 @@ the joblog. See also B<--joblog>, B<--resume>, B<--resume-failed>. -=item B<--retries> I (alpha testing) +=item B<--retries> I (beta testing) If a job fails, retry it on another computer on which it has not failed. Do this I times. If there are fewer than I computers in @@ -1533,7 +1533,7 @@ useful if some jobs fail for no apparent reason (such as network failure). -=item B<--return> I (alpha testing) +=item B<--return> I (beta testing) Transfer files from remote computers. B<--return> is used with B<--sshlogin> when the arguments are files on the remote computers. When @@ -2050,14 +2050,14 @@ Print the job to be run on stderr (standard error). See also B<-v>, B<-p>. -=item B<--transfer> (alpha testing) +=item B<--transfer> (beta testing) Transfer files to remote computers. Shorthand for: B<--transferfile {}>. -=item B<--transferfile> I (alpha testing) +=item B<--transferfile> I (beta testing) -=item B<--tf> I (alpha testing) +=item B<--tf> I (beta testing) B<--transferfile> is used with B<--sshlogin> to transfer files to the remote computers. The files will be transferred using B and @@ -2187,9 +2187,9 @@ Use B<-v> B<-v> to print the wrapping ssh command when running remotely. Print the version GNU B and exit. -=item B<--workdir> I +=item B<--workdir> I (alpha testing) -=item B<--wd> I +=item B<--wd> I (alpha testing) Files transferred using B<--transferfile> and B<--return> will be relative to I on remote computers, and the command will be @@ -2211,6 +2211,8 @@ To see the difference try: parallel --wd . -S server pwd ::: "" parallel --wd ... -S server pwd ::: "" +I can contain GNU B's replacement strings. + =item B<--wait> diff --git a/testsuite/tests-to-run/parallel-local-ssh6.sh b/testsuite/tests-to-run/parallel-local-ssh6.sh index 1db165eb..3420971f 100644 --- a/testsuite/tests-to-run/parallel-local-ssh6.sh +++ b/testsuite/tests-to-run/parallel-local-ssh6.sh @@ -81,4 +81,7 @@ echo '### Test --wd {= =}'; parallel --workdir '{= $_=uc($_) =}' -S $SSHLOGIN2 touch ::: wd1 wd2; ssh $SSHLOGIN2 ls -d WD1 WD2 +echo '### Test --nonall --wd'; + parallel --workdir /tmp -S $SSHLOGIN2 --nonall pwd + EOF diff --git a/testsuite/wanted-results/parallel-local-ssh5 b/testsuite/wanted-results/parallel-local-ssh5 index f858bd86..bf226497 100644 --- a/testsuite/wanted-results/parallel-local-ssh5 +++ b/testsuite/wanted-results/parallel-local-ssh5 @@ -93,11 +93,11 @@ OK # Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler echo '### bug #45025: --pipe --retries does not reschedule on other host' ### bug #45025: --pipe --retries does not reschedule on other host - seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname' + seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname' | perl -pe 's/'`hostname`'/localhost-:/' parallel: Warning: Could not figure out number of cpus on a.a (). Using 1. 165668 165668 1048571 -aspire +localhost-: 134362 134362 940534 -aspire +localhost-: stdout parallel --retries 2 --roundrobin echo ::: should fail parallel: Error: --retries cannot be combined with --roundrobin. diff --git a/testsuite/wanted-results/parallel-local-ssh6 b/testsuite/wanted-results/parallel-local-ssh6 index 905101c9..2639e5ed 100644 --- a/testsuite/wanted-results/parallel-local-ssh6 +++ b/testsuite/wanted-results/parallel-local-ssh6 @@ -114,3 +114,6 @@ echo '### Test --wd {= =}'; ssh csh@lo rm -rf WD1 WD2; mkdir -p $HOME/mydir; ### Test --wd {= =} WD1 WD2 +echo '### Test --nonall --wd'; parallel --workdir /tmp -S csh@lo --nonall pwd +### Test --nonall --wd +/tmp