Am 26.10.2012 um 19:54 schrieb Reuti:

> Hi,
> 
> Am 26.10.2012 um 19:37 schrieb Metzler, Chris:
> 
>> #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;
> 
> Yes, as it might oversubscribe your granted slot count, or some scripts try 
> to jump out of the process tree and might get out of SGE's control (these 
> could be caught the additional group id though). But there are exceptions of 
> course.
> 
> a) define a PE with "allocation_rule $pe_slots"
> 
> b) request the overall slot count during the submission with the PE:
> 
> qsub -pe smp 3 foobar.sh # in case you have just 3 serial tasks
> 
> qsub -pe smp 5 foobar.sh # for your example below
> 
> c) Put a` wait` at the end of the script, so that it wait for the completion 
> of all started background processes
> 
> NB: yes, it's good to set OMP_NUM_THREADS  by hand, as sometimes the number 
> of cores found in the executing machine us used as default, hence all threads 
> would use all cores - which is seldom practical.

Ups, meant: ...all processes would use all cores (by their threads)...

-- Reuti


> -- Reuti
> 
> 
>> 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
>> [email protected]
>> https://gridengine.org/mailman/listinfo/users
> 
> 
> _______________________________________________
> users mailing list
> [email protected]
> https://gridengine.org/mailman/listinfo/users
> 


_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to