Ask Slashdot: Can Linux Run a GPU-Computing Application Written For Windows?
dryriver writes:
I have been told that Linux can run Windows software using Wine or perhaps a VM. What happens if that Windows software is a GPU-computing application -- accessing the GPU through HLSL/GLSL/CUDA/OpenCL or similar interfaces?
Can Wine or other solutions run that software at a decent speed under Linux? Or is GPU-computing software written for the Windows platform unsuitable for use -- emulated or otherwise -- under Linux?
This sounds like one of those cases where there's a theoretical answer and then your own real-world experiences. So leave your best answers in the comments. Can Linux run a GPU-computing application that's written for Windows?
Maybe.
Just cruising through this digital world at 33 1/3 rpm...
PCI express passthrough is the term to search for.
A good writeup:
https://www.reddit.com/r/pcmasterrace/comments/2z0evz/gpu_passthrough_or_how_to_play_any_game_at_near/
It used to be there was no Linux Folding@Home application. But there was a way to run the Windows CUDA application on Linux, and I did for a couple of years.
Here's a guide for that: http://www.overclockers.com/de...
(T>t && O(n)--) == sqrt(666)
Even if it runs under something like WINE, how fast does it run?
I would assume that if you need something that uses CUDA, performance is important.
The real "Libtards" are the Libertarians!
Run Windows. I never have used wine. Linus himself said if you need to run win32 then run host OS. Linus used XP for PowerPoint.
How would you feel if I asked you if I could run Ubuntu on Windows 10? I could but why? It's a geek toy. At work your job is to put ideology aside and to make your bosses happy by keeping it up.
Will running Windows Server really be that horrible for 1 server?
But if I did have to run Linux I could try KMS with GPU pass thru but you risk downsides on now 2 platforms and bugs for now KMs, Linux, and windows and a performance hit. That won't guarantee higher uptime.
http://saveie6.com/
Just like I wouldn't go the other way and do a Linux computation program on Windows. Thing is if you are talking about something that needs the GPU for acceleration, you are talking about something doing some heavy hitting math. The reason you bother with a GPU is because whatever you are doing is too slow just running on a CPU. Otherwise why bother? It is more work and restricts systems that can run it.
Well any emulation/virtualization/whatever will slow things down. How much varies, but even in the best case scenario, there's a performance penalty. Why pay that? Just run it in the OS it wants to run in on the iron. That'll get you the best performance.
Not only that but generally speaking technical and engineering software is not the best written, most stable stuff in the world. You are likely to find it quirky even when you run it in the environment it wants. Introducing more variables is just going to make problems more likely and your life more difficult.
Best thing is to simply try it. Doom 3 works with Vulkan. You may also see into commercial products based on Wine. Such exist. I heard a few apps work with OpenCL. Best thing would be to try. I assume it's not server cluster we are talking about.
You can absolutely run it if a VM is an accepted solution. The things you have to do:
1. Use a processor that supports virtualization
2. Have a second GPU for the host (in a server, usually the Melanox GPU).
3. Use a hypervisor that can pass through PCI ports and pass in the nVidia Cuda enabled GPU (like an nVidia Tesla M60 card)
4. Run your application in the VM
The real question is: why does the underlying system have to be Linux? Do you want to Hypervise it for HA? Without knowing the why's behind your request, it's hard to say whether you can or not. Is it absolutely possible? Yes. Is it the best approach? Maybe. Is it the most efficient approach for your high-spec'd application? Probably not.
My recent appempt to run the Windows software for High Fidelity in a Virtual Box on a linux machine with a good Nvidia card met with frustration when I chould not get the program to see the card from within the box.
I don't think a good hypervisor gives you the same drawback. You should get near-real performance on pass through devices now.
You are absolutely right that you can do this but you may need to patch the hypervisor if you use a standard, retail nVidia card. Nvidia's drivers for "gamer" GPUs check to see whether they are running in a virtual environment and then shutdown if they think they are. There is a patch for KVM which hides the virtual environment from the nVidia driver so that it will run.
Alternatively if you need double precision or don't mind spending 5-10 times the cost of a gamer card you can purchase a Tesla GPU since the nVidia driver for these works fine in a VM without patching.
The answer is yes and there's no need for a second GPU
Install Windows in VirtualBox or VMware, Configure the virtual machine for 3D and let it rip.
As for Wine, Wine is always win-some-lose-some. If the application will run under Wine, then it should have access to most of the Windows APIs of interest.
Finally, for CUDA, you would either need a second card or you would need an NVidia Grid solution which installs NVidia on the hypervisor and then again on the VM. It's insanely expensive.
Given nearly all the worlds fastest computers are Linux-based CUDA machines, you're full of it.