Maximizing Your Mac for Physics: Tips and Tools to Get Started

In summary: Yeah, that's a bit of a pain.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.
  • #1
EJC
42
4
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?
 
Computer science news on Phys.org
  • #2
It's my experience that Linux-based systems tend to be favoured in physics departments.
 
  • Like
Likes RooksAndBooks, bcrowell, Dr. Courtney and 1 other person
  • #3
Choppy said:
It's my experience that Linux-based systems tend to be favoured in physics departments.

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.
 
  • #4
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.

https://en.wikipedia.org/wiki/Hunt_the_Wumpus
 
  • #5
http://www.kubuntu.org/

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.
 
  • #6
Dr. Courtney said:
http://www.kubuntu.org/

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.

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.
 
  • #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.
 
  • #8
@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.
Dr. Courtney said:
I'm not a fan of Windows, and if not necessary for certain compatabilities, I would only run linux.
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++...
 
  • #9
EJC said:
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.

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.
 
  • #10
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?
 
  • #11
EJC said:
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?

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.
 
  • #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.
 
  • Like
Likes Dr. Courtney and EJC
  • #13
newjerseyrunner said:
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

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?
 
  • #14
My mistake about parallel booting, "Parallels" is a product that let's 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.
 
  • Like
Likes EJC
  • #15
newjerseyrunner said:
My mistake about parallel booting, "Parallels" is a product that let's 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.
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.
 
  • #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.
 
  • #17
Dr. Courtney said:
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.
Right, that makes sense. Should I end up going with a Mac, I am leaning towards dual booting already.
 
  • #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.
 
  • #19
Dr. Courtney said:
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.
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.
 
  • #20
newjerseyrunner said:
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.
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.
 
  • #21
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.
 
  • #22
Congrats!

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 into 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 .
 
  • Like
Likes EJC
  • #23
D H said:
Congrats!

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 into 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 .
Thanks for the advice!
 

Related to Maximizing Your Mac for Physics: Tips and Tools to Get Started

1. What are the main differences between Mac and Windows for physics research?

One of the main differences is the operating system. Macs run on macOS, while Windows computers run on the Windows operating system. This can affect the availability of certain software programs and the compatibility with specific hardware.

2. Which operating system is more commonly used in the field of physics?

There is no clear answer to this question, as both Mac and Windows computers are used in physics research. It often depends on personal preference and the specific needs of the researcher.

3. Are there significant differences in performance between Mac and Windows computers for data analysis?

In terms of hardware, both Mac and Windows computers have similar capabilities for data analysis. However, the software used for data analysis may vary between the two operating systems, so it is important to consider the specific programs you will need for your research.

4. Can Mac and Windows computers be used together for collaborative research in physics?

Yes, Mac and Windows computers can be used together for collaborative research. Many software programs are now cross-platform, meaning they can be used on both operating systems. Additionally, there are file compatibility options available for transferring data between Mac and Windows computers.

5. Is one operating system better for certain areas of physics research?

Not necessarily. Both Mac and Windows computers can be used for all areas of physics research. However, some specific software programs may only be available on one operating system, so it is important to research the specific needs of your field of study.

Similar threads

  • Computing and Technology
Replies
4
Views
2K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
Replies
14
Views
6K
  • Computing and Technology
Replies
16
Views
85K
Replies
3
Views
578
  • Computing and Technology
Replies
2
Views
2K
  • Computing and Technology
Replies
6
Views
2K
  • Computing and Technology
Replies
4
Views
2K
  • Computing and Technology
Replies
12
Views
4K
  • Computing and Technology
Replies
7
Views
6K
Back
Top