SebWouters / CheMPS2

CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
GNU General Public License v2.0
70 stars 34 forks source link

Compilation error #37

Closed cuanto closed 8 years ago

cuanto commented 8 years ago

Hi Sebastian,

When trying to compile a fresh copy of chemps2, I got the following error,

Linking CXX executable chemps2 /scratch-ssd/jluis/ipoicpca39UlH.o: in function main': /home/jluis/src/chemps2/CheMPS2/executable.cpp:686: undefined referenceCheMPS2::CASSCF::caspt2(int, int, int, CheMPS2::ConvergenceScheme, int, CheMPS2::DMRGSCFoptions_, double, double, bool, bool, bool)' not defined CheMPS2/CMakeFiles/chemps2bin.dir/build.make:85: recipe for target 'CheMPS2/chemps2' failed make[2]: * [CheMPS2/chemps2] Error 1 CMakeFiles/Makefile2:186: recipe for target 'CheMPS2/CMakeFiles/chemps2bin.dir/all' failed make[1]: * [CheMPS2/CMakeFiles/chemps2bin.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *\ [all] Error 2

Best regards, Jose Luis

SebWouters commented 8 years ago

Hi Jose Luis,

It is correctly defined: https://github.com/SebWouters/CheMPS2/blob/master/CheMPS2/include/chemps2/CASSCF.h#L208

double caspt2( const int Nelectrons, const int TwoS, const int Irrep, ConvergenceScheme * OptScheme, const int rootNum, DMRGSCFoptions * scf_options, const double IPEA, const double IMAG, const bool PSEUDOCANONICAL, const bool CHECKPOINT = false, const bool CUMULANT = false );

And it compiles fine on my machines and on travis: https://travis-ci.org/SebWouters/CheMPS2.

So my best guess is that you have conflicting CASSCF::caspt2 definitions (an older version of chemps2 headers).

Can you paste the output of 'git log | head -n 6' and 'git status' in the chemps2 source folder, as well as the output of 'locate CASSCF.h'? If there are other CASSCF.h headers on your machine, they might be conflicting.

And perhaps also 'make clean VERBOSE=1' in your build directory?

Best wishes, Sebastian

cuanto commented 8 years ago

Hi Sebastian,

Sorry, the problem was fixed, when compiling on my cluster, the old version was loaded in a module. I unloaded it, an now compile fine. :-)

Thanks.

Best regards, Jose Luis