Hi guys,
There's a long time, I did a script to achieve that (before the 273.x
drivers from memory). On any machine, if you want your gpu0 corresponding
to your :0.0 screen, it's your job to configure (through nvidia-xconfig for
example) the number of the X display.
So just for example, here is the content of a xorg.conf with 2 virtual
screens running on 2 graphics cards :
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 680"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "ConnectedMonitor" "DFP"
SubSection "Display"
Virtual 1280 1024
Depth 24
EndSubSection
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 680"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "ConnectedMonitor" "DFP"
SubSection "Display"
Virtual 1280 1024
Depth 24
EndSubSection
EndSection
With that, you have :0.0 and :0.1 availables.
Then you can use your current script with value from 0 on every machines.
Personnaly, I use only Geforce cards, after 273.x (or maybe 173.x ? don't
remember) nvidia lock the access to the GPU utilization in nvidia-smi,
giving access to this feature to quadro cards only. So now I can choose the
card randomly, or but checking the amount of graphic card's RAM currently
in use.
Hope this helps.
On Wed, Sep 18, 2013 at 10:52 PM, DRC <dcomman...@users.sourceforge.net>wrote:
> 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
>
------------------------------------------------------------------------------
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