diff --git a/CMakeLists.txt b/CMakeLists.txt index 064280edd..3c0d069b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ include(CMakePackageConfigHelpers) project(SIRIUS DESCRIPTION "Domain specific library for electronic structure calculations" HOMEPAGE_URL "https://github.com/electronic-structure/SIRIUS" - VERSION 7.6.0 + VERSION 7.6.1 LANGUAGES CXX C) # for CUDA_ARCHITECTURES diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 250fca630..cec3d4606 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -39,7 +39,7 @@ PROJECT_NAME = "SIRIUS" # control system is used. -PROJECT_NUMBER = "7.6.0" +PROJECT_NUMBER = "7.6.1" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/src/context/config.hpp b/src/context/config.hpp index e3923c514..e648a7d07 100644 --- a/src/context/config.hpp +++ b/src/context/config.hpp @@ -263,6 +263,21 @@ class config_t } dict_["/settings/sht_coverage"_json_pointer] = sht_coverage__; } + /// Maximum orbital quantum number for which spherical coverage need to be generated. + /** + This option can be used to increase shpherical coverage in muffin-tins. Impacts generation of XC potential. + */ + inline auto sht_lmax() const + { + return dict_.at("/settings/sht_lmax"_json_pointer).get(); + } + inline void sht_lmax(int sht_lmax__) + { + if (dict_.contains("locked")) { + throw std::runtime_error(locked_msg); + } + dict_["/settings/sht_lmax"_json_pointer] = sht_lmax__; + } /// Density RMS tolerance to switch to FP64 implementation. If zero, estimation of iterative solver tolerance is used. inline auto fp32_to_fp64_rms() const { diff --git a/src/context/input_schema.json b/src/context/input_schema.json index 166cdd2d0..ffb6b5cfe 100644 --- a/src/context/input_schema.json +++ b/src/context/input_schema.json @@ -122,6 +122,12 @@ "title": "Coverage of sphere in case of spherical harmonics transformation", "description": "0 is Lebedev-Laikov coverage, 1 is unifrom coverage" }, + "sht_lmax" : { + "type": "integer", + "default": -1, + "title": "Maximum orbital quantum number for which spherical coverage need to be generated.", + "description": "This option can be used to increase spherical coverage in muffin-tins. Impacts generation of XC potential." + }, "fp32_to_fp64_rms": { "type": "number", "default": 0, diff --git a/src/context/simulation_context.cpp b/src/context/simulation_context.cpp index 60ffe6a55..b324b6047 100644 --- a/src/context/simulation_context.cpp +++ b/src/context/simulation_context.cpp @@ -482,26 +482,6 @@ Simulation_context::initialize() /* set the smearing */ smearing(cfg().parameters().smearing()); - /* create auxiliary mpi grid for symmetrization */ - auto make_mpi_grid_mt_sym = [](int na, int np) { - std::vector result; - for (int ia = 1; ia <= na; ia++) { - if (na % ia == 0 && np % ia == 0) { - result = std::vector({ia, np / ia}); - } - } - return result; - }; - - for (int ic = 0; ic < unit_cell().num_atom_symmetry_classes(); ic++) { - if (this->full_potential() || unit_cell().atom_symmetry_class(ic).atom_type().is_paw()) { - auto r = make_mpi_grid_mt_sym(unit_cell().atom_symmetry_class(ic).num_atoms(), this->comm().size()); - mpi_grid_mt_sym_.push_back(std::make_unique(r, this->comm())); - } else { - mpi_grid_mt_sym_.push_back(nullptr); - } - } - /* create G-vectors on the first call to update() */ update(); @@ -836,6 +816,27 @@ Simulation_context::update() } } + /* create auxiliary mpi grid for symmetrization */ + auto make_mpi_grid_mt_sym = [](int na, int np) { + std::vector result; + for (int ia = 1; ia <= na; ia++) { + if (na % ia == 0 && np % ia == 0) { + result = std::vector({ia, np / ia}); + } + } + return result; + }; + + mpi_grid_mt_sym_.clear(); + for (int ic = 0; ic < unit_cell().num_atom_symmetry_classes(); ic++) { + if (this->full_potential() || unit_cell().atom_symmetry_class(ic).atom_type().is_paw()) { + auto r = make_mpi_grid_mt_sym(unit_cell().atom_symmetry_class(ic).num_atoms(), this->comm().size()); + mpi_grid_mt_sym_.push_back(std::make_unique(r, this->comm())); + } else { + mpi_grid_mt_sym_.push_back(nullptr); + } + } + /* get new reciprocal vector */ auto rlv = unit_cell().reciprocal_lattice_vectors(); diff --git a/src/context/simulation_context.hpp b/src/context/simulation_context.hpp index c713df719..e83335037 100644 --- a/src/context/simulation_context.hpp +++ b/src/context/simulation_context.hpp @@ -59,24 +59,6 @@ print_memory_usage(OUT&& out__, std::string file_and_line__ = "") out__ << ", GPU: " << (gpu_mem >> 20) << " Mb"; } out__ << std::endl; - - std::vector labels = {"host"}; - std::vector mp = {&get_memory_pool(memory_t::host)}; - - int np{1}; - if (acc::num_devices() > 0) { - labels.push_back("host pinned"); - labels.push_back("device"); - mp.push_back(&get_memory_pool(memory_t::host_pinned)); - mp.push_back(&get_memory_pool(memory_t::device)); - np = 3; - } - - for (int i = 0; i < np; i++) { - out__ << "[mem.pool] " << labels[i] << ": total capacity: " << (mp[i]->total_size() >> 20) << " Mb, " - << "free: " << (mp[i]->free_size() >> 20) << " Mb, " - << "num.blocks: " << mp[i]->num_blocks() << std::endl; - } } /// Store all callback functions in one place. diff --git a/src/potential/potential.cpp b/src/potential/potential.cpp index bc71397ae..cbda1287c 100644 --- a/src/potential/potential.cpp +++ b/src/potential/potential.cpp @@ -41,6 +41,7 @@ Potential::Potential(Simulation_context& ctx__) } else { lmax = 2 * ctx_.unit_cell().lmax(); } + lmax = std::max(lmax, ctx_.cfg().settings().sht_lmax()); if (lmax >= 0) { sht_ = std::make_unique(ctx_.processing_unit(), lmax, ctx_.cfg().settings().sht_coverage());