Skip to content

Commit

Permalink
Small fixes (electronic-structure#768)
Browse files Browse the repository at this point in the history
A few fixes for missing includes.
  • Loading branch information
simonpintarelli authored Sep 21, 2022
1 parent a1d5ff1 commit c3d1855
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ output*.json
build/
spack-build*
spack-configure-args.txt
/.cache/
7 changes: 5 additions & 2 deletions src/band/davidson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#ifndef __DAVIDSON_HPP__
#define __DAVIDSON_HPP__

#include "k_point/k_point.hpp"
#include "band/band.hpp"
#include "hamiltonian/hamiltonian.hpp"
#include "utils/profiler.hpp"
#include "SDDK/wf_ortho.hpp"
#include "SDDK/wf_inner.hpp"
Expand Down Expand Up @@ -133,7 +136,7 @@ wave_function_factory(Simulation_context const& ctx__, K_point<T> const& kp__, i
\param [in] num_bands Number of eigen-states (bands) to compute.
\param [in] num_mag_dims Number of magnetic dimensions (0, 1 or 3).
\param [in,out] psi Wave-functions. On input they are used for the starting guess of the subspace basis.
On output they are the solutions of Hk|psi> = e S|psi> eigen-problem.
On output they are the solutions of Hk|psi> = e S|psi> eigen-problem.
\param [in] tolerance Lambda-function for the band energy tolerance.
\param [in] res_tol Residual tolerance.
\param [in] num_stpes Number of iterative steps.
Expand Down Expand Up @@ -172,7 +175,7 @@ davidson(Hamiltonian_k<real_type<T>>& Hk__, int num_bands__, int num_mag_dims__,
const int num_sc = nc_mag ? 2 : 1;

/* number of spinor components stored under the same band index */
const int num_spinors = (num_mag_dims__ == 1) ? 2 : 1;
const int num_spinors = (num_mag_dims__ == 1) ? 2 : 1;

/* number of spins */
const int num_spins = (num_mag_dims__ == 0) ? 1 : 2;
Expand Down
5 changes: 3 additions & 2 deletions src/linalg/eigenproblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "utils/profiler.hpp"
#include "linalg.hpp"
#include "SDDK/omp.hpp"
#include "eigensolver.hpp"

#if defined(SIRIUS_ELPA)
#include "elpa.hpp"
Expand Down Expand Up @@ -1957,13 +1958,13 @@ class Eigensolver_cuda: public Eigensolver

int solve(ftn_int matrix_size__, int nev__, sddk::dmatrix<std::complex<float>>& A__, float* eval__, sddk::dmatrix<std::complex<float>>& Z__)
{
PROFILE("Eigensolver_cuda|zheevdx");
PROFILE("Eigensolver_cuda|cheevdx");
return solve_(matrix_size__, nev__, A__, eval__, Z__);
}

int solve(ftn_int matrix_size__, int nev__, sddk::dmatrix<std::complex<double>>& A__, double* eval__, sddk::dmatrix<std::complex<double>>& Z__)
{
PROFILE("Eigensolver_cuda|cheevdx");
PROFILE("Eigensolver_cuda|zheevdx");
return solve_(matrix_size__, nev__, A__, eval__, Z__);
}

Expand Down

0 comments on commit c3d1855

Please sign in to comment.