sanshar / Block

Block implements the density matrix renormalization group (DMRG) algorithm for quantum chemistry.
GNU General Public License v3.0
30 stars 33 forks source link

npdm_expectations.C #17

Closed similt closed 9 years ago

similt commented 9 years ago

Can you help to get rid of the error while compiling ?

modules/npdm/npdmexpectations.C(855): error: class "std::map<std::vector<int, std::allocator>, SpinAdapted::Wavefunction, std::less<std::vector<int, std::allocator>>, std::allocator<std::pair<const std::vector<int, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

modules/npdm/npdmexpectations.C(899): error: class "std::map<std::vector<int, std::allocator>, SpinAdapted::Wavefunction, std::less<std::vector<int, std::allocator>>, std::allocator<std::pair<const std::vector<int, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

compilation aborted for modules/npdm/npdm_expectations.C (code 2) make: *\ [modules/npdm/npdm_expectations.o] Error 2

shengg commented 9 years ago

std::map::emplace is only implemented c++11. Changing c++ compiler, for example using GCC 4.8, could solver the problem.

Best regards,

Sheng Guo Ph.D student 351 Frick Laboratory Department of Chemistry Princeton University

On Thu, Jul 9, 2015 at 11:00 AM, similt notifications@github.com wrote:

Can you help to get rid of the error while compiling ?

modules/npdm/npdmexpectations.C(855): error: class "std::map>, SpinAdapted::Wavefunction, std::less>>, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

modules/npdm/npdmexpectations.C(899): error: class "std::map>, SpinAdapted::Wavefunction, std::less>>, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

compilation aborted for modules/npdm/npdm_expectations.C (code 2) make: *\ [modules/npdm/npdm_expectations.o] Error 2

— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/17.

junyang4711 commented 9 years ago

Hi

Please keep it in mind that the instruction for compiling Block and compiler requirement is given on github project page and also the following online documentation:

http://sanshar.github.io/Block/

On Thu, Jul 9, 2015 at 11:19 AM, Sheng Guo notifications@github.com wrote:

std::map::emplace is only implemented c++11. Changing c++ compiler, for example using GCC 4.8, could solver the problem.

Best regards,

Sheng Guo Ph.D student 351 Frick Laboratory Department of Chemistry Princeton University

On Thu, Jul 9, 2015 at 11:00 AM, similt notifications@github.com wrote:

Can you help to get rid of the error while compiling ?

modules/npdm/npdmexpectations.C(855): error: class "std::map>, SpinAdapted::Wavefunction, std::less>>, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

modules/npdm/npdmexpectations.C(899): error: class "std::map>, SpinAdapted::Wavefunction, std::less>>, std::allocator>, SpinAdapted::Wavefunction>>>" has no member "emplace" waves.emplace(spin,opw2); ^

compilation aborted for modules/npdm/npdm_expectations.C (code 2) make: *\ [modules/npdm/npdm_expectations.o] Error 2

— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/17.

— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/17#issuecomment-120030282.