parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sshloginfile in GNU parallel


From: Ole Tange
Subject: Re: sshloginfile in GNU parallel
Date: Mon, 2 Dec 2013 00:53:53 +0100

On Sun, Dec 1, 2013 at 10:31 PM, yacob sen <yacob_123@yahoo.com> wrote:

> Here is my understanding of the gnu parallel implementations on a single
> node:
>
> cat  $file_name | parallel -u -j 12  --sshloginfile  $login_server_name
> --colsep '  '   program.sh {1} {2}

> My idea is for the above command is to distribute each of my jobs to each of
> the cores of a single node. If my implementation is correct, this is what I
> expect the gnu  parallel to do:
>
> At core 1 of node 1:
>
> "program.sh 1    1"  ought to run
>
> At core 2 of node 1:
>
> "program.sh  1     2"  ought to run

You are trying to do something that GNU Parallel is not built for:
Forcing a given program to be run on a specific core on a specific
node. You need to look at 'taskset' to do that. It is unclear why you
need a specific job to be run on a specific core and why another core
is not just as good.

What GNU Parallel excels at is taking a bunch of tasks and run a
number of tasks on one or more computers. So what GNU Parallel _can_
do is to detect the number of cores on the machine and run one job per
cpu core.

In your case it would be something like:

  cat  $file_name | parallel --sshlogin node_1_server_address --colsep
'  '   program.sh {1} {2}

If your arguments really are 1 and 1..12, then you do not need a filename:

  parallel --sshlogin node_1_server_address program.sh {1} {2} ::: 1 ::: {1..12}

If you have not already please spend an hour walking through the
tutorial: http://www.gnu.org/software/parallel/parallel_tutorial.html
You will have a much firmer grip of how GNU Parallel works after
walking through it.

The examples in the man-page will also help you understand how to use
GNU Parallel.


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]