3

I would like to diagonalize one unitary non-sparse matrix of size 12870 with complex number entries (not symbols, this is really a numerical problem). Is it possible to make eigensystem run in parallel - I have access to an HPC cluster with many kernels - so that the diagonalization runs as fast as possible?

lagoa
  • 835
  • 1
  • 7
  • 10
  • 1
    Likely the best approach to this problem is to use/write a parallel solver in your favorite traditional language and call it from mathematica. – george2079 May 23 '14 at 14:42
  • I guess it can help you: http://mathematica.stackexchange.com/questions/13419/how-to-solve-an-eigensystem-faster – Rom38 May 23 '14 at 15:02
  • 3
    Have you tried it? Eigenvalues for instance should use all available cores on the machine it's running. By the way 12870 is Binomial[16, 8] so presumably you're looking at spinless fermions on a 16-site lattice at half filling? And the entries are complex so you are looking at a time-dependent H? Or maybe a density matrix? (idle guessing here while waiting for mma to finish something) – acl May 23 '14 at 17:01
  • @acl . You are close! Eigenvalues uses all the cores (there are 12 nodes) but still takes 2 hours. I need to do this for 500 matrices of the same size. – lagoa May 23 '14 at 20:07
  • Could you not run the same calculation in independent subkernels, using eg ParallelTable? That's what I do. Also, useful options might include SetSystemOptions["ParallelOptions" -> "ParallelThreadNumber" -> 8]; and SetSystemOptions["MKLThreads" -> 8];. If these suggestions don't help, could you explain why so we can come up with something? – acl May 23 '14 at 21:05
  • How do you decide the number - in your example you chose 8 - to put? – lagoa May 23 '14 at 21:38
  • @lagoa In this particular case I just randomly put something to paste it here. For me it's useful so I can prevent Mathematica from taking all available CPUs when I run stuff on our cluster at work (which annoys our sysadmins and my colleagues). – acl May 23 '14 at 21:54
  • It seems that by default MKLThreads is set to the number of cores the CPU of the current machine has. Did you check how many cores Mathematica uses when you try to diagonalize your matrix? – acl May 23 '14 at 22:05
  • 2
    For a dense numerical problem, that you want to distribute over a cluster--provided that it can be done at machine precision, my suggestion would be to use ScaLAPACK (but make sure that your cluster has InfiniBand). But I think that @acl's suggestion of doing the 500 matrices in parallel one on each node, rather than one at a time over all nodes, will be more computationally efficient. – Oleksandr R. May 24 '14 at 00:12

0 Answers0