On 14 December 2011 10:06, Christoph Müller
<[email protected]> wrote:
> Hi William,
>
>> -----Ursprüngliche Nachricht-----
>> Von: [email protected] [mailto:[email protected]] Im Auftrag
>> von William Hay
>> Gesendet: Mittwoch, 14. Dezember 2011 10:09
>> An: Christoph Müller
>> Cc: Reuti; [email protected]
>> Betreff: Re: [gridengine users] Access complex resources from prolog script
>
>
>
>> > I was also thinking about using the device files for enforcing the 
>> > allocation
>> as a second step. However, how do you tell the user program which GPU to
>> use? As I understand the program would have to test all GPUs and the one
>> that is working is then used.
>>
>>
>> This doesn't seem like a problem.  All our GPU code seems to be fairly greedy
>> and quickly grab any GPUs it can.  Testing a couple of /dev files is no great
>> overhead.  If it bothers you write a script to output the allocated GPUs and
>> invoke it via starter_method. Export MYGPUS=$(/usr/local/bin/mygpus).
>> Another possibility would be to create appropriate /dev files in a location
>> determined by job/taskid and try to get the code to use those.
>
> I am tinkering around with starter_method, but I would need to run it as 
> admin user and launch the actual job using su. Is that possible? I found some 
> slides from Sun that indicate that it should be possible, but it does not say 
> how. My shell_start_mode is posix_compliant btw.

Prolog:
ssh as root outside grid engine to all the slave node and run a script
to allocate the GPUs.  Do chown/chgrp as needed and write a file in a
"well known" location recording this allocation.
Starter method:
Read the file written by the prolog and set appropriate environment
variables before execing the job.
Epilog:
Reverse the changes performed by the prolog.

William


.

>
> Thanks for your help,
> Christoph
>
>

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

Reply via email to