0 votes
asked by (120 points)

I have installed Itensor and I am using the Intel MKL libraries for lapack and blas. My codes compile, but sometimes when I try to run them I get error messages. For example, the following code :

auto expH = expHermitian(H,-beta),

gives the error:

Intel MKL ERROR: Parameter 5 was incorrect on entry to DSYEV.

Intel MKL ERROR: Parameter 5 was incorrect on entry to DSYEV.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Error condition in diagHermitian
Aborted

Do you know what the problem might be?

commented by (48.1k points)
Hi Nisheeta,
Thanks for the question and glad you're trying out ITensor. It's hard to know what's causing this problem based on that error message alone. Please check that everything about the code looks sensible, such as the system size not being much too large and that you are using a truncation error cutoff or max dim setting when calling functions like applyMPO, etc.

Also are you first compiling your 'main' code in debug mode and running it that way? Running in debug mode turns on many more error checks that can often give a more helpful error message earlier in the program.

Here's more information about how to compile in debug mode, if you are using the Makefile provided with ITensor:
http://itensor.org/docs.cgi?vers=cppv3&page=formulas/debug_mode

Best,
Miles
commented by (120 points)
Hi Miles,
The code I was trying to run is actually one of the codes in the tutorials folder of iTensor: https://github.com/ITensor/ITensor/tree/v3/tutorial/02_two_site.  I have run this code before on a different computer and it worked. But I'm now trying to run on this machine that requires me to use the Intel MKL libraries for blas and lapack and it gives the error, so it looks like it is a platform issue. It works if I comment the line: auto expH = expHermitian(H,-beta), and everything below it.

I tried compiling in debug mode, and it also gives the same error.
commented by (48.1k points)
Hi Nisheeta,
I see - that’s good that the code ran on other machines you have. I wish I knew what the reason was, but it’s hard for me to know or even to guess based on this information. I think the only way I could find out would be to reproduce the bug myself (though I would need to have access to the same version of MKL most likely). Then what I would do is to look at the state of the ITensor part of the code before it goes into the MKL LAPACK call happening there to see if it looks sensible, or otherwise use a debugger to look at the stack trace to get any clues.

Guessing at a high level, here are the only possibilities I can think of:
- it could be the version of MKL you have has a bug in it or some other issue, and you could fix things by using a different version
- it could be that the ITensor part of the code is running differently on this new machine somehow (different input file? computer has less memory?) and that’s causing an error that’s just showing up as an MKL error but could really have a different underlying reason

Please check how much memory the program is using and other things like that, because sometimes if a computer runs out of memory it can result in errors that are very confusing and look like they are to do with something else. But for this tutorial code I doubt it would come close to using a lot of memory unless you input very extreme parameters into it (very long times or large system sizes, cutoff of zero, etc.)
commented by (48.1k points)
If you do have another BLAS/LAPACK distribution available it could be good to try that just to test.
commented by (120 points)
I tried with a different distribution and it works now, thanks!
commented by (48.1k points)
Great! Thanks for letting us know

1 Answer

0 votes
answered by (48.1k points)

(Please see the discussion above.)

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...