Archive for April, 2012

April 30th, 2012

Welcome to the 16th Month of Math Software where I take a tour around the news and new releases in the world of mathematical software.  Thanks so much to this month’s contributors without whom I would really struggle to put this newsletter together.  As always, the archives can be found at and if you have any news for next month then there are numerous ways in which to contact me.

Google Summer of Code

The world of Open Source mathematical software stands to gain heavily from this year’s Google Summer of Code.  Projects include an attempt to port Scilab to Android, improvements to symbolic expressions in Sage, aerospace and signal processing blocksets for Xcos, Just In Time compilation for Octave and many many more.  See for the full list of projects.

Mathematics on GP-GPUs (General Purpose – Graphical Processing Units)


  • Version 0.7.3 of Pandas has been released. According to the website, Pandas aims to become the most powerful and flexible open source data analysis / manipulation tool available in any language  Go to to see what’s new.

pandas scatter matrix

  • Version 0.4 of mathics has been released. ‘Mathics is a free, general-purpose online computer algebra system featuring Mathematica-compatible syntax and functions.’ The Mathics project is looking for more developers, contact Jan Pöschko if you’re interested.

Sparse Linear Systems

  • PaStiX ( is a scientific library that provides a high performance parallel solver for very large sparse linear systems based on direct methods and version 5.2 was released this month.

MATLAB add-ons

  • Version 2.1 of LAMG (Lean Algebraic Multigrid) was released this month.  LAMG is a fast graph Laplacian solver. It can solve Ax=b in O(m) time and storage, where A is the graph Laplacian of a weighted undirected graph with m edges.  Free MATLAB code download:
  • Version 4.2 of Chebfun is now available from Chebfun is an open-source system written in Matlab that overloads Matlab’s operations for vectors and matrices to analogous operations for functions and operators.  For an overview of what Chebfun can do, take a look at the collection of more than 100 Chebfun Examples posted at

LAPACK – The standard for Linear Algebra

SPSS In decline?

  • According to this blog, SPSS is in steep decline with the open source language, R, taking up the slack.  This blog, however, isn’t so sure!
April 28th, 2012

A MATLAB user at Manchester recently sent me some code and data as part of a Condor support request but Outlook helpfully blocked access to his .mat files deeming them potentially unsafe!  It seems that Microsoft Outlook is afraid of matrices.

I guess that the easiest way to proceed would be to ask him to resend his stuff as a .zip file but that would slow down the support query.  I just wanted to stop Outlook being quite so paranoid and let me have access to those scary matrices.

The fix is a registry edit (very user-friendly of Microsoft right?) so please don’t proceed if you are not comfortable editing the registry.  The registry controls numerous aspects of the Windows operating system along with many of the applications you have installed.  If it had a map then there would be huge areas labelled ‘Here be Dragons.’ Corrupting the registry could lead to an unusable operating system. So, the following is offered without warranty on a ‘it works for me’ basis.

Open up regedit and navigate to the following  (I’m using Windows 7 and Outlook 2007, location and procedure may be different for different environments).


Once you have the above highlighted, move your mouse to the right hand pane of regedit, and right click to get a context menu.  Click on New->String Value and create a key-value pair with

  • Name Level1Remove
  • Value Data .mat

If you want to unblock more than just .mat then you can separate them with semicolons so .mat;.exe for example.  When you’ve finished, this part of the registry should look like the screenshot below
allowing .mat files in Outlook

April 26th, 2012

Intel have just released their OpenCL Software Development Kit (SDK) for Intel processors.  The good news is that this version targets the on-die GPU as well as the CPU allowing truly heterogeneous programming.  The bad news is that the GPU goodness is for 3rd Generation ‘Ivy Bridge‘ Processors only– us backward Sandy Bridge users have been left in the cold :(

A quick scan through the release notes reveals the following:-

  • OpenCL access to the on-die GPU part is currently for Windows only. Linux users only have CPU support at the moment.
  • No access to the GPU part of Sandy Bridge Processors via this implementation.
  • The GPU part has single precision only (I guess we’ll see many more mixed-precision algorithms from now on)

I don’t have access to an Ivy Bridge processor and so can’t have a play but I’m looking forward to seeing how much performance OpenCL programmers can squeeze out of this new implementation.

Other WalkingRandomly posts on GPU computing

April 25th, 2012

MATLAB uses the Intel Math Kernel Library (MKL) behind the scenes to perform many linear algebra operations. I wondered what version of the MKL was being used by MATLAB 2012a on my 64 bit Windows machine. The most straightforward way to determine this is to simply ask MATLAB:

>> version -lapack
ans =
Intel(R) Math Kernel Library Version 10.3.5 Product Build 20110720 for Intel(R) 64 architecture applications
Linear Algebra PACKage Version 3.3.1

>> version -blas
ans =
Intel(R) Math Kernel Library Version 10.3.5 Product Build 20110720 for Intel(R) 64 architecture applications

Thanks to The Mathworks technical support team for this information.

April 13th, 2012

I work in a beautiful old building at The University of Manchester called The Sackville Street Building.  Yesterday, I took part in a very interesting historical tour of the building and was astonished at the amount of beautiful things that I had never noticed before and yet walk past every day.

For example, I was delighted to discover that one of the stained glass windows in the great hall was themed around mathematics (thanks to Samantha Bradey for the original image which I’ve heavily compressed for this blog post)

Mathematics stained glass

While on the tour I posted a quick snap of the above window to twitter using my mobile phone and received some nice feedback along with a  few pictures of other mathematical windows.  It turns out that Manchester’s Nick Higham has a close up of the above window for example.  Also, Kit Yates tweeted about several mathematical windows in Caius College, Cambridge, one of which is below (showing images related to Venn and Fisher).

Caius College stained glass

Do you know of any other examples of mathematics in stained glass?  Feel free to contact me and tell me all about it.

April 11th, 2012

I recently installed MATLAB 2012a on a Windows machine along with a certain set of standard Mathworks toolboxes.  In addition, I also installed the excellent NAG Toolbox for MATLAB which is standard practice at my University.

I later realised that I had not installed all of the Mathworks toolboxes I needed so I fired up the MATLAB installer again and asked it to add the missing toolboxes.  This extra installation never completed, however, and gave me the error message

The application encountered an unexpected error and needed to close. You may want to try
re-installing your product(s). More infomation can be found at C:\path_to_a_log_file

I took a look at the log file mentioned which revealed a huge java error that began with

 java.util.concurrent.ExecutionException: java.lang.StringIndexOutOfBoundsException:
    String index out of range: -2
 at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
 at java.util.concurrent.FutureTask.get(Unknown Source)
 at javax.swing.SwingWorker.get(Unknown Source)
 at com.mathworks.wizard.worker.WorkerImpl.done(
 at javax.swing.SwingWorker$ Source)

A little mucking around revealed that the installer was unhappy with the pathdef.m file at C:\Program Files\MATLAB\R2012a\toolbox\local\pathdef.m

The installer for the NAG Toolbox modifies this file by adding the line

'C:\Program Files\MATLAB\R2012a\toolbox\NAG\mex.w64;' ...

near the beginning and the lines

'C:\Program Files\MATLAB\R2012a\help\toolbox\NAG;' ...
'C:\Program Files\MATLAB\R2012a\help\toolbox\NAGToolboxDemos;' ...

Near the end and it seems that the MATLAB installer really doesn’t like this. So, what you do is create a copy of this pathdef.m file (pathdef.m.old for example) and then remove the non-mathworks lines in pathdef.m. Now you can install the extra Mathworks toolboxes you want.  Once the installer has finished its work you can re-add the non-mathworks lines back into pathdef.m using your copy as a guide.

I’ll be informing both NAG and The Mathworks about this particular issue but wanted to get this post out there as soon as possible to provide a workaround since at least one other person has hit this problem at my University and I doubt that he will be the last (It’s also going to make SCCM deployment of MATLAB a pain but that’s another story).


The Mathworks technical support have sent me a better workaround than the one detailed above. What you need to do is to change

'C:\Program Files\MATLAB\R2012a\toolbox\NAG\mex.w64;' ...


'C:\Program Files\MATLAB\R2012a\toolbox\NAG\mex.w64;', ...

The Mathworks installer is unhappy about the missing comma.

April 2nd, 2012

Welcome to this month’s MMS which includes the usual mix of commercial and open source software spanning across multiple disciplines.  Last month’s edition is here and the archive of all previous editions is at  Thanks so much for all of the contributors this month without whom these articles would be significantly more difficult to write.  As always, if you have some mathematical software news then feel free to contact me.

General purpose commercial packages

  • Maple 16 was released in March and according to Maplesoft it has over 4500 additions and improvements compared to the previous version.  Maple is very strong in polynomial arithmetic and Maplesoft have released benchmarks showing how Maple 16 is hundreds of times faster than Mathematica 8 in this area.  For example, multiplication of two dense polynomials in 3 variables, each of degree 30 takes 110 seconds in Mathematica 8 but only 0.52 seconds in Maple 16 according to these new benchmarks.
  • MATLAB version 2012a was also released in March with the usual batch of improvements and updates.  One of the highlights for me is the fact that The Mathworks now offer the MATLAB Compiler Runtime for free download, significantly simplifying the deployment of compiled applications.
  • Version 2.18-5 of Magma, the commerical computer algebra system specializing in number theory, has been released.  Click here for the v2.18-5 changelog

Mathematical Open Source and Freeware

3D Bar Plot created using Euler Math ToolboxAn interactive shell for the GNU Scientific Library

Python takes on R with pandas

  • The Python Data Analysis library, pandas, is designed to help Python programmers perform in depth data analysis projects without having to resort to R.  Version 0.7.2 was released in March and you can see what’s new at  Thanks to Tom Brander for the heads up on this one.

Vital statistics

Finite Differences and Elements

  • “The Chombo software package provides a set of tools for implementing finite difference methods for the solution of partial differential equations on block-structured adaptively refined rectangular grids with embedded boundaries. Both elliptic and time-dependent modules are included. Support for parallel platforms and standardized self-describing file formats are included.”  Version 3.1 was released in March…get it at
  • The FEniCS book has been published and is available online and in print. The online version is available at and hard copies can be ordered from Springer ( or book sellers.  The FEniCS Project is a collection of free software with an extensive list of features for automated, efficient solution of differential equations.

Eigenvalues everywhere

The following two packages were recently announced on the Numerical Analysis Digest.

  • “The FEAST solver package is a free high-performance numerical library for solving the standard or generalized eigenvalue problem, and obtaining all the eigenvalues and eigenvectors within a given search interval.  The FEAST algorithm takes its inspiration from the density-matrix representation and contour integration technique in quantum mechanics.”  Download version 2.0 from
  • “ELPA” is a new direct eigensolver library that addresses scalability and performance, especially for parallel applications. ELPA builds on the ScaLAPACK type interfaces that are often used in existing implementations, but key parts of the eigenvalue solution are then replaced with ELPA’s own routines in an easy-to-use way. The library is particularly useful when a substantial part of all eigenvalue / eigenvector pairs is needed. Released under an LGPL-like license, ELPA has been successfully tested for matrix sizes up to 680,000 and with up to 294,000 CPU cores on a BlueGene/P system.”  A hybrid version (OpemMP and MPI) was released in March.

From the blogs