# Eigensystem on HPC

I am submitting Mathematica jobs to an HPC. I have a large matrix that is a function of (x,y) and I am diagonalizing it for around 500 points in the plane.

My initial idea was to request a node with say 32 processors. Then I use ParallelMap so that each processor diagonalizes at different points.

However, running tests on my own 4-core desktop, I've noticed a problem. Eigensystem, even called in series, uses all four cores. When called in parallel, it appears to use the four cores more efficiently (i.e. CPU usage is on average higher), but not drastically so. Thus, there is not very much speed up (maybe around 10%). I conclude Eigensystem already has some built-in way to take advantage of multiple processors(?).

The question is, if I reserve a node on the HPC and use Eigensystem in series, will it: (1) automatically use all the available processors on the node, (2) only the processors I reserved in the PBS script request, or (3) something else?

I am doing tests myself, but I wanted to see if anyone had any experience with this. And I have to wait a long time in the queue to do anything.

• It is likely that Eigensystem uses the MKL library which is multithreaded. – chris Oct 31 '14 at 21:02

It depends on how PBS and the cluster environment are set up. Ideally, if cpuset support has been compiled in to PBS, and if you start Mathematica directly inside the PBS job, you should find that it uses all processors allocated by PBS (on that node--Eigensystem is not MPI-parallelized). If cpuset support isn't provided, then you risk starting as many threads as there are (physical) processors on that node--which will annoy the other users and administrators, and will not produce a good outcome for anyone.