Neat trick.  :)

I don't think that the issue you're seeing has anything to do with VGL 
per se.  I think it's how your X server is configured.  $gpu in your 
examples below refers to an X screen number.  Typically, in a VirtualGL 
multi-GPU environment, one would configure the X server such that each 
GPU occupies a separate X screen (0.0, 0.1, 0.2, etc.)  Then you can 
address a specific GPU by setting VGL_DISPLAY to :0.0, :0.1, etc. 
Others, however, prefer to run a completely new X server instance on 
each GPU, in which case they would be addressed as :0.0, :1.0, etc.  In 
your case, I think one of your X servers is configured differently than 
the other, which is why the screen numbers are different.

Ultimately, I don't think it's going to be valid to assume that the 
DISPLAY-to-GPU mapping is constant, so perhaps the best approach would 
be to introduce either a new environment variable (VGL_GPUS, for 
instance) or a config file that defines a list of X display to GPU 
mappings.  If this environment variable/config setting is defined, then 
vglrun could assume that you want to use load balancing, and it could 
call nvidia-smi (or an equivalent on ATI, if such exists) to find the 
least-loaded GPU.

I would be interested in integrating this into the project.


On 9/18/13 3:13 PM, Rafael Guimaraes wrote:
> Hi folks,
>
> I have built a script that checks which GPU is currently being less used
> (through nvidia-smi) and calls vglrun with this information so that my
> processes are balanced among the available GPUs.
>
> The problem is that I use the same script in two different machines
> (both with 4 GPUs) and they map the GPUs differently. In the first
> computer, I can run vlgrun -d :0.$gpu , where $gpu may vary from 1 to 4
> (equivalent to GPU 0 to 3 as reported by nvidia-smi). However, in the
> second computer, $gpu may vary from 0 to 3 (equivalent to GPU 0 to 3 as
> reported by nvidia-smi).
>
> Is there a way to address GPUs by vglrun in the same way in both
> computers? If not, is there a way for my script to find if vglrun
> addresses GPUs from 0 to 3 or from 1 to 4?
>
> Thanks in advance!
>
> Cheers,
>
> Rafael GuimarĂ£es

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users

Reply via email to