Skip to content

Commit

Permalink
start v6.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
toxa81 committed Apr 27, 2020
1 parent 0c5bc24 commit 5aebc96
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12)

project(SIRIUS VERSION 6.5.3)
project(SIRIUS VERSION 6.5.4)

# set language and standard
enable_language(CXX Fortran)
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "SIRIUS"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "6.5.1"
PROJECT_NUMBER = "6.5.3"

# 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
Expand Down
3 changes: 2 additions & 1 deletion src/simulation_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,8 @@ void Simulation_context::generate_phase_factors(int iat__, mdarray<double_comple

void Simulation_context::print_memory_usage(const char *file__, int line__)
{
if (comm().rank() == 0 && control().print_memory_usage_ && control().verbosity_ >= 1) {
auto pmu = utils::get_env<int>("SIRIUS_PRINT_MEMORY_USAGE");
if (comm().rank() == 0 && ((control().print_memory_usage_ && control().verbosity_ >= 1) || (pmu && *pmu))) {
sirius::print_memory_usage(file__, line__);

std::vector<std::string> labels = {"host"};
Expand Down
17 changes: 14 additions & 3 deletions src/sirius.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,20 @@ inline void finalize(bool call_mpi_fin__ = true, bool reset_device__ = true, boo

/** \mainpage Welcome to SIRIUS
SIRIUS is a domain-specific library for electronic structure calculations. It supports full-potential linearized
augmented plane wave (FP-LAPW) and pseudopotential plane wave (PP-PW) methods with ultrasoft, norm-conserving and PAW
flavors of pseudopotential and is designed to work with codes such as Exciting, Elk and Quantum ESPRESSO.
SIRIUS is a domain specific library for electronic structure calculations. It implements pseudopotential plane
wave (PP-PW) and full potential linearized augmented plane wave (FP-LAPW) methods and is designed for
GPU acceleration of popular community codes such as Exciting, Elk and Quantum ESPRESSO.
SIRIUS is written in C++11 with MPI, OpenMP and CUDA/ROCm programming models. SIRIUS is organised as a
collection of classes that abstract away the different building blocks of DFT self-consistency cycle.
For a quick start please refer to the main development page at
<a href="https://github.com/electronic-structure/SIRIUS">GitHub</a>.
The generated Fortran API is described here: generated.f90
The frequent variable names are listed on the page \ref stdvarname.
We use the following \ref coding.
*/

Expand Down
15 changes: 5 additions & 10 deletions src/utils/env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,18 @@ namespace utils {
template <typename T>
inline T const* get_env(std::string const& name__)
{
static std::map<std::string, std::pair<bool, T>> map_name;
static std::map<std::string, T*> map_name;
if (map_name.count(name__) == 0) {
/* first time the function is called */
const char* raw_str = std::getenv(name__.c_str());
if (raw_str == NULL) {
map_name[name__] = std::make_pair(false, T());
map_name[name__] = nullptr;
} else {
T var;
std::istringstream(std::string(raw_str)) >> var;
map_name[name__] = std::make_pair(true, var);
map_name[name__] = new T;
std::istringstream(std::string(raw_str)) >> (*map_name[name__]);
}
}
if (map_name[name__].first == false) {
return nullptr;
} else {
return &map_name[name__].second;
}
return map_name[name__];
}

} // namespace utils
Expand Down

0 comments on commit 5aebc96

Please sign in to comment.