Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Emulation (Games) Graphics Linux

Ask Slashdot: Can Linux Run a GPU-Computing Application Written For Windows? 117

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?
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Can Linux Run a GPU-Computing Application Written For Windows?

Comments Filter:
  • Maybe (Score:2, Insightful)

    Maybe.

    • Just try it. How hard could it be?

  • yes (Score:5, Informative)

    by qume ( 68415 ) on Sunday April 02, 2017 @07:56PM (#54161765)

    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/

    • 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/

      Sure answered my question, I have two different Nvidia cards (GTX-570/760) did wonder if they would work together under VT-D (Linux Mint-Cinn), looks like they will. Now it's just a matter of DirectX.

  • It worked for F@H (Score:5, Informative)

    by Ken_g6 ( 775014 ) on Sunday April 02, 2017 @07:57PM (#54161773) Homepage

    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... [overclockers.com]

  • But how fast? (Score:5, Interesting)

    by whoever57 ( 658626 ) on Sunday April 02, 2017 @08:00PM (#54161781) Journal

    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.

    • by Anonymous Coward

      If it is GPU bound, then wine is perfectly fast enough for acting as a 'windows i/o emulation layer' to pump the data to the cards (barring any serious regressions, wine is at worse usually 2-3x as slow as windows, due to the extra API overhead. But in some cases is faster due to filesystem, memory or i/o subsystem, etc.) In that case, so long as the wine API can pass through all the GPU programs needed and pull the results back to the windows apps, it should work exactly the same as on Windows, but with th

      • There's really only a few places where there is real extra API overhead, because mostly, on Windows the API you are calling will eventually result in a series of system calls being made to various parts of the Windows kernel to get stuff done, and on Linux the WINE API will result in just a different series of system calls being made to various parts of the Linux kernel. In most cases the amount of work to be done is the same, it's just that one takes place on Windows and the other Linux.

        The performance
    • by SirSlud ( 67381 )

      WINE is the software. This is asking if you can hit the hardware for a task where the hardware is where your real work is happening.

  • Lots of Linux and crossplatform applications have been using GPU regardless of the OS for a while now. Blender is a good example. Sometimes all it takes is the right drivers. Please tell me you're not trying to run Maya or something like that when you got Blender? :(
    • by Anonymous Coward

      I don't know Maya, but I know enough about Blender to know that's not a skill I'll ever have.

      Type the word "obtuse" on a Dvorak keyboard with all the key caps ripped off, and you'll have a word that begins to describe that interface.

    • by spitzak ( 4019 )

      You can get Maya for Linux

      • But why would you? Blender has been available for Linux since day one (1998) and runs on Python, so anything you do on Linux can be picked back up on someone else's computer regardless of what OS they're running. I doubt the Linux version of Maya (ten years younger) has the same features or fewer bugs than Blender. They haven't made a 32-bit version since 2008. Meanwhile, Blender for Linux still has 32-bit builds. It's also free and open source. Cycles rendering is amazing too and whatever the 64-bit versio
        • by spitzak ( 4019 )

          I was just trying to say that if you want to run Maya you don't need Windows emulation.

          • I didn't mean to make it sound like I was arguing, but I just wanted to cover my bases just in case someone else tried to start something. Also, I need to add for anyone reading this that Blender also has a built-in game engine.
    • There are reasons to run Blender in a Windows guest instead of Blender in the Linux/MacOS host, not the least of which is add-ons. A number of Blender add-ons only run on Windows, e.g.: Bos FBX Importer/Exporter requires 64-bit Windows due to the Autodesk FBX library dependency.
    • Please tell me you're not trying to run Blender when you got Maya? :(

      Blender vs Maya = Etch-a-Sketch vs Picasso

  • Who cares (Score:3, Insightful)

    by Billly Gates ( 198444 ) on Sunday April 02, 2017 @08:06PM (#54161801) Journal

    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.

    • by g01d4 ( 888748 )

      if I could run Ubuntu on Windows 10

      Maybe it's more like porting Linux apps to Windows using Cygwin. I have both Linux and Cygwin. Cygwin is for applications that are both portable and have need to access files also regularly accessed on the Windows side. Bothering with two operating systems (virtual or real) or cross OS file shares might be more effort than necessary. I rarely boot Linux and don't need to bother setting up file sharing. YMMV.

      • I think he's talking about the new bash subsystem for windows 10. Is it nice for developers to be able to run Apache and Mysql properly? Sure. Is it better than Wamp and those horrible windows Mysql installers? Probably.
    • At work your job is to put ideology aside and to make your bosses happy

      Bosses often don't know tech. Programmers often don't know business. Programmers who just wait for their bosses to tell them how and what to do are crappy employees who make the company lopsided toward the business side. The best employees push for their ideals, but also know when to back down.

      • Will running Windows Server really be that horrible for 1 server?

        It may, it really depends. If you are running a system that must be compliant (PCI, NISPOM/JFAN, FedRAMP, etc..) it absolutely may be horrible. You not only need that 1 Windows server, but all of the supporting infrastructure to make it compliant. That 1 server is now 2 or 3, and you need manpower and time to go with it.

        So if you can run Windows, I agree with GP. Where I work, the vendor would either port or we wouldn't run it.

        • We have to used WIndows at my last job because of compliance. Only Windows has auditing and logging to support what you described. Group Policy can do desktop lockdowns and make things much easy to administer.

          Also the vendor wont support you and the app to the vendor is out of compliance if it does not run on Windows. It is irresponsible to use an OS that is unsupported or do a VM with bugs on 3 platforms (VM, Linux, and Windows) because on Slashdot someone says its sux.

          You must be lucky. Most companies if

          • by s.petry ( 762400 )

            Linux has had auditing and compliance since RH3.0. Today it's called auditd, but started as LAUS. Your ignorance != honesty. I built the first networks outside of a military base certified for classified processing under NISPOM and JFAN/3 standards. At the time I built those networks, Windows could run stand alone only.

            WIndows required more infrastructure and hands on management than Linux even years later when Windows could finally be certified for Network operations in those environments.

    • by Anonymous Coward

      I do.

      If I could run the CAD software I use for work on linux I would literally jump for joy.

    • How would you feel if I asked you if I could run Ubuntu on Windows 10? I could but why?

      Uuuh, you do realize that Microsoft enables Ubuntu to be run in-process in Windows 10? It's called "Windows Subsystem for Linux."

      https://msdn.microsoft.com/en-... [microsoft.com]

      As to "why", it's because lots of open-source tools are designed to only run on Linux, and Microsoft wanted to make those tools available to Windows users too.

    • Re: (Score:2, Funny)

      by Gravis Zero ( 934156 )

      Will running Windows Server really be that horrible for 1 server?

      Yeah, this is clearly coming from someone that has never used it. ;)

    • Linus used XP for PowerPoint.

      Citation needed.

      It's a geek toy.

      Depending on the application, WINE can give almost native performance, where almost means a negligible difference. There is professional software (CAD applications) released with WINE compatibility.

      • by dbIII ( 701233 )

        There is professional software (CAD applications) released with WINE compatibility.

        There's also professional scientific software written in dotnet that is tested against mono so that it can be run on linux. That turns a single licence from a hotseat in front of a MS Windows workstation to something you can run on a noisy and fast server then let the user get to it from their desktop machine via X Windows. No need for a dusty computer in the corner used for an hour a week but a different person each time.

  • by Sycraft-fu ( 314770 ) on Sunday April 02, 2017 @08:18PM (#54161839)

    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.

    • > Just run it in the OS it wants to run in on the iron.

      Sometimes that certainly makes sense. Sometimes that would be really inconvenient and provide no benefit at all.

      > Well any emulation/virtualization/whatever will slow things down. How much varies, but even in the best case scenario, there's a performance penalty.

      That's not true. There is no measurable performance penalty for any application that's waiting on hardware such as the GPU or waiting on an external resource, typically over the network.

  • 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.
  • should you?
  • Just build a new Z-80 SoftCard https://en.wikipedia.org/wiki/... [wikipedia.org]
  • Is Windows better than Linux. I personally don't care and don't harbour a grudge if you use either. Windows offers easy installs and has a wider ( ? ) choice. Windows users just want their application or program to work on their computer instantly.. Linux (outside of Web searches, LibreOffice, and Emails, requires work and sometimes sweat if you are trying to make something work that doesn't. Why am I saying all this? (No! I don't want you to change your Operating System!) But.. If Windows decides to do s
  • There are cross platform libraries that work equally well on Linux and Windows.
    You need to plan for it in advance.
    • There are cross platform libraries that work equally well on Linux and Windows.

      OpenCV isn't one of them and it's not even OpenCV's fault. Try opening a USB-based stereo camera with OpenCV under Linux and you get an error best summarised as "the USB bus doesn't have enough bandwidth to open the device." This is wrong because the same stereo camera devices work just fine with OpenCV under Windows and MacOS.

  • My attempts to run the windows software for High Fidelity in a virtual box on a linux machine with a good Nvidia card were frustrated because the program could not use the video card.
  • Could you build a docker container based on Windows and run it in linux?
    • While it'd be cool if you could do that, I don't believe that it's possible in Docker.

      The docker host needs to run the same OS as what the container was created on.....e.g. only Linux containers run on Linux hosts (although I think MS may be working on changing that) and only Windows containers run on Windows hosts.

  • I'm not 100% sure, but I believe that it would run using docker. Docker I believe uses the same base engine that VirtualBox uses, although from my limited use of this great tool, it runs significantly faster with less drain on resources. I don't believe that it would have any problems with accessing the GPU - at least no more than any other virtualization system, so would be a viable option to consider.

Real programs don't eat cache.

Working...