Loading build-aux/summit.cmake +2 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,8 @@ set(MPIEXEC_PREFLAGS "-n 1 -g 1 -c 8" CACHE STRING # The flag "--smpiargs=none" is needed to execute tests with no MPI functionalities. set(SMPIARGS_FLAG_NOMPI "--smpiargs=none" CACHE STRING "Spectrum MPI argument list flag for serial tests.") # The flag "--smpiargs=-mxm" is a workaround (for now) to execute tests with MPI to avoid tests from failing. # It uses Mellanox's protocol and bypasses PAMI for MPI communications. set(SMPIARGS_FLAG_MPI "--smpiargs=-mxm" CACHE STRING "Spectrum MPI argument list flag for MPI tests.") # Let's keep this option in case we need it again in the future. set(SMPIARGS_FLAG_MPI "" CACHE STRING "Spectrum MPI argument list flag for MPI tests.") # Enable the GPU support. option(DCA_WITH_CUDA "Enable GPU support." ON) Loading build-aux/summitdev.cmakedeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line # Initial cache list for Summitdev # # Usage: cmake -C /path/to/this/file /path/to/DCA/source -D<option>=<value> ... set(TEST_RUNNER "jsrun" CACHE STRING "Command for executing (MPI) programs.") set(MPIEXEC_NUMPROC_FLAG "-a" CACHE STRING "Flag used by TEST_RUNNER to specify the number of processes.") set(MPIEXEC_PREFLAGS "-g1 -n1" CACHE STRING "Flags to pass to TEST_RUNNER directly before the executable to run.") option(DCA_WITH_CUDA "Enable GPU support." ON) set(CUDA_GPU_ARCH "sm_60" CACHE STRING "Name of the *real* architecture to build for.") set(MAGMA_DIR $ENV{OLCF_MAGMA_ROOT} CACHE PATH "Path to the MAGMA installation directory. Hint for CMake to find MAGMA.") set(FFTW_INCLUDE_DIR $ENV{OLCF_FFTW_ROOT}/include CACHE PATH "Path to fftw3.h.") set(FFTW_LIBRARY $ENV{OLCF_FFTW_ROOT}/lib/libfftw3.a CACHE FILEPATH "The FFTW3(-compatible) library.") cmake/dca_mpi.cmake +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ else() if (MPI_FOUND) set(DCA_HAVE_MPI TRUE CACHE INTERNAL "") dca_add_haves_define(DCA_HAVE_MPI) link_libraries(${MPI_CXX_LIBRARIES}) include_directories(${MPI_C_INCLUDE_PATH}) endif() endif() include/dca/phys/dca_analysis/bse_solver/bse_cluster_solver.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ void BseClusterSolver<ParametersType, DcaDataType, ScalarType>::load_G_II( int* coor_1 = new int[G_II.signature()]; auto& G4 = data_.get_G4(); // Get the first object/channel of the G4 container. auto& G4 = data_.get_G4()[0]; int* coor_2 = new int[G4.signature()]; for (int i = 0; i < G4.size(); i++) { Loading include/dca/phys/dca_data/dca_data.hpp +99 −44 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #define DCA_PHYS_DCA_DATA_DCA_DATA_HPP #include <algorithm> #include <cassert> #include <complex> #include <cstring> #include <iostream> Loading Loading @@ -47,6 +48,7 @@ #include "dca/phys/domains/time_and_frequency/frequency_exchange_domain.hpp" #include "dca/phys/domains/time_and_frequency/vertex_frequency_domain.hpp" #include "dca/phys/domains/time_and_frequency/time_domain.hpp" #include "dca/phys/error_computation_type.hpp" #include "dca/phys/four_point_type.hpp" #include "dca/phys/domains/cluster/cluster_domain_aliases.hpp" #include "dca/phys/models/traits.hpp" Loading Loading @@ -199,19 +201,16 @@ public: // Optional members getters. return *Sigma_err_; } auto& get_G4() { if (not G4_) G4_.reset(new TpGreensFunction("G4")); return *G4_; assert(!G4_.empty()); return G4_; } auto& get_G4_error() { if (not G4_err_) G4_err_.reset(new TpGreensFunction("G4-error")); return *G4_err_; assert(!G4_err_.empty()); return G4_err_; } auto& get_G4_stdv() { if (not G4_err_) G4_err_.reset(new TpGreensFunction("G4-stddev")); return *G4_err_; assert(!G4_err_.empty()); return G4_err_; } auto& get_non_density_interactions() { if (not non_density_interactions_) Loading @@ -228,8 +227,8 @@ private: // Optional members. std::unique_ptr<SpGreensFunction> G_k_w_err_; std::unique_ptr<SpRGreensFunction> G_r_w_err_; std::unique_ptr<SpGreensFunction> Sigma_err_; std::unique_ptr<TpGreensFunction> G4_; std::unique_ptr<TpGreensFunction> G4_err_; std::vector<TpGreensFunction> G4_; std::vector<TpGreensFunction> G4_err_; std::unique_ptr<func::function<double, func::dmn_variadic<NuDmn, NuDmn, NuDmn, NuDmn, RClusterDmn>>> non_density_interactions_; }; Loading Loading @@ -284,6 +283,65 @@ DcaData<Parameters>::DcaData(Parameters& parameters_ref) orbital_occupancy("orbital_occupancy") { H_symmetry = -1; // Reserve storage in advance such that we don't have to copy elements when we fill the vector. // We want to avoid copies because function's copy ctor does not copy the name (and because copies // are expensive). G4_.reserve(parameters_.numG4Channels()); // Allocate memory for G4. // Ensure backward compatibility. if (parameters_.get_four_point_type() != NONE) G4_.emplace_back("G4"); // Check which four point types to accumulate. else { if (parameters_.accumulateG4ParticleHoleTransverse()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_TRANSVERSE)); if (parameters_.accumulateG4ParticleHoleMagnetic()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_MAGNETIC)); if (parameters_.accumulateG4ParticleHoleCharge()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_CHARGE)); if (parameters_.accumulateG4ParticleHoleLongitudinalUpUp()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_UP)); if (parameters_.accumulateG4ParticleHoleLongitudinalUpDown()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_DOWN)); if (parameters_.accumulateG4ParticleParticleUpDown()) G4_.emplace_back("G4_" + toString(PARTICLE_PARTICLE_UP_DOWN)); } // Allocate memory for error on G4. if (parameters_.get_error_computation_type() != ErrorComputationType::NONE) { G4_err_.reserve(parameters_.numG4Channels()); if (parameters_.get_four_point_type() != NONE) G4_err_.emplace_back("G4-error"); else { if (parameters_.accumulateG4ParticleHoleTransverse()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_TRANSVERSE) + "_err"); if (parameters_.accumulateG4ParticleHoleMagnetic()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_MAGNETIC) + "_err"); if (parameters_.accumulateG4ParticleHoleCharge()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_CHARGE) + "_err"); if (parameters_.accumulateG4ParticleHoleLongitudinalUpUp()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_UP) + "_err"); if (parameters_.accumulateG4ParticleHoleLongitudinalUpDown()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_DOWN) + "_err"); if (parameters_.accumulateG4ParticleParticleUpDown()) G4_err_.emplace_back("G4_" + toString(PARTICLE_PARTICLE_UP_DOWN) + "_err"); } } } template <class Parameters> Loading Loading @@ -316,53 +374,38 @@ void DcaData<Parameters>::read(std::string filename) { concurrency_.broadcast_object(Sigma); if (parameters_.get_four_point_type() != NONE) { if (parameters_.accumulateG4()) { concurrency_.broadcast_object(G_k_w); concurrency_.broadcast_object(get_G4()); for (auto& G4_channel : G4_) concurrency_.broadcast_object(G4_channel); } } template <class Parameters> template <typename Reader> void DcaData<Parameters>::read(Reader& reader) { std::string four_point_type = "NONE"; { reader.open_group("parameters"); { reader.open_group("physics"); reader.execute("chemical-potential", parameters_.get_chemical_potential()); reader.close_group(); } { reader.open_group("four-point"); reader.execute("type", four_point_type); reader.close_group(); } reader.close_group(); } { reader.open_group("functions"); reader.execute(Sigma); if (four_point_type != static_cast<const std::string>("NONE")) { if (parameters_.accumulateG4()) { reader.execute(G_k_w); reader.execute(get_G4()); for (auto& G4_channel : G4_) reader.execute(G4_channel); } reader.close_group(); } } template <class Parameters> void DcaData<Parameters>::write(std::string file_name) { Loading Loading @@ -455,8 +498,20 @@ void DcaData<Parameters>::write(Writer& writer) { writer.execute(G0_r_t_cluster_excluded); } writer.execute(G4_); writer.execute(G4_err_); if (parameters_.accumulateG4()) { if (!(parameters_.dump_cluster_Greens_functions())) { writer.execute(G_k_w); writer.execute(G_k_w_err_); } for (const auto& G4_channel : G4_) writer.execute(G4_channel); if (parameters_.get_error_computation_type() != ErrorComputationType::NONE) { for (const auto& G4_channel_err : G4_err_) writer.execute(G4_channel_err); } } writer.close_group(); } Loading Loading
build-aux/summit.cmake +2 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,8 @@ set(MPIEXEC_PREFLAGS "-n 1 -g 1 -c 8" CACHE STRING # The flag "--smpiargs=none" is needed to execute tests with no MPI functionalities. set(SMPIARGS_FLAG_NOMPI "--smpiargs=none" CACHE STRING "Spectrum MPI argument list flag for serial tests.") # The flag "--smpiargs=-mxm" is a workaround (for now) to execute tests with MPI to avoid tests from failing. # It uses Mellanox's protocol and bypasses PAMI for MPI communications. set(SMPIARGS_FLAG_MPI "--smpiargs=-mxm" CACHE STRING "Spectrum MPI argument list flag for MPI tests.") # Let's keep this option in case we need it again in the future. set(SMPIARGS_FLAG_MPI "" CACHE STRING "Spectrum MPI argument list flag for MPI tests.") # Enable the GPU support. option(DCA_WITH_CUDA "Enable GPU support." ON) Loading
build-aux/summitdev.cmakedeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line # Initial cache list for Summitdev # # Usage: cmake -C /path/to/this/file /path/to/DCA/source -D<option>=<value> ... set(TEST_RUNNER "jsrun" CACHE STRING "Command for executing (MPI) programs.") set(MPIEXEC_NUMPROC_FLAG "-a" CACHE STRING "Flag used by TEST_RUNNER to specify the number of processes.") set(MPIEXEC_PREFLAGS "-g1 -n1" CACHE STRING "Flags to pass to TEST_RUNNER directly before the executable to run.") option(DCA_WITH_CUDA "Enable GPU support." ON) set(CUDA_GPU_ARCH "sm_60" CACHE STRING "Name of the *real* architecture to build for.") set(MAGMA_DIR $ENV{OLCF_MAGMA_ROOT} CACHE PATH "Path to the MAGMA installation directory. Hint for CMake to find MAGMA.") set(FFTW_INCLUDE_DIR $ENV{OLCF_FFTW_ROOT}/include CACHE PATH "Path to fftw3.h.") set(FFTW_LIBRARY $ENV{OLCF_FFTW_ROOT}/lib/libfftw3.a CACHE FILEPATH "The FFTW3(-compatible) library.")
cmake/dca_mpi.cmake +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ else() if (MPI_FOUND) set(DCA_HAVE_MPI TRUE CACHE INTERNAL "") dca_add_haves_define(DCA_HAVE_MPI) link_libraries(${MPI_CXX_LIBRARIES}) include_directories(${MPI_C_INCLUDE_PATH}) endif() endif()
include/dca/phys/dca_analysis/bse_solver/bse_cluster_solver.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ void BseClusterSolver<ParametersType, DcaDataType, ScalarType>::load_G_II( int* coor_1 = new int[G_II.signature()]; auto& G4 = data_.get_G4(); // Get the first object/channel of the G4 container. auto& G4 = data_.get_G4()[0]; int* coor_2 = new int[G4.signature()]; for (int i = 0; i < G4.size(); i++) { Loading
include/dca/phys/dca_data/dca_data.hpp +99 −44 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #define DCA_PHYS_DCA_DATA_DCA_DATA_HPP #include <algorithm> #include <cassert> #include <complex> #include <cstring> #include <iostream> Loading Loading @@ -47,6 +48,7 @@ #include "dca/phys/domains/time_and_frequency/frequency_exchange_domain.hpp" #include "dca/phys/domains/time_and_frequency/vertex_frequency_domain.hpp" #include "dca/phys/domains/time_and_frequency/time_domain.hpp" #include "dca/phys/error_computation_type.hpp" #include "dca/phys/four_point_type.hpp" #include "dca/phys/domains/cluster/cluster_domain_aliases.hpp" #include "dca/phys/models/traits.hpp" Loading Loading @@ -199,19 +201,16 @@ public: // Optional members getters. return *Sigma_err_; } auto& get_G4() { if (not G4_) G4_.reset(new TpGreensFunction("G4")); return *G4_; assert(!G4_.empty()); return G4_; } auto& get_G4_error() { if (not G4_err_) G4_err_.reset(new TpGreensFunction("G4-error")); return *G4_err_; assert(!G4_err_.empty()); return G4_err_; } auto& get_G4_stdv() { if (not G4_err_) G4_err_.reset(new TpGreensFunction("G4-stddev")); return *G4_err_; assert(!G4_err_.empty()); return G4_err_; } auto& get_non_density_interactions() { if (not non_density_interactions_) Loading @@ -228,8 +227,8 @@ private: // Optional members. std::unique_ptr<SpGreensFunction> G_k_w_err_; std::unique_ptr<SpRGreensFunction> G_r_w_err_; std::unique_ptr<SpGreensFunction> Sigma_err_; std::unique_ptr<TpGreensFunction> G4_; std::unique_ptr<TpGreensFunction> G4_err_; std::vector<TpGreensFunction> G4_; std::vector<TpGreensFunction> G4_err_; std::unique_ptr<func::function<double, func::dmn_variadic<NuDmn, NuDmn, NuDmn, NuDmn, RClusterDmn>>> non_density_interactions_; }; Loading Loading @@ -284,6 +283,65 @@ DcaData<Parameters>::DcaData(Parameters& parameters_ref) orbital_occupancy("orbital_occupancy") { H_symmetry = -1; // Reserve storage in advance such that we don't have to copy elements when we fill the vector. // We want to avoid copies because function's copy ctor does not copy the name (and because copies // are expensive). G4_.reserve(parameters_.numG4Channels()); // Allocate memory for G4. // Ensure backward compatibility. if (parameters_.get_four_point_type() != NONE) G4_.emplace_back("G4"); // Check which four point types to accumulate. else { if (parameters_.accumulateG4ParticleHoleTransverse()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_TRANSVERSE)); if (parameters_.accumulateG4ParticleHoleMagnetic()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_MAGNETIC)); if (parameters_.accumulateG4ParticleHoleCharge()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_CHARGE)); if (parameters_.accumulateG4ParticleHoleLongitudinalUpUp()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_UP)); if (parameters_.accumulateG4ParticleHoleLongitudinalUpDown()) G4_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_DOWN)); if (parameters_.accumulateG4ParticleParticleUpDown()) G4_.emplace_back("G4_" + toString(PARTICLE_PARTICLE_UP_DOWN)); } // Allocate memory for error on G4. if (parameters_.get_error_computation_type() != ErrorComputationType::NONE) { G4_err_.reserve(parameters_.numG4Channels()); if (parameters_.get_four_point_type() != NONE) G4_err_.emplace_back("G4-error"); else { if (parameters_.accumulateG4ParticleHoleTransverse()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_TRANSVERSE) + "_err"); if (parameters_.accumulateG4ParticleHoleMagnetic()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_MAGNETIC) + "_err"); if (parameters_.accumulateG4ParticleHoleCharge()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_CHARGE) + "_err"); if (parameters_.accumulateG4ParticleHoleLongitudinalUpUp()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_UP) + "_err"); if (parameters_.accumulateG4ParticleHoleLongitudinalUpDown()) G4_err_.emplace_back("G4_" + toString(PARTICLE_HOLE_LONGITUDINAL_UP_DOWN) + "_err"); if (parameters_.accumulateG4ParticleParticleUpDown()) G4_err_.emplace_back("G4_" + toString(PARTICLE_PARTICLE_UP_DOWN) + "_err"); } } } template <class Parameters> Loading Loading @@ -316,53 +374,38 @@ void DcaData<Parameters>::read(std::string filename) { concurrency_.broadcast_object(Sigma); if (parameters_.get_four_point_type() != NONE) { if (parameters_.accumulateG4()) { concurrency_.broadcast_object(G_k_w); concurrency_.broadcast_object(get_G4()); for (auto& G4_channel : G4_) concurrency_.broadcast_object(G4_channel); } } template <class Parameters> template <typename Reader> void DcaData<Parameters>::read(Reader& reader) { std::string four_point_type = "NONE"; { reader.open_group("parameters"); { reader.open_group("physics"); reader.execute("chemical-potential", parameters_.get_chemical_potential()); reader.close_group(); } { reader.open_group("four-point"); reader.execute("type", four_point_type); reader.close_group(); } reader.close_group(); } { reader.open_group("functions"); reader.execute(Sigma); if (four_point_type != static_cast<const std::string>("NONE")) { if (parameters_.accumulateG4()) { reader.execute(G_k_w); reader.execute(get_G4()); for (auto& G4_channel : G4_) reader.execute(G4_channel); } reader.close_group(); } } template <class Parameters> void DcaData<Parameters>::write(std::string file_name) { Loading Loading @@ -455,8 +498,20 @@ void DcaData<Parameters>::write(Writer& writer) { writer.execute(G0_r_t_cluster_excluded); } writer.execute(G4_); writer.execute(G4_err_); if (parameters_.accumulateG4()) { if (!(parameters_.dump_cluster_Greens_functions())) { writer.execute(G_k_w); writer.execute(G_k_w_err_); } for (const auto& G4_channel : G4_) writer.execute(G4_channel); if (parameters_.get_error_computation_type() != ErrorComputationType::NONE) { for (const auto& G4_channel_err : G4_err_) writer.execute(G4_channel_err); } } writer.close_group(); } Loading