Open sumantaphy opened 3 years ago
Sorry - I'm really not sure what the issue is based on on this information. You might be using a different version of make
than the one I used when I made the provided Makefile. One thing you could do is to just view the commands that the Makefile is trying to run (for example your g++ above) and then run these directly instead of using make. Also the error could be due to the compilation itself failing, not due to make
(and then make
was just reporting that the error occurred). So it could be related to your ITensor setup or one of the dependencies.
I am using GNU Make 4.1 during run. I have successfully installed ITensor (Version 3.1.0) and it is running smoothly. Let me just put the complete error: (Hope this might help)
g++ -m64 -std=c++17 -fconcepts -fPIC -c -I. -I'/home/sumanta/software/ITensor' -O2 -DNDEBUG -Wall -Wno-unknown-pragmas -Wno-unused-variable -std=c++1y -I/home/sumanta/software/png++ -I/usr/local/include -o linear.o linear.cc
In file included from /home/sumanta/software/ITensor/itensor/util/iterate.h:20:0,
from /home/sumanta/software/ITensor/itensor/global.h:26,
from /home/sumanta/software/ITensor/itensor/qn.h:19,
from /home/sumanta/software/ITensor/itensor/spectrum.h:20,
from /home/sumanta/software/ITensor/itensor/decomp.h:19,
from /home/sumanta/software/ITensor/itensor/all_basic.h:31,
from /home/sumanta/software/ITensor/itensor/all_mps.h:33,
from /home/sumanta/software/ITensor/itensor/all.h:31,
from linear.cc:2:
/home/sumanta/software/ITensor/itensor/util/itertools.h: In member function ‘void triqs::utility::prod_iter~~~~
/home/sumanta/software/ITensor/itensor/util/itertools.h: At global scope:
/home/sumanta/software/ITensor/itensor/util/itertools.h:264:81: error: expected constructor, destructor, or type conversion before ‘;’ token
template
Makefile:45: recipe for target 'linear.o' failed
make: *** [linear.o] Error 1
Hi, so it's hard to be sure but based on this extra information, I would guess that your compiler version is too old to support the C++14 language and libraries. Can you try a newer compiler? Or perhaps try the clang compiler instead of gcc (g++)?
@sumantaphy , I meet the same question too. how did you slove the question,can you tell me? thank you every much.
Hi Sumanta and Qing, As I mentioned in my answer here (https://github.com/emstoudenmire/TNML/issues/3), this code is not really maintained anymore as it is about 7 years old, and even when I first posted it was far from an optimal implementation (i.e. it runs really slowly). Currently there are much better codes, but I left this one posted publicly in case people found it useful to study it.
Miles
DIR=/home/sumanta/software/ITensor ITENSOR_DIR=/home/sumanta/software/ITensor/itensor LIBPNG_DIR=/snap/gnome-3-38-2004/39/usr/lib/x86_64-linux-gnu PNGPP_DIR=/home/sumanta/software/png++ include $(DIR)/this_dir.mk include $(DIR)/options.mk While make it is showing the error follows (after giving the path of all these in the Makefile): Makefile:45: recipe for target 'linear.o' failed make: *** [linear.o] Error 1
make with:
"g++ -m64 -std=c++11 -fPIC -c -I. -I/home/sumanta/software/ITensor-2.1.1 -O2 -DNDEBUG -Wall -Wno-unused-variable -std=c++1y -I/home/sumanta/software/png++ -I/usr/local/include -o linear.o linear.cc"
Any kind of help is appreciable.