Skip to content

Commit

Permalink
Merge pull request QMCPACK#4816 from rcclay/complex_orb_opt_fix
Browse files Browse the repository at this point in the history
Backend Bug and Build Fixes for RotatedSPOs when QMC_COMPLEX=1
  • Loading branch information
ye-luo authored Nov 21, 2023
2 parents 33d8b76 + 7adcae6 commit 27c8838
Show file tree
Hide file tree
Showing 10 changed files with 445 additions and 201 deletions.
37 changes: 37 additions & 0 deletions src/Platforms/CPU/BLAS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,43 @@ struct LAPACK
sgeev(jobvl, jobvr, n, a, lda, alphar, alphai, vl, ldvl, vr, ldvr, work, lwork, info);
}

inline static void geev(char* jobvl,
char* jobvr,
int* n,
std::complex<double>* a,
int* lda,
std::complex<double>* alpha,
std::complex<double>* vl,
int* ldvl,
std::complex<double>* vr,
int* ldvr,
std::complex<double>* work,
int* lwork,
double* rwork,
int* info)
{
zgeev(jobvl, jobvr, n, a, lda, alpha, vl, ldvl, vr, ldvr, work, lwork, rwork, info);
}

inline static void geev(char* jobvl,
char* jobvr,
int* n,
std::complex<float>* a,
int* lda,
std::complex<float>* alpha,
std::complex<float>* vl,
int* ldvl,
std::complex<float>* vr,
int* ldvr,
std::complex<float>* work,
int* lwork,
float* rwork,
int* info)
{
cgeev(jobvl, jobvr, n, a, lda, alpha, vl, ldvl, vr, ldvr, work, lwork, rwork, info);
}


inline static void ggev(char* jobvl,
char* jobvr,
int* n,
Expand Down
32 changes: 32 additions & 0 deletions src/Platforms/CPU/Blasf.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
#define zgesvd zgesvd_
#define dgeev dgeev_
#define sgeev sgeev_
#define zgeev zgeev_
#define cgeev cgeev_
#define dggev dggev_
#define sggev sggev_
#define dger dger_
Expand Down Expand Up @@ -454,6 +456,36 @@ extern "C"
int* LWORK,
int* INFO);

void zgeev(char* JOBVL,
char* JOBVR,
int* N,
std::complex<double>* A,
int* LDA,
std::complex<double>* ALPHA,
std::complex<double>* VL,
int* LDVL,
std::complex<double>* VR,
int* LDVR,
std::complex<double>* WORK,
int* LWORK,
double* RWORK,
int* INFO);

void cgeev(char* JOBVL,
char* JOBVR,
int* N,
std::complex<float>* A,
int* LDA,
std::complex<float>* ALPHA,
std::complex<float>* VL,
int* LDVL,
std::complex<float>* VR,
int* LDVR,
std::complex<float>* WORK,
int* LWORK,
float* RWORK,
int* INFO);

void dggev(char* JOBVL,
char* JOBVR,
int* N,
Expand Down
7 changes: 2 additions & 5 deletions src/QMCWaveFunctions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ set(WFBASE_SRCS
HarmonicOscillator/SHOSet.cpp
HarmonicOscillator/SHOSetBuilder.cpp
ExampleHeBuilder.cpp
ExampleHeComponent.cpp)

if(NOT QMC_COMPLEX)
set(WFBASE_SRCS ${WFBASE_SRCS} RotatedSPOs.cpp)
endif(NOT QMC_COMPLEX)
ExampleHeComponent.cpp
RotatedSPOs.cpp)

if(QMC_COMPLEX)
set(WFBASE_SRCS ${WFBASE_SRCS} SpinorSet.cpp)
Expand Down
Loading

0 comments on commit 27c8838

Please sign in to comment.