diff --git a/src/parallel.pod b/src/parallel.pod index 15f5496a..0e83e579 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -282,7 +282,7 @@ Run command in background thus GNU B will not wait for completion of the command before exiting. This is the default if B<--semaphore> is set. -See also: B<--fg> +See also: B<--fg>, B Implies B<--semaphore>. @@ -399,7 +399,7 @@ Implies B<--progress>. Run command in foreground thus GNU B will wait for completion of the command before exiting. -See also: B<--bg> +See also: B<--bg>, B Implies B<--semaphore>. @@ -932,16 +932,26 @@ Used with B<--fg>, B<--wait>, and B<--semaphorename>. The command B is an alias for B. +See also: B + =item B<--semaphorename> I =item B<--id> I -The name of the semaphore to use. The semaphore can be shared between -multiple processes. +Use B as the name of the semaphore. Default is the name of the +controlling tty (output from B). + +The default normally works as expected when used interactively, but +when used in a script I should be set. I<$$> or I +are often a good value. + +The semaphore is stored in ~/.parallel/semaphores/ Implies B<--semaphore>. +See also: B + =item B<--semaphoretimeout> I (not implemented) @@ -949,6 +959,8 @@ If the semaphore is not released within secs seconds, take it anyway. Implies B<--semaphore>. +See also: B + =item B<--seqreplace> I @@ -1203,6 +1215,8 @@ Wait for all commands to complete. Implies B<--semaphore>. +See also: B + =item B<-X> diff --git a/src/sem.pod b/src/sem.pod index af8ad19e..52450827 100755 --- a/src/sem.pod +++ b/src/sem.pod @@ -31,7 +31,13 @@ B is capable of. Command to execute. The command may be followed by arguments for the command. -=item B<--count> I +=item B<--bg> + +Run command in background thus GNU B will not wait for +completion of the command before exiting. This is the default. + +See also: B<--fg> + =item B<-j> I @@ -39,15 +45,82 @@ Run up to N commands in parallel. Default is 1 thus acting like a mutex. -=item B<--id> I +=item B<--jobs> I -=item B<-i> I +=item B<-j> I -Use B as the name of the semaphore. Default is the name of the +=item B<--max-procs> I + +=item B<-P> I + +Run up to N commands in parallel. Default is 1 thus acting like a +mutex. + + +=item B<--jobs> I<+N> + +=item B<-j> I<+N> + +=item B<--max-procs> I<+N> + +=item B<-P> I<+N> + +Add N to the number of CPU cores. Run up to this many jobs in +parallel. For compute intensive jobs B<-j> +0 is useful as it will run +number-of-cpu-cores jobs simultaneously. + + +=item B<--jobs> I<-N> + +=item B<-j> I<-N> + +=item B<--max-procs> I<-N> + +=item B<-P> I<-N> + +Subtract N from the number of CPU cores. Run up to this many jobs in +parallel. If the evaluated number is less than 1 then 1 will be used. +See also B<--use-cpus-instead-of-cores>. + + +=item B<--jobs> I% + +=item B<-j> I% + +=item B<--max-procs> I% + +=item B<-P> I% + +Multiply N% with the number of CPU cores. Run up to this many jobs in +parallel. If the evaluated number is less than 1 then 1 will be used. +See also B<--use-cpus-instead-of-cores>. + + +=item B<--jobs> I + +=item B<-j> I + +=item B<--max-procs> I + +=item B<-P> I + +Read parameter from file. Use the content of I as parameter +for I<-j>. E.g. I could contain the string 100% or +2 or +10. + + +=item B<--semaphorename> I + +=item B<--id> I + +Use B as the name of the semaphore. Default is the name of the controlling tty (output from B). The default normally works as expected when used interactively, but -when used in a script I should be set. $$ is often a good value. +when used in a script I should be set. I<$$> or I +are often a good value. + +The semaphore is stored in ~/.parallel/semaphores/ =item B<--fg> @@ -95,7 +168,7 @@ time. B running as a mutex will do just that: =head1 BUGS -Quoting and composed commands are not working. +None known. =head1 REPORTING BUGS @@ -219,7 +292,7 @@ A copy of the full license is included in the file as cc-by-sa.txt. =head1 DEPENDENCIES -GNU B uses Perl, and the Perl modules Getopt::Long, +GNU B uses Perl, and the Perl modules Getopt::Long, Symbol, Fcntl.