Archive for the ‘Mac OS X’ Category
On a Linux machine with a normal install of Mathematica you can usually get access to a command line version of Mathematica by typing
math
at the command line. Command line Mathematica is useful for situations where you want to do batch processing, perhaps as part of a Condor pool or something, but I’ll not write about that until another time.
On a Mac, however, a standard install of Mathematica doesn’t give you a math command so you have to create it yourself. Add the following line to your system’s /etc/bashrc file.
alias math="/Applications/Mathematica.app/Contents/MacOS/MathKernel"
Now, when you type math at the command prompt it will behave just like a Linux system which is sometimes useful.
I recently helped someone install the new 64bit beta version of MATLAB 2009a on a dual quad core Mac pro and so far he seems very pleased with it. The 32bit version simply didn’t cut it because he needed to be able to access huge amounts of memory. More and more researchers at my University seem to be choosing Mac Pros over other platforms and yet it seems that the MATLAB experience on them is far from perfect (according to this link at least).
People seem to complain that its slow compared with other operating systems on comparable hardware along with a clunky user interface since it uses X11 rather than Cocoa.
I’ll lay my cards on the table – I’m not a major Mac fan – but when so many people, who’s judgement I respect, choose them over other platforms then I sit up, take notice and try to understand. Does anyone reading this have experience with MATLAB on OS X – favourable or otherwise?
I’ve just discovered a blog bost where the author was installing Octave on a Mac. Looks hard!
I compare it with Ubuntu’s installation method for Octave along with the symbolic package:
sudo apt-get install octave octave-symbolic
and wonder what is going wrong for it on Macs. Insights anyone?
I recently installed MATLAB 2009a on a Mac running Mac OS 10.5.6 and, although the installation seemed to go fine, MATLAB wouldn’t start. The error message I received (copied from the console output) was
02/04/2009 16:19:42 [0x0-0x2d32d3].com.mathworks.StartMATLAB[36443] dyld: Library not loaded: /usr/X11R6/lib/libXmu.6.dylib
02/04/2009 16:19:42 [0x0-0x2d32d3].com.mathworks.StartMATLAB[36443] Referenced from: /Applications/MATLAB_R2009a.app/sys/os/maci/libXm.3.dylib
02/04/2009 16:19:42 [0x0-0x2d32d3].com.mathworks.StartMATLAB[36443] Reason: image not found
Now I don’t know very much about Macs and I tend to think of Mac OS X as a closed-source version of Linux with pretty bits so there may be a much better way of fixing this than what you are about to read but it did the job for me. Your mileage may vary.
Firing up a terminal I had a look to see if the offending file was anywhere on the machine by typing
locate libXmu.6.dylib
Sure enough I had it in /usr/X11/lib but MATLAB was looking for it in /usr/X11R6/lib so I created a symbolic link as follows
sudo ln -s /usr/X11 /usr/X11R6
Tried MATLAB again and it worked perfectly. Let me know if this works for you or if you are a Mac expert and you know of a better way.
Someone came to visit me today with a MATLAB mex problem and, among other things, I needed to install gcc for them. Now on a Linux machine this would have been trivial. Something like
yum install gcc
or
apt-get install gcc
would do the trick, depending on which flavour of Linux you are using. One command, a quick download and you’re done. Couldn’t be simpler.
I am as green as grass when it comes to Mac usage and so I assumed that there would be some Mac equivalent to these commands but it seems that this is not the case (please please correct me if I am wrong). As far as I can tell, one needs to install something called Xcode in order to get gcc which is 1 Gigabyte in size. You heard me right – 1GB….for gcc! Of course it isn’t just gcc taking up that 1GB – you get lots of other gubbins too – but I don’t want all of the other gubbins. I just want gcc.

But the size isn’t the worst bit. It turns out that you have to go through a registration process in order to get your hands on XCode – giving Apple information such as your email address, home address, what area you work in, what you are going to use XCode for etc etc
All this to get hold of one of the most fundamental open-source applications there is. There has to be a better way. If anyone can enlighten me as to what that better way might be I would be very grateful.
