[gridengine users] Q: how to set up a job in which multiple executables run simultaneously? Also: Open MP environment variables honored?

Rayson Ho rayrayson at gmail.com
Fri Oct 26 18:00:54 UTC 2012


On Fri, Oct 26, 2012 at 1:55 PM, Wagner, Justin <jwagner at ciena.com> wrote:
> while (!foo_done_file){};
>
> while (!bar_done_file){};
>
> while (!baz_done_file){};

Or use bash's built-in wait, like this:

http://stackoverflow.com/questions/356100/how-to-wait-in-bash-for-several-subprocesses-to-finish-and-return-exit-code-0

Rayson




>
>
>
>
>
> Justin
>
>
>
> From: users-bounces at gridengine.org [mailto:users-bounces at gridengine.org] On
> Behalf Of Metzler, Chris
> Sent: Friday, October 26, 2012 10:37 AM
> To: 'users at gridengine.org'
> Subject: [gridengine users] Q: how to set up a job in which multiple
> executables run simultaneously? Also: Open MP environment variables honored?
>
>
>
>
>
> Hi.  I'm new to submitting jobs through Grid Engine, and have skimmed users
> guides, googled, etc., without figuring this out and could use some advice.
>
> #1:  I need to be able to submit jobs that will start up several distinct
> executables that need to run at the same time. If I was doing my work in an
> interactive shell, I'd just do something like this:
>
> $ foo &
> $ bar &
> $ baz &
>
> . . .and so they'd all start around the same time, run in the background,
> and complete around the same time. The executables talk to each other
> through the output files, and I don't need to do any more than that.
>
> But from what I've read in users guides, I shouldn't invoke processes in the
> background in jobs submitted to GE; and that makes sense to me, since then
> the interpreter would reach the bottom of the script while the executables
> are still running. But submitting a script with contents of:
>
> foo
> bar
> baz
>
> won't work, because those are run sequentially.
>
> The only thing I can think of to do is to separate each executable out into
> its own job submitted to the queue; but then I need to guarantee that they
> start executing at the same time, rather than two starting while one sits in
> a pending state.
>
>
>
> #2:  Normally, when running these interactively, I’d set them up for Open MP
> use doing something like this:
>
>
>
> $ setenv OMP_NUM_THREADS 1
>
> $ foo &
>
> $ setenv OMP_NUM_THREADS 2
>
> $ bar &
>
> $ baz &
>
> etc.
>
>
>
> Will instructions like that be honored within a script submitted to the
> scheduler?
>
>
>
> Any advice on these would be very helpful. Thanks much.
>
>
>
> -c
>
>
>
>
> _______________________________________________
> users mailing list
> users at gridengine.org
> https://gridengine.org/mailman/listinfo/users
>




More information about the users mailing list