[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use Delay parameter as a global waiting time between starts
From: |
Ole Tange |
Subject: |
Re: Use Delay parameter as a global waiting time between starts |
Date: |
Thu, 25 Jun 2015 22:02:24 +0200 |
On Thu, Jun 25, 2015 at 5:43 PM, Zanarotti Michele
<zanarotti.michele@gmail.com> wrote:
> I need to use --delay parameter to run multiple scripts. I found
> (unexpectedly) that the execution of the delays is bound to a single
> core. In my machine I have 2 cores.
>
> For example
>
> time seq 10 | parallel -P0 --delay 8 -u 'echo {} start $(date +"%H:%M:%S")'
>
> This is the output:
>
> 1 start 16:17:45
> 2 start 16:17:53
> 3 start 16:17:53
Say what?!
> 4 start 16:18:01
> 5 start 16:18:01
And again?!
> 6 start 16:18:09
> 7 start 16:18:09
Weird?!
> 8 start 16:18:17
> 9 start 16:18:17
Looks like a bug somewhere.
> 10 start 16:18:25
>
> real 0m40.251s
> ...
>
> I expect that every 8 seconds a process will starts.
And rightly so. That is the intended behaviour.
> This is not true
> because parallel thinks in terms of cores. So every core will wait 8
> seconds and parallel will run 2 process every 8 seconds.
I cannot reproduce the behaviour your see: Mine waits 8 seconds
between each job as expected and takes 1m17s to run. So please follow
the section REPORTING BUGS in the man page:
See a perfect bug report on
https://lists.gnu.org/archive/html/bug-parallel/2015-01/msg00000.html
Your bug report should always include:
· The error message you get (if any).
· The complete output of parallel --version. If you are not
running the latest released version (see
http://ftp.gnu.org/gnu/parallel/) you should specify why
you believe the problem is not fixed in that version.
· A complete example that others can run that shows the
problem including all files needed to run the example. This
should preferably be small and simple, so try to remove as
many options as possible. A combination of yes, seq, cat,
echo, and sleep can reproduce most errors. If your example
requires large files, see if you can make them by something
like seq 1000000 > file or yes | head -n 10000000 > file.
If your example requires remote execution, see if you can
use localhost - maybe using another login.
· The output of your example. If your problem is not easily
reproduced by others, the output might help them figure out
the problem.
· Whether you have watched the intro videos
(http://www.youtube.com/playlist?list=PL284C9FF2488BC6D1),
walked through the tutorial (man parallel_tutorial), and
read the EXAMPLE section in the man page (man parallel -
search for EXAMPLE:).
If you suspect the error is dependent on your environment or
distribution, please see if you can reproduce the error on
one of these VirtualBox images:
http://sourceforge.net/projects/virtualboximage/files/
Specifying the name of your distribution is not enough as you
may have installed software that is not in the VirtualBox
images.
If you cannot reproduce the error on any of the VirtualBox
images above, see if you can build a VirtualBox image on
which you can reproduce the error. If not you should assume
the debugging will be done through you. That will put more
burden on you and it is extra important you give any
information that help. In general the problem will be fixed
faster and with less work for you if you can reproduce the
error on a VirtualBox.
As I cannot reproduce the behaviour you see, you will need to
reproduce the problem in a VirtualBox image.
/Ole