Hi Lucas,
I am attempting to compile Qwalk on a BG/Q machine at ANL (Vesta) with both the IBM XL and GNU cross compilers.
I am running into the following compile time errors:
properties/Average_ekt.cpp:838: error: 'nTest' was not declared in this scope
properties/Average_ekt.cpp:840: error: 'nelectrons' was not declared in this scope
make: *** [/gpfs/vesta-home/afindlat/qwalk/src/obj/Linux-mpi/Average_ekt.o] Error 1
Here are the mentioned line numbers:
837 ##int natoms=sample->ionSize();
838 assert(accept_var.GetDim(0) >= nTest());
839 //assert(totalv.GetDim(0) >= nwf);
840 assert(nelectrons == sample->electronSize());
I commented out the assert statements on lines 838 and 840 and was able to successfully compile, but I am not
sure what is causing this problem with the cross compilers.
I am not a C++ expert so I am not sure I can diagnose the problem, however after a little googling I came across the following from IBM:
"Earlier compiler releases sometimes allowed names to be used in a
template definition before they were declared as long as they were
declared before the template was instantiated."
(
http://www-01.ibm.com/support/docview.wss?uid=swg21315623)
Maybe this is relevant?
Any incite would be helpful. Thank you.
-Alex