+1 vote
edited Apr 15

I am trying to install itensor library in my ubuntu linux virtualbox. I followed all the instructions. After that, I run some sample code like hello_itensor.cc provided in ITensor Basics Quick Start.
However, it keep showing error like LAPACKINT has not been declared and LAPACKREAL has not been declared.
It seems like the identifier PLATFORM_lapack isn't defined so the lapack_wrap.h file is not working well.

Does it mean I didn't setup the options.mk properly?
In options.mk BLAS/LAPACK Related Options, I set

PLATFORM=lapack


OR is that because I didn't install lapack correctly?
I followed the instruction from here
https://astroiisc.wikispaces.com/Lapack+Installation+in+Ubuntu
And I can see the files liblapack.a liblapack.so liblapack.so.3 libblas.a libblas.so libblas.so.3 in the path /usr/lib .

Thanks!

commented Apr 15 by (140 points)
sorry there is a typo, PLATFORMlapack should be PLATFORM_lapack

+1 vote
answered Apr 15 by (16,570 points)

Hi,
It might be because you need to specify the BLASLAPACKINCLUDEFLAGS as well. There should be a flag starting with -I followed by the directory where your header (.h) files are for your LAPACK installation.

For example,
BLASLAPACKINCLUDEFLAGS=-I/usr/local/opt/lapack/include

Please check the folder to make sure it has header files such as lapacke.h (or some set of relevant headers).

Another thing to check is whether you are setting PLATFORM=lapack correctly. Like, for example, is the PLATFORM variable set again to a different value further down in your options.mk file? The reason I ask is that if PLATFORM=lapack is set correctly then things like LAPACKINT should be set by ITensor itself. So if those aren't getting set then maybe the PLATFORMlapack variable is not being defined.

Finally, please make sure the options.mk file you made is from a recent version of ITensor. If you upgraded from a much older version of ITensor, then you should make a brand new options.mk from scratch from the most recent options.mk.sample file. (If you are just installing ITensor for the first time I assume that's what you did.)

Best,
Miles