Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mac vs Windows for physics?

  1. Jul 22, 2015 #1


    User Avatar

    It seems like most of my physics professors use Macs vs Windows based PCs. Any insight into this trend? Why are Macs better for physics, or is that even the case?
  2. jcsd
  3. Jul 22, 2015 #2


    User Avatar
    Science Advisor
    Education Advisor

    It's my experience that Linux-based systems tend to be favoured in physics departments.
  4. Jul 22, 2015 #3


    User Avatar

    Do you know why that is?

    I'm looking at getting a new laptop and am on the fence as to what would be best for me personally. As of right now, I don't use much software that is specific to either OS, so it's tough for me to make a decision. I'm considering dual booting on the Mac as a viable option.
  5. Jul 22, 2015 #4


    User Avatar
    Education Advisor
    Gold Member

    One of the big draws for Linux is cost. Most grad students have not got much money. And the money they do have always has many different demands. Whereas, a grad student's time is often viewed as disposable, often by both the grad student and the physics department. So if it requires spending a couple hundred hours to learn to make a system perform correctly, the typical physics department will prefer to toss their grad-student-indentured-servants at it rather than spend any money on it.

    Also, grad students tend to want to do unusual things with computers. They want to use them for data collection systems and control experiments with them. They want to write little programs to do odd things from see how much is left in the vending machine to sending their sweetie a valentine. If you are prepared to spend the time to get good at Linux then many of these things are easier in Linux than in other systems.

    Also, there is a cultural issue. Lots of other physics types are Linux oriented. So there is some pressure to go-along to get-along. And also, to go-along to be able to borrow software from the guy at the next desk. The guy who has likely done a bunch of similar things to the thing you want to try. And this extends to a sizeable community of people who create various programs.

    But when it all comes down to it, the real draw of Linux is Wumpus.

  6. Jul 22, 2015 #5

    My machine is dual boot with Kubuntu (a linux implementation) and Windows. Some of our laboratory instruments are much easier to talk to through the Windows software provided by the vendors. I'm not a fan of Windows, and if not necessary for certain compatabilities, I would only run linux.
  7. Jul 22, 2015 #6


    User Avatar

    What sort of machine do you use? I've looked at Lenovo Thinkpads as an alternative to a mac, but they're rather, shall I say... industrial? They have good hardware and are priced well though.

    One thing I truly appreciate with Macbooks is their physical shell. They're constructed very well. You can buy Windows or Linux based machines with similar hardware sure, but are often not built as well.

    From a software perspective, what sorts of drawbacks am I running into if I were to switch to Mac vs Windows? Mind you, I am open to the idea of dual booting (or virtual machines if anyone can convince me of that route's superiority, although I've done a fair amount of research on the pros and cons of both and dual booting seems to be better for me personally), but I want to know what specifically Mac and Windows do better or worse than each other from a software point of view, specifically with physics.
  8. Jul 22, 2015 #7
    There are some libraries that just don't work on Window's / Mac that have become pretty standard. POSIX and GSL would be two of the major ones. It's not that the libraries don't work on Windows/OSX, it's just that if 90% of the people writing the testing the libraries use Linux, it's going to be most stable on Linux.

    Cost and setup are another advantage. I don't think there is any real way to quickly launch new OSX / Windows machines easily, where I have scripts that launch and tear down Linux Dockers / VMs in the thousands. A lot of programmers will use one machine (I use a Mac) but often want to use other environments. You can dual boot or ever parallel boot, but that still limits you to the hardware you are on. If I'm on my Mac and I want to test how my multithreaded program works on a machine that only has one processor, I need to launch a VM.
  9. Jul 22, 2015 #8


    User Avatar
    Science Advisor

    @OP: As regards to Windows vs Mac: One advantage of MacOS over Windows is that a lot of scientific software which is primarily targeted at linux/unix machines can be made to work on MacOS with reasonable effort, since MacOS is based on a BSD subsystem.

    The main problem here is that much academic software is either "research grade" or at best semi-commercial in nature, and thus few people spend the time and effort needed to port their software to other operating systems and make it work well there. This lead to a clustering of some classes of simulation and numerical software in the linux world.

    Funnily, for me it is exactly the other way around. I need to run linux for a bunch of programs, but if I had the choice, I would certainly not be dealing with gdb instead of Visual C++...
  10. Jul 22, 2015 #9
    I am running a Thinkpad. It's not as thin and light as some, but it works well. I travel a lot for various consulting projects and it works well.
  11. Jul 23, 2015 #10


    User Avatar

    What physics related things will I not be able to do with a Mac?

    What physics related things will I not be able to do with a Windows based PC?
  12. Jul 23, 2015 #11
    An overly broad question deserves an overly broad answer.

    With a Mac, you can't run software unavailable for a Mac.

    With a Windows based PC, you can't run software unavailable for a PC.

    In general, it's not a matter of "can't" it's a matter of some tasks requiring more expense, time, and fiddling.
  13. Jul 23, 2015 #12
    Again, it depends on what you are doing. Mathematica/Matlab/Fortran will work on both equally well, GNU Scientific Library will work best on Linux. If you are writing software, Linux has something that nobody else does: Valgrind. Visual Studio and XCode's Instruments perform similar functions, but in my opinion nothing compares to Valgrind.

    Here are the options you have

    On a Mac
    OSX - Native
    Windows - You can boot to Windows, you can parallel boot Windows and OSX, or you can boot it in a VM (these options require you to pay for Windows), you can also run windows programs directly in OSX with Wineskin
    Linux - You can boot to Linux, or boot it in a VM

    On a Windows PC
    OSX - You have no way to run OSX or it's programs
    Windows - Native
    Linux - You can boot to Linux, or you can boot a VM

    On a Linux PC
    OSX - You have no way to run OSX or it's programs
    Windows - You can boot to Windows, or you can boot it in a VM (both require you pay for Windows), you can also run windows programs directly with Wine
    Linux - Native

    I recommend a Mac simply because it gives you all three options and none of the other combos do, but there is very little on OSX that you can't get on Windows/Linux.

    There are reasons to pick one over the other, servers use Linux for security, businesses use Windows for compatibility, for most users it really doesn't make that much of a difference, and there are plenty of servers running Windows and businesses using Macs, and they function just fine. Since most of the programs written for both are written in languages like C++ and use standard libraries, programs are often available on multiple platforms.
  14. Jul 23, 2015 #13


    User Avatar

    Thanks for the detailed response. You reference parallel booting. What does that entail and what pros and cons does it include? I have read a lot about dual booting and VM's, but haven't heard of parallel booting (unless it is another way to say 'dual boot').

    Also, what is the difference between Wineskin and a VM? I understand a VM emulates a Windows environment, but how does Wineskin work?
  15. Jul 23, 2015 #14
    My mistake about parallel booting, "Parallels" is a product that lets you run Windows programs on OSX, it's basically Wineskin, but not free.

    A VM emulates physical hardware. To the Windows system, it believes that it's running on a completely different machine: different IP, different hard drive, different MAC address. Windows is actually running.

    Wineskin just emulates the windows interrupts. Most of what a program does is agnostic of the operating system, it's mostly the hardware instructions, which are the same on for a mac and PC. Things like allocating resources, displaying windows... that requires the OS, or something pretending to be the OS. Wineskin basically pretends to be Windows, which is why it works, but isn't flawless, it can't do everything windows can, but the programs that run on it, share resources with OSX.
  16. Jul 23, 2015 #15


    User Avatar

    Do you have any first hand experience with any of the aforementioned ways of running different OS's on a Mac? Any preference? I understand it is very dependent on what the user plans to do, but how does Wineskin stack up against VM's for example? It sounds like it wouldn't get bogged down as much as VM's tend to.
  17. Jul 23, 2015 #16
    For physicists who need their PC to interface with various lab instrumentation, be aware that one usually needs to boot an operating system in native mode rather than use emulation in a different operating system.

    There is much less fiddling to get talking to instruments in the native OS in which the drivers are written compared with any emulation environment.
  18. Jul 23, 2015 #17


    User Avatar

    Right, that makes sense. Should I end up going with a Mac, I am leaning towards dual booting already.
  19. Jul 23, 2015 #18
    I have a Mac and I'm a professional software engineer, I use a Mac for almost everything. I do all of my development on my Mac, all of my word processing, as well as personal browsing things. I have Wineskin mostly for testing that things I write for the web work correctly in Internet Explorer, it's pretty easy to use, you just open Wineskin, tell it which windows program you want to create a wrapper for and it'll wrap it up and give you an Icon that you can click on to launch like any other OSX program. It's buggy so I wouldn't use it for anything critical. I launch VMs for Linux all the time, I have scripts that install them. During any given workday I probably launch and destroy a dozen Linux VMs, VirtualBox makes it very easy, I mostly use them as web servers or work horses if I want to isolate something.
  20. Jul 23, 2015 #19
    You can configure your virtual machine server to patch any sockets to your virtual machine. The only thing you have to check is that your adapter is properly bridged and that you give your particular VM high priority. If you have multiple VMs running or even just one but something running on your native environment, your VM may hiccup. The data stream will be buffered, so you won't lose any information, but it may not come in as promptly as you want. Connecting to anything is always better on native hardware. I don't think there is any instruments that should require physical hardware, from inside, they should have no way to know if they are running natively or virtually, but it may work better.

    Because of this, Mac would still be best because you are able to boot all three OSs in native hardware.
  21. Aug 6, 2015 #20

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    On Windows there's always Cygwin. POSIX and GSL are parts of the Cygwin distribution.

    With regard to Macs it's even easier. OS X is a UNIX operating system. (A certified UNIX operating system for that matter. Name one Linux distro that can make that claim.) OS X is fully POSIX compliant and is POSIX certified. Linux on the other hand is "mostly" POSIX compliant, and only a small handful of Linux distros are POSIX certified. Installing GSL on a Mac is easy. For example, brew install gsl if you use Homebrew, port install gsl if you use MacPorts.
  22. Aug 6, 2015 #21


    User Avatar

    I should update this by letting you all know that I ended up going with a 2015 15" Macbook Pro w/ Retina 16GB RAM 2.2Ghz quad core i7 and Intel Iris Pro Graphics. It should be arriving soon.
  23. Aug 6, 2015 #22

    D H

    User Avatar
    Staff Emeritus
    Science Advisor


    Some advice, you may not want to follow all of it.

    1. Enable full disk encryption right off the bat if there's any chance you will have confidential information on your computer, (e.g., bank accounts, passwords, work you want or need to keep out of the wrong hands).

    2. Spend a few extra bucks ($50 will get you a nice terabyte drive nowadays) and buy a backup device. Enable Time Machine, and use it. All you have to do is plug the device in to your computer. Backups are done automatically.

    3. Download and install homebrew, MacPorts, or fink on your machine. Right now, I like homebrew best. That's personal preference, but you will absolutely need at least one of those tools.

    4. Next, use that tool to download tools you need. For example, XQuartz to give you X Windows, GSL for the GNU Scientific Library, and a host of other free and open stuff.

    5. Do not use any of those tools to install LaTeX. Get that from http://www.tug.org/mactex .
  24. Aug 6, 2015 #23


    User Avatar

    Thanks for the advice!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook