Maple 10 and 64bit Linux, part 1

January 26 2006 Dave L 457


Maple 10 comes in both a 32bit and 64bit version for Linux. It's possible to run both versions, installed to the same base location, on a machine with the appropriate operating system runtime configuration. There are some interesting performance differences between the two versions.

I'll say a few words about the installation. I installed both under /usr/local/maple10 on an Athlon64 3200+ running the x86-64 version of the Fedora Core 2 operating system. I have the 32bit runtime for that OS installed, which came with the x86-64 Fedora CDs. I installed both Maple versions by running their respective installers in graphical mode. That is to say, I didn't pass the option "-i console" to either installer. It's possible that the 32bit Maple 10 installer requires 32bit GDK and GLib libraries to be found, but I'd already built those to /usr/local/lib some time ago.

Now, issuing,


gets me the default, which is 64bit Maple 10. I can check that by entering the maple command,


And I can read the man-page to see options to the maple script by issuing the Linux command,

man -M /usr/local/maple10/man maple

But here's something new, which isn't in that man-page. There's now an option -binary which allows one to force it to try to use another platform. So to run 32bit Maple 10 I can issue,

/usr/local/maple10/bin/maple -binary IBM_INTEL_LINUX

Again, I can check the version by querying kernelopts(version) .

So, how do these two versions differ? I won't give a comprehensive benchmark suite. But the essence seems to be this: the 64bit version can be faster but can use more memory. I'm talking just about mathematical computation here. Java performance is another issue altogether and depends on the platform's JRE implmentation, which is not Maple specific. On AMD x86-64 machines it turns out that 32bit code runs quite well, with very little "emulation" penalty. But some things are faster for other reasons. For example, the compiler may have been able to use different optimizations during the build. Or important parts of Maple's computational engine such as the GnuMP (gmp, used for large integer calculations) or ATLAS (used for hardware float BLAS) libraries may simply perform better, cycle for cycle, in their native 64bit versions. But Maple pushes a lot of memory around. And there is a lot of long integer data in the structures that Maple uses for representing exact symbolic data. So it's not surprising that for identical calculations the 64bit version may allocate more total memory.

Here's an example. I calculate 1234567! on both versions, in a fresh session. On the 32bit version of Maple 10.00 it takes 10.4sec and allocates about 40MB. On the 64bit version it takes 8.6sec and allocates 46MB of memory.

Here's another brief example, in another fresh session.

m := LinearAlgebra:-RandomMatrix(1000,outputoptions=[datatype=float[8]]): st,ba:=time(),kernelopts(bytesalloc): LinearAlgebra:-MatrixMatrixMultiply(m,m): time()-st,kernelopts(bytesalloc)-ba;

That takes 1.35sec on the 32bit version and 0.68sec on the 64bit version. Unsurprisingly in both cases the allocated memory increase for the multiplication is just 8MB. That's just the memory to store 1 million double precision floats in the new resulting Matrix.

In some cases, the 64bit version will consume more memory as well as take slightly longer to compute. An example running against Maple 10.02 might be, int(sin(x)^(60)*ln(x)*cos(x),x); which takes about 1.33sec and uses 9.5MB in the 32bit version and takes 1.38sec and uses 19MB in the 64bit version. On the Intel IA-64 Itanium2 platform, the difference in speed performance is more marked, and the native 64bit version is considerably faster than the 32bit version in general. It's my understanding that this is typical and not a difference specific to Maple.

Ok, my coffee break is over.
Dave Linder Team Lead, Mathamatical Software, Maplesoft, Inc.

Please Wait...