Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 1998 12:06:59 -0700 (PDT)
From:      Tom Bartol <bartol@salk.edu>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        Suttipan Limanond <limanond@enws626.eas.asu.edu>, freebsd-emulation@FreeBSD.ORG
Subject:   Re: matlab for linux and freebsd 
Message-ID:  <Pine.BSF.3.96.980430094412.18486C-100000@cole.salk.edu>
In-Reply-To: <13764.893918661@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Some history on my dealings with the Mathworks:

Our lab was one of the fundamental sites in the Linux community
responsible for convincing Matlab to come out with a Linux version back in
1993.  We still have a copy of a CD-R burned by the Mathworks with the
first alpha-version of Matlab 4 for Linux released to alpha testers. 

Time went by, and as our use of Matlab for larger and larger projects
progressed we began to unmask some serious performance problems inherent
in Linux -- it swaps like a pig (to put it bluntly) and the NFS
performance is 2-5 times slower that the other "Real UNIX
Workstations(tm)" we had in our lab at the time.  There were some in our
lab who said "Oh, that because the Intel architecture just can't perform
like a 'Real UNIX Workstation'".  I, for one, wasn't going to take such a
statement on blind faith alone so I set out to do some objective tests.  I
thought "if there is another UNIX-like OS that I could run on the Intel
platform and could get to perform as well as a 'Real UNIX Workstation'
then this existence proof would clearly show that an Intel machine is a
viable alternative to more expensive brands." 

I did some research and discovered the *BSD bunch (just recenlty freed
from legal encumberances) and quickly determined that FreeBSD would be a
good *BSD to try out first.  In the middle of my research and testing
FreeBSD 2.1.0 was released (Nov, 1995) so I grabbed that immediately and
began the definitive tests over Christmas break, 1995.  The entire lab was
extremely impressed with the results and the nay-sayers silenced once and
for all -- "O.K., O.K. we were wrong.  Yes, a $3000 90MHz Pentium machine
can perform even better than a $15000 Sparc 10".

But one chink remained -- how to run Matlab.  These were the days before
the Linux emulator in FreeBSD.  I tried weening the lab off of proprietary
software having tyrannical licensing requirements, but Scilab and Octave
were not acceptable to many lab members soooo... So, I sent a lengthy
letter to Dr. Cleve Moler himself (Chief Scientist at the Mathworks), in
January 1996, going into great detail regarding our rationale and
decision-making process for choosing FreeBSD and how FreeBSD had solved
many of the performance problems (e.g. swapping and networking) we had
been experiencing (and still experience on benchmark machines) with Linux.
I explained how performance was a VERY important issue in scientific
research and that the differences we were measuring meant the difference
between getting an answer to a question in a few days versus getting an
answer in a few weeks!!  I then went on to explain how FreeBSD shared many
similarities (and even much source code) with SunOS and that it would
probably be quite simple to add native support for FreeBSD in Matlab and
that our lab and many other would be very thankful (as indeed we had been
when the Mathworks introduced Matlab for Linux, I reminded him).  Dr. 
Moler answered my letter very quickly thanking me for a very well written,
thoughtful, and considerate letter and said they would consider our
request seriously.  But alas, a few days later he followed up with their
final decision that supporting yet another platform was too much work to
justify the unknown market potential of the product.  By the way, did you
know that the Matlab language parser was implemented brute-force by hand
and is NOT written using lex and yacc?

Not too long after this I heard via the freebsd e-mail lists that the
linux emulator in FreeBSD -current ("-current what's that?", I thought)
(at the time I believe it was 2.2-current) was getting good enough to run
many linux binaries.  Well this was indeed good news, so I immediately
learned all I could about "staying -current" and the linux emulator and
set up my experimental FreeBSD machine in the lab accordingly.  I soon
found out that, on the exact same hardware, Matlab ran marginally FASTER
(~3%) under the linux emulator in FreeBSD than it did on a "Real Linux
Machine(tm)" or WindowsNT 4.0 under light load and MUCH FASTER (~2.25x NT)
(~3.25x Linux!!)  under heavy load.

Of course, I reported this to the folks at the Mathworks right away with
detailed instructions on how I got it to work and even a diff file to
patch their sh scripts so that future releases would be "FreeBSD Linux
emulator ready".  Their response was, 1)  "that's neat" and 2) "we don't
support that".  Wonderful.  What really got me steamed though, was a
couple of months after this, a tech support guy from the Mathworks
forwarded an e-mail to me from a FreeBSD user who wanted to get Matlab
running under FreeBSD.  Obviously, tech support at the Mathworks knew that
I was the right guy to contact and obviously all the time I had spent
putting together the detailed instructions and the patch file went right
down the Mathworks' byte-toilet.  The tech guy didn't even ask me first,
he just forwarded the mail to me, cc'd the poor FreeBSD user and dropped
it in my lap.  Of course, I was quite happy to help the FreeBSD user get
things working but in a separate e-mail I let the Mathworks know that if
they're not willing to support paying customers (and it ain't cheap)
running Matlab on FreeBSD why should they automatically expect me to do it
at they're beckon-call, single-handedly, and for nothing?  Of course, I do
this all the time, user to user (that's my choice and I'm happy to do it
:-) ) but it's quite another thing to have a company with this attitude
drop someone in your lap completely out of the blue without an inquiry
beforehand or a thank you afterwards.  I felt that I was equally
thoughtful and considerate in that letter to the Mathworks -- needless to
say I never got a response.  Par for the course, I guess. 

Perhaps the climate of opinion at the Mathworks is different now and I
certainly don't want to dissuade any of you from contacting the Mathworks
on your own (this would probably be a good thing to do, in fact) but they
have probably heard enough from me already and I'm certainly done wasting
my time on them.  Thanks to all of you for FreeBSD and the wonderful (and
all so necessary) Linux emulator!

Sincerely <i.e. I'm done ranting now>,

Tom


On Wed, 29 Apr 1998, Jordan K. Hubbard wrote:

> > 
> > We use it in FreeBSD all the time in our lab.  It works great!
> > You will have to tweak a couple of shell scripts that it comes with so
> > that they recognize freebsd as an architecture and map this architecture
> > to linux.  That was the only change we had to make.
> 
> Maybe somebody should get this back to the Matlab folks?  You'd think
> they'd want their stuff to run OOB for the most number of people.
> 
> Jordan
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980430094412.18486C-100000>