CASMcode icon indicating copy to clipboard operation
CASMcode copied to clipboard

Building CASM from src for CNGMC

Open darnoceloc opened this issue 3 years ago • 0 comments

Getting the error messages below when building from src after modifying monte_carlo files to perform charge neutral grand canonical MC simulation. I can send the relevant files if necessary. My editor is giving these problems in Canonical.hh and GrandCanonicalEvent.hh respectively prior to build. OccMod is defined in DofMod.hh which I included so not sure why I'm getting that message.

identifier "correlations_vec" is undefined call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type

identifier "OccMod" is undefined

In file included from ./include/casm/monte_carlo/canonical/Canonical.hh:13,
                 from src/casm/app/monte.cc:14:
./include/casm/monte_carlo/canonical/CanonicalSettings.hh: In member function ‘SamplerInsertIterator CASM::Monte::CanonicalSettings::_make_all_correlations_samplers(const CASM::PrimClex&, jsonParserIteratorType, SamplerInsertIterator) const’:
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:213:68: error: cannot convert ‘CASM::ClexDescription’ to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’}
  213 |       for(size_type i = 0; i < primclex.clexulator(formation_energy(primclex)).corr_size(); i++) {
      |                                                    ~~~~~~~~~~~~~~~~^~~~~~~~~~
      |                                                                    |
      |                                                                    CASM::ClexDescription
In file included from ./include/casm/clex/PrimClex_impl.hh:5,
                 from src/casm/app/monte.cc:9:
./include/casm/clex/PrimClex.hh:165:44: note:   initializing argument 1 of ‘CASM::Clexulator CASM::PrimClex::clexulator(const string&) const’
  165 |   Clexulator clexulator(std::string const &basis_set_name) const;
      |                         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from ./include/casm/monte_carlo/canonical/Canonical.hh:13,
                from src/casm/app/monte.cc:14:
./include/casm/monte_carlo/canonical/CanonicalSettings.hh: In member function ‘SamplerInsertIterator CASM::Monte::CanonicalSettings::_make_query_samplers(const CASM::PrimClex&, jsonParserIteratorType, SamplerInsertIterator) const’:
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:289:43: warning: invalid use of incomplete type ‘const class CASM::ProjectSettings’
  289 |       const auto &dict = primclex.settings().query_handler<Configuration>().dict();
      |                          ~~~~~~~~~~~~~~~~~^~
In file included from ./include/casm/clex/PrimClex_impl.hh:5,
                 from src/casm/app/monte.cc:9:
./include/casm/clex/PrimClex.hh:12:7: note: forward declaration of ‘class CASM::ProjectSettings’
   12 | class ProjectSettings;
      |       ^~~~~~~~~~~~~~~
In file included from ./include/casm/monte_carlo/canonical/Canonical.hh:13,
                 from src/casm/app/monte.cc:14:
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:289:73: error: expected primary-expression before ‘>’ token
  289 |       const auto &dict = primclex.settings().query_handler<Configuration>().dict();
      |                                                                         ^
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:289:75: error: expected primary-expression before ‘)’ token
  289 |       const auto &dict = primclex.settings().query_handler<Configuration>().dict();
      |                                                                           ^
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:305:18: error: ‘const class CASM::PrimClex’ has no member named ‘err_log’
  305 |         primclex.err_log() << ss.str();
      |                  ^~~~~~~
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:306:18: error: ‘const class CASM::PrimClex’ has no member named ‘err_log’
  306 |         primclex.err_log() << "headers: " << col << std::endl;
      |                  ^~~~~~~
./include/casm/monte_carlo/canonical/CanonicalSettings.hh:307:18: error: ‘const class CASM::PrimClex’ has no member named ‘err_log’
  307 |         primclex.err_log() << "  Some queries may not be available for sampling at this time." << std::endl;
      |                  ^~~~~~~
In file included from src/casm/app/monte.cc:14:
./include/casm/monte_carlo/canonical/Canonical.hh: In member function ‘void CASM::Monte::Canonical::check_corr()’:
./include/casm/monte_carlo/canonical/Canonical.hh:85:22: error: ‘correlations_vec’ was not declared in this scope; did you mean ‘correlations’?
   85 |         std::cout << correlations_vec(_configdof(), supercell(), _clexulator()) << std::endl;
      |                      ^~~~~~~~~~~~~~~~
      |                      correlations
./include/casm/monte_carlo/canonical/Canonical.hh: In member function ‘CASM::Clexulator& CASM::Monte::Canonical::_clexulator() const’:
./include/casm/monte_carlo/canonical/Canonical.hh:140:51: error: no match for call to ‘(const CASM::Clexulator) ()’
  140 |         return m_formation_energy_clex.clexulator();
      |                                                   ^
./include/casm/monte_carlo/canonical/Canonical.hh: In member function ‘const CASM::ECIContainer& CASM::Monte::Canonical::_eci() const’:
./include/casm/monte_carlo/canonical/Canonical.hh:144:44: error: no match for call to ‘(const CASM::ECIContainer) ()’
  144 |         return m_formation_energy_clex.eci();
      |                                            ^
In file included from ./include/casm/monte_carlo/grand_canonical/GrandCanonical.hh:10,
                 from src/casm/app/monte.cc:17:
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh: At global scope:
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh:66:5: error: ‘OccMod’ does not name a type
   66 |     OccMod &occupational_change();
      |     ^~~~~~
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh:69:11: error: ‘OccMod’ does not name a type
   69 |     const OccMod &occupational_change() const;
      |           ^~~~~~
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh:88:5: error: ‘OccMod’ does not name a type
   88 |     OccMod m_occ_mod;
      |     ^~~~~~
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh:157:10: error: ‘OccMod’ does not name a type
  157 |   inline OccMod &GrandCanonicalEvent::occupational_change() {
      |          ^~~~~~
./include/casm/monte_carlo/grand_canonical/GrandCanonicalEvent.hh:162:16: error: ‘OccMod’ does not name a type
  162 |   inline const OccMod &GrandCanonicalEvent::occupational_change() const {
      |                ^~~~~~

darnoceloc avatar Feb 21 '22 12:02 darnoceloc