Saturday, April 26, 2008

Come on Linux, seriously?

I'm at a point in my career where I'm starting to publish papers with my advisor and potentially with authors I've never met face to face. I see this as the stepping stone to my future as an independent researcher. To promote simplicity in my career I want to build a foundation for consistency in my work, but in the spirit of collaboration I must be versed in the applications others prefer. By this, I'm referring to the platforms used to produce work (windows, linux, office, latex, matlab, c++,…).

Linux and Latex are two pieces of the platform puzzle I want to love, but simply cannot. The idea of open source goes right along with my thoughts on free information for all so I was eager to try these out. The newest Ubuntu distribution came out last week and I immediately got it, installed it, and was abhorred by it! I've read numerous articles on Digg and Slashdot about how Linux is making a serious run at the mainstream operating system race. This distribution is supposed to be as close as any to being a user friendly, efficient, and stable competitor to Windows and Mac. Needless to say I hate the fact that I am Microsoft dependent. Between Windows, Office, and all the other scientific software that is developed to run with them, I would be hard pressed to adopt another platform. Never the less, with all the options in Linux and the open source community, not to mention Vmware and Wine for my cannot-live-without Windows programs, I thought I could find a way.

I'd read an article that suggested Matlab run on Linux could run 25% faster than on Windows for a particular eigensolver code. My PhD will include a massive code for computing eigenvalues – one that I dread writing because debugging an eigensolver that could run for days can only be described as masochistic. My school has copies of Matlab and Mathematica for Linux so I was all set. I was going to get Ubuntu up and running, install Matlab and Mathematica and given those worked fine, get a hold of Vmware to continue my work in Word and Mathtype inside Linux. I installed Ubuntu. Beautiful! They really have the install process streamlined. Wubi comes with it so you can install a simulated dual boot. The partition manager makes it easy to set up a real dual boot. Beautiful! So now we're up and running. It starts much faster than Vista. Everything works right out of the gate. No updates, no drivers…it just works. Now it was time to install some programs. The synaptic manager and the general add/remove functionality is fantastic! I found the programs I wanted, checked the box, and boom, done! Beautiful! Then it was time to install Matlab and Mathematica. Mathematica first. I had .iso of both so I copied them from a SSH server set up in Vista. Easy as pie! It was apparent that Linux's network functionality both local and through SSH were far superior to windows by way of speed and ease of access. I need to mount the iso. I had used the add/remove programs manager to download gmount. I got it figured out fairly easily. Then I stared blankly at the desktop for a bit hoping, but not expecting something to happen. I had a little experience with Ubuntu before so I knew it hadn't had autorun functionality. That was one thing I saw as a logical advancement for this version of Ubuntu and was disappointed when it wasn't there. Another nice addition would be "automount" when an .iso is on the desktop or a disk is in the drive. Anyway, so how in the hell do you install this thing? I read for awhile trying to figure out the commands in the "user friendly" Ubuntu forums. The problem there is that MOST of the help is written to explain these things to Linux literate people. If I was that good I sure as hell wouldn't be looking in a forum for help on copying a file! It really comes across as snobbish. I imagine a socially deficient character sitting at a computer scoffing at the ignorance of the posters and purposefully leaving steps out! If we met face to face I bet you wouldn't be so f*#king smug! Mmm, serenity now! Anyway, not much help there, so I used the Force (Google) and sort of figured it out. In the terminal I had to point to the desktop by typing commands manually. FYI capitalization counts! From there I had to open the mount folder because I never found the command to explore the iso/cd. Then I had to point to the installer folder. Then I typed "install" and bingo! NOTHING HAPPENED! I tried /install, nothing. I tried the entire path, NOTHING! Finally somewhere on some website I saw a command "./install". I thought it was a typo where the period ended the last sentence and "/install" was the command starting the next sentence. It worked. Basically I got lucky.

Everything looks good until the install comes back with an error: "couldn't validate something." Back to the Force. I only got a working answer when I again got lucky and copied the correct combination of words into Google. It said I needed libraries installed. Sudo apt-get install <some obscure combination of abbreviated words>. That got it working fine. The rest was easy. Not too bad. Probably 2 hours from format to a working Mathematica. In Vista, it would have been slower to install the OS but faster (and easier) for Mathematica.

Now it's time for Matlab. This one had so many errors I didn't understand it was ridiculous! Instead of the Windows system; basically double click the install.exe and blindly click next until its finished, I had to make a directory. First problem, what are the commands and where do I put it. There is no intuitive name for the equivalent of "Program Files." A little searching and I figure out where and how to make my directory and get the licensing set up. From that point it was a downward spiral of fighting permissions, setting the target, and actually installing the program. I finally got it installed, but in my previous attempts I messed up the install and the workbench was incorrectly displayed. Of course I have no idea how to uninstall it in Linux so I formatted the whole thing and started over!

Round two was easier and everything was up and running. Time to test. I ran 10,000 points to generate a Poincare map for Duffing's equation…and waited…and waited…and waited! 36 seconds. I've got an identical machine on a kvm running Vista and the same version of Matlab so I switched over and ran it there. 26 seconds! Unbelievable! That translates to hours of wasted time waiting for a code to finish over the course of days or weeks. All this time spent and Vista still ran faster! Total time 8:30am-7:30pm – 1 hour for lunch. Total results=0. The next day I went back to Vista.

I'll make a brief comment on LaTex as well. I took a short course to see if it is better. I learned quickly that my method of derivation and writing cannot be done without a truetype environment. I messed around with LYX which is a graphical interface for LaTex and if I had to, I could use it. Beside the nongraphical interface, the commands are unintuitive. There is no point in me learning a whole new typesetting language (because that's what it is, a programming language) when I have nearly got all the bugs worked out of a much more powerful Microsoft Word.

Apt-get is an incredible tool IF you know the exact syntax of the program you want to install. The Synaptic program manager is an incredible tool IF the program you want is listed and clearly defined. Both are only worthwhile IF the program is hosted on their database. No automount, no installers, no computational speed, no customer! My hopes of becoming Microsoft free were dashed out for another 6 months.

This article is more oriented toward the problems a normal user might face.

And now a deep thought,

-I'm sure all the Linux Fanboys will have fun with their 700mb web browser.

P.S. Firefox 3 beta! Come on. There's not enough plug-in support yet!


E.Jacob said...

I liked your initial title better

42gems said...

wow, thats a really long rant dude.

i believe ubuntu is so supposed automount drives, not sure about ISOs though.

its unfortunate that you really needed to use non-open source programs like matlab and mathematica. companies that release cloased-source programs for linux have to make the programs availabe for all linux distros, which ends being a pain because different distros use different binary packages. debian and its derivatives like ubuntu, use deb packages. but wolfram and their ilk can't be bothered to release packages for all the linux distros so they just put out a single basic binary and let the users figure the rest out.

i haven't installed matlab on my linux parition because my school doesn't offer a free copy of it, but i have octave installed which you can get easily enough using synaptic. i think octave and matlab have some differences, but for my purposes octave is enough. although from what i've read, it looks like octave won't work for you.

Josh said...

I really appreciate your feedback. I completely understand and agree with what you've said.

I'm afraid that until Linux becomes a serious competitor in the OS market we will continue to see user-friendly functionality be an afterthought. Programs like Mathematica end up being an invaluable tool in terms of productivity when calculations can be quickly and accurately verified. It also given me insight and guidance into realms of specialized mathematics I end up learning and using in my work. I’ve tried open source competitors and found them wanting severely. Octave is a terrific program. I tried to adopt it as my main, multipurpose programming language, but as you said it doesn’t work well enough for me to adopt it completely. I’m also under the impression that for sophisticated programs it lacks in computational speed compared to Matlab…which lacks severely to C, C++, Fortran or any other non-mathematics oriented language. Unfortunately, many of my Matlab codes were not easily migrated so I have little firsthand comparison experience.

I’m still hoping that Linux will be the savior of us all. I’ve got the new Fedora 9 in hopes it alleviates some of the frustration I experienced with Ubuntu. I expect some improvement, but not a viable alternative to Windows.