Closed ghost closed 9 years ago
Hi, are you using a C++11 compliant compiler? emplace is part of the C++11 standard library.
On Fri, May 29, 2015 at 1:31 PM, Hassenky notifications@github.com wrote:
modules/npdm/npdm_expectations.C:855:18: error: ‘class std::mapstd::vector<int, SpinAdapted::Wavefunction>’ has no member named ‘emplace’ modules/npdm/npdm_expectations.C: In member function ‘void SpinAdapted::Npdm::Npdm_expectations::store(SpinAdapted::Npdm::NpdmSpinOps_base&)’: modules/npdm/npdm_expectations.C:899:14: error: ‘class std::mapstd::vector<int, SpinAdapted::Wavefunction>’ has no member named ‘emplace’ make: *\ [modules/npdm/npdm_expectations.o] Error 1
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14.
I am using gcc 4.7 so I guess It does not support C++11. But, when I use intel compiler (2015), the same error happened. It is so strange.
"modules/npdm/npdm_expectations.C(855): error: class "std::map<std::vector<MPI_Datatype={int}, std::allocator
modules/npdm/npdm_expectations.C(899): error: class "std::map<std::vector<MPI_Datatype={int}, std::allocator
compilation aborted for modules/npdm/npdm_expectations.C (code 2)
Did you use -std=c++11
On Fri, May 29, 2015 at 4:15 PM, Hassenky notifications@github.com wrote:
I am using gcc 4.7 so I guess It does not support C++11. But, when I use intel compiler (2015), the same error happened. It is so strange.
"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)
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14#issuecomment-106924077.
I noticed on the compiler webpage
https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
On Fri, May 29, 2015 at 4:17 PM, Garnet Chan gkc1000@gmail.com wrote:
Did you use -std=c++11
On Fri, May 29, 2015 at 4:15 PM, Hassenky notifications@github.com wrote:
I am using gcc 4.7 so I guess It does not support C++11. But, when I use intel compiler (2015), the same error happened. It is so strange.
"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)
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14#issuecomment-106924077.
To be on safe side, please try g++ version higher than 4.8.2 with -std=c++11.
Jun
On Fri, May 29, 2015 at 4:19 PM, gkc1000 notifications@github.com wrote:
I noticed on the compiler webpage
https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
- 1: * Full C++11 support requires gcc 4.8 environment or newer on Linux
On Fri, May 29, 2015 at 4:17 PM, Garnet Chan gkc1000@gmail.com wrote:
Did you use -std=c++11
On Fri, May 29, 2015 at 4:15 PM, Hassenky notifications@github.com wrote:
I am using gcc 4.7 so I guess It does not support C++11. But, when I use intel compiler (2015), the same error happened. It is so strange.
"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)
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14#issuecomment-106924077.
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14#issuecomment-106924906.
With gcc 4.7, I did use -std=c++11, but could not overcome "emplace" error. I'll install new version of gcc and try again. Thanks so much.
gcc 4.7 supports some but many features of c++11 for which you will continually see more errors of compiling. Newer version shall solve the problem.
Jun
On Fri, May 29, 2015 at 4:28 PM, Hassenky notifications@github.com wrote:
With gcc 4.7, I did use -std=c++11, but could nod overcome "emplace" error. I'll install new version of gcc and try again. Thanks so much.
— Reply to this email directly or view it on GitHub https://github.com/sanshar/Block/issues/14#issuecomment-106926923.
modules/npdm/npdm_expectations.C:855:18: error: ‘class std::mapstd::vector<int, SpinAdapted::Wavefunction>’ has no member named ‘emplace’ modules/npdm/npdm_expectations.C: In member function ‘void SpinAdapted::Npdm::Npdm_expectations::store(SpinAdapted::Npdm::NpdmSpinOps_base&)’: modules/npdm/npdm_expectations.C:899:14: error: ‘class std::mapstd::vector<int, SpinAdapted::Wavefunction>’ has no member named ‘emplace’ make: *\ [modules/npdm/npdm_expectations.o] Error 1