Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions source/source_estate/module_dm/cal_dm_psi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,24 @@ void psiMulPsiMpi(const psi::Psi<double>& psi1,
const int nlocal = desc_dm[2];
const int nbands = desc_psi[3];

pdgemm_(&N_char,
&T_char,
&nlocal,
&nlocal,
&nbands,
&one_float,
ScalapackConnector::gemm(N_char,
T_char,
nlocal,
nlocal,
nbands,
one_float,
psi1.get_pointer(),
&one_int,
&one_int,
one_int,
one_int,
desc_psi,
psi2.get_pointer(),
&one_int,
&one_int,
one_int,
one_int,
desc_psi,
&zero_float,
zero_float,
dm_out,
&one_int,
&one_int,
one_int,
one_int,
desc_dm);
ModuleBase::timer::tick("psiMulPsiMpi", "pdgemm");
}
Expand All @@ -198,24 +198,24 @@ void psiMulPsiMpi(const psi::Psi<std::complex<double>>& psi1,
const char N_char = 'N', T_char = 'T';
const int nlocal = desc_dm[2];
const int nbands = desc_psi[3];
pzgemm_(&N_char,
&T_char,
&nlocal,
&nlocal,
&nbands,
&one_complex,
ScalapackConnector::gemm(N_char,
T_char,
nlocal,
nlocal,
nbands,
one_complex,
psi1.get_pointer(),
&one_int,
&one_int,
one_int,
one_int,
desc_psi,
psi2.get_pointer(),
&one_int,
&one_int,
one_int,
one_int,
desc_psi,
&zero_complex,
zero_complex,
dm_out,
&one_int,
&one_int,
one_int,
one_int,
desc_dm);
ModuleBase::timer::tick("psiMulPsiMpi", "pdgemm");
}
Expand All @@ -229,19 +229,19 @@ void psiMulPsi(const psi::Psi<double>& psi1, const psi::Psi<double>& psi2, doubl
const char N_char = 'N', T_char = 'T';
const int nlocal = psi1.get_nbasis();
const int nbands = psi1.get_nbands();
dgemm_(&N_char,
&T_char,
&nlocal,
&nlocal,
&nbands,
&one_float,
BlasConnector::gemm_cm(N_char,
T_char,
nlocal,
nlocal,
nbands,
one_float,
psi1.get_pointer(),
&nlocal,
nlocal,
psi2.get_pointer(),
&nlocal,
&zero_float,
nlocal,
zero_float,
dm_out,
&nlocal);
nlocal);
}

void psiMulPsi(const psi::Psi<std::complex<double>>& psi1,
Expand All @@ -254,19 +254,19 @@ void psiMulPsi(const psi::Psi<std::complex<double>>& psi1,
const int nbands = psi1.get_nbands();
const std::complex<double> one_complex = {1.0, 0.0};
const std::complex<double> zero_complex = {0.0, 0.0};
zgemm_(&N_char,
&T_char,
&nlocal,
&nlocal,
&nbands,
&one_complex,
BlasConnector::gemm_cm(N_char,
T_char,
nlocal,
nlocal,
nbands,
one_complex,
psi1.get_pointer(),
&nlocal,
nlocal,
psi2.get_pointer(),
&nlocal,
&zero_complex,
nlocal,
zero_complex,
dm_out,
&nlocal);
nlocal);
}

} // namespace elecstate
52 changes: 26 additions & 26 deletions source/source_io/output_mulliken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,24 +547,24 @@ void Output_Mulliken<std::complex<double>>::cal_orbMulP()
const char N_char = 'N';
const int one_int = 1;
const std::complex<double> one_float = {1.0, 0.0}, zero_float = {0.0, 0.0};
pzgemm_(&N_char,
&T_char,
&nw,
&nw,
&nw,
&one_float,
ScalapackConnector::gemm(N_char,
T_char,
nw,
nw,
nw,
one_float,
p_DMk,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc,
p_Sk,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc,
&zero_float,
zero_float,
mud.c,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc);
this->collect_MW(MecMulP, mud, nw, this->isk_[ik]);
#endif
Expand Down Expand Up @@ -597,24 +597,24 @@ void Output_Mulliken<double>::cal_orbMulP()
const char N_char = 'N';
const int one_int = 1;
const double one_float = 1.0, zero_float = 0.0;
pdgemm_(&N_char,
&T_char,
&nw,
&nw,
&nw,
&one_float,
ScalapackConnector::gemm(N_char,
T_char,
nw,
nw,
nw,
one_float,
p_DMk,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc,
p_Sk,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc,
&zero_float,
zero_float,
mud.c,
&one_int,
&one_int,
one_int,
one_int,
this->ParaV_->desc);
if (this->nspin_ == 1 || this->nspin_ == 2)
{
Expand Down
52 changes: 26 additions & 26 deletions source/source_io/to_wannier90_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,44 +423,44 @@ void toWannier90_LCAO::unkdotkb(const UnitCell& ucell,
ModuleBase::GlobalFunc::ZEROS(out_matrix, nloc);

#ifdef __MPI
pzgemm_(&transa,
&transb,
&Bands,
&nlocal,
&nlocal,
&alpha,
ScalapackConnector::gemm(transa,
transb,
Bands,
nlocal,
nlocal,
alpha,
&psi_in(ik, 0, 0),
&one,
&one,
one,
one,
this->ParaV->desc,
midmatrix,
&one,
&one,
one,
one,
this->ParaV->desc,
&beta,
beta,
C_matrix,
&one,
&one,
one,
one,
this->ParaV->desc);

pzgemm_(&transb,
&transb,
&Bands,
&Bands,
&nlocal,
&alpha,
ScalapackConnector::gemm(transb,
transb,
Bands,
Bands,
nlocal,
alpha,
C_matrix,
&one,
&one,
one,
one,
this->ParaV->desc,
&psi_in(ikb, 0, 0),
&one,
&one,
one,
one,
this->ParaV->desc,
&beta,
beta,
out_matrix,
&one,
&one,
one,
one,
this->ParaV->desc);
#endif

Expand Down
52 changes: 26 additions & 26 deletions source/source_io/unk_overlap_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,44 +563,44 @@ std::complex<double> unkOverlap_lcao::det_berryphase(const UnitCell& ucell,
std::complex<double> alpha = {1.0, 0.0}, beta = {0.0, 0.0};
int one = 1;
#ifdef __MPI
pzgemm_(&transa,
&transb,
&occBands,
&nlocal,
&nlocal,
&alpha,
ScalapackConnector::gemm(transa,
transb,
occBands,
nlocal,
nlocal,
alpha,
&psi_in[0](ik_L, 0, 0),
&one,
&one,
one,
one,
para_orb.desc,
midmatrix,
&one,
&one,
one,
one,
para_orb.desc,
&beta,
beta,
C_matrix,
&one,
&one,
one,
one,
para_orb.desc);

pzgemm_(&transb,
&transb,
&occBands,
&occBands,
&nlocal,
&alpha,
ScalapackConnector::gemm(transb,
transb,
occBands,
occBands,
nlocal,
alpha,
C_matrix,
&one,
&one,
one,
one,
para_orb.desc,
&psi_in[0](ik_R, 0, 0),
&one,
&one,
one,
one,
para_orb.desc,
&beta,
beta,
out_matrix,
&one,
&one,
one,
one,
para_orb.desc);

assert(para_orb.nrow>0);
Expand Down
22 changes: 11 additions & 11 deletions source/source_lcao/module_deepks/deepks_orbpre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector<TH>& dm_hl,
gemm_alpha = 2.0;
}

dgemm_(&transa,
&transb,
&row_size_nks,
&trace_alpha_size,
&col_size,
&gemm_alpha,
dm_array.data(),
&col_size,
BlasConnector::gemm(transb,
transa,
trace_alpha_size,
row_size_nks,
col_size,
gemm_alpha,
s_2t.data(),
&col_size,
&gemm_beta,
col_size,
dm_array.data(),
col_size,
gemm_beta,
g_1dmt.data(),
&row_size_nks);
row_size_nks);
} // ad2

for (int ik = 0; ik < nks; ik++)
Expand Down
Loading
Loading