mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-07-22 18:57:40 +02:00
Deactivated hpc versions woodburry
This commit is contained in:
parent
574cde88e5
commit
fd9ce7ed5e
@ -365,11 +365,11 @@ qmckl_exit_code qmckl_sm_naive_hpc(
|
|||||||
const uint64_t LDS,
|
const uint64_t LDS,
|
||||||
const uint64_t Dim,
|
const uint64_t Dim,
|
||||||
const uint64_t N_updates,
|
const uint64_t N_updates,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
|
|
||||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||||
return qmckl_failwith( context,
|
return qmckl_failwith( context,
|
||||||
@ -435,11 +435,11 @@ qmckl_exit_code qmckl_sm_naive_hpc(
|
|||||||
static inline qmckl_exit_code qmckl_sm_naive_{Dim}(
|
static inline qmckl_exit_code qmckl_sm_naive_{Dim}(
|
||||||
const qmckl_context context,
|
const qmckl_context context,
|
||||||
const uint64_t N_updates,
|
const uint64_t N_updates,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
|
|
||||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||||
return qmckl_failwith(context,
|
return qmckl_failwith(context,
|
||||||
@ -561,13 +561,14 @@ qmckl_exit_code qmckl_sm_naive(const qmckl_context context,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_HPC
|
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
|
||||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||||
switch (Dim) {
|
switch (Dim) {
|
||||||
<<naive_switch-case_generator()>>
|
<<naive_switch-case_generator()>>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Updating smaller sub-matrix
|
else
|
||||||
|
{ // Updating smaller sub-matrix
|
||||||
return qmckl_sm_naive_hpc(
|
return qmckl_sm_naive_hpc(
|
||||||
context,
|
context,
|
||||||
LDS,
|
LDS,
|
||||||
@ -1033,14 +1034,14 @@ qmckl_exit_code qmckl_sm_splitting_core_hpc(
|
|||||||
uint64_t LDS,
|
uint64_t LDS,
|
||||||
uint64_t Dim,
|
uint64_t Dim,
|
||||||
uint64_t N_updates,
|
uint64_t N_updates,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict later_updates,
|
double* restrict later_updates,
|
||||||
uint64_t* __restrict later_index,
|
uint64_t* restrict later_index,
|
||||||
uint64_t* __restrict later,
|
uint64_t* restrict later,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
|
|
||||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||||
return qmckl_failwith(
|
return qmckl_failwith(
|
||||||
@ -1117,14 +1118,14 @@ qmckl_exit_code qmckl_sm_splitting_core_hpc(
|
|||||||
static inline qmckl_exit_code qmckl_sm_splitting_core_{Dim}(
|
static inline qmckl_exit_code qmckl_sm_splitting_core_{Dim}(
|
||||||
const qmckl_context context,
|
const qmckl_context context,
|
||||||
uint64_t N_updates,
|
uint64_t N_updates,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict later_updates,
|
double* restrict later_updates,
|
||||||
uint64_t* __restrict later_index,
|
uint64_t* restrict later_index,
|
||||||
uint64_t* __restrict later,
|
uint64_t* restrict later,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
|
|
||||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||||
return qmckl_failwith(
|
return qmckl_failwith(
|
||||||
@ -1252,7 +1253,7 @@ qmckl_exit_code qmckl_sm_splitting_core(
|
|||||||
uint64_t* later,
|
uint64_t* later,
|
||||||
double* determinant) {
|
double* determinant) {
|
||||||
|
|
||||||
#ifdef HAVE_HPC
|
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
|
||||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||||
switch (Dim) {
|
switch (Dim) {
|
||||||
<<slagel_splitting_switch-case_generator()>>
|
<<slagel_splitting_switch-case_generator()>>
|
||||||
@ -1662,11 +1663,11 @@ qmckl_exit_code qmckl_woodbury_2x2_doc (
|
|||||||
qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
||||||
const uint64_t LDS,
|
const uint64_t LDS,
|
||||||
const uint64_t Dim,
|
const uint64_t Dim,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
/*
|
/*
|
||||||
C := S^{-1} * U, dim x 2
|
C := S^{-1} * U, dim x 2
|
||||||
B := 1 + V * C, 2 x 2
|
B := 1 + V * C, 2 x 2
|
||||||
@ -1688,8 +1689,6 @@ qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
|||||||
for (uint64_t i = 0; i < Dim; i++) {
|
for (uint64_t i = 0; i < Dim; i++) {
|
||||||
C[i * 2] = 0;
|
C[i * 2] = 0;
|
||||||
C[i * 2 + 1] = 0;
|
C[i * 2 + 1] = 0;
|
||||||
IVDEP
|
|
||||||
ALIGNED
|
|
||||||
for (uint64_t k = 0; k < LDS; k++) {
|
for (uint64_t k = 0; k < LDS; k++) {
|
||||||
C[i * 2] += Slater_inv[i * LDS + k] * Updates[k];
|
C[i * 2] += Slater_inv[i * LDS + k] * Updates[k];
|
||||||
C[i * 2 + 1] += Slater_inv[i * LDS + k] * Updates[LDS + k];
|
C[i * 2 + 1] += Slater_inv[i * LDS + k] * Updates[LDS + k];
|
||||||
@ -1723,8 +1722,6 @@ qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
|||||||
double __attribute__((aligned(8))) tmp[2 * LDS];
|
double __attribute__((aligned(8))) tmp[2 * LDS];
|
||||||
double* r1dim = &(Slater_inv[row1 * LDS]);
|
double* r1dim = &(Slater_inv[row1 * LDS]);
|
||||||
double* r2dim = &(Slater_inv[row2 * LDS]);
|
double* r2dim = &(Slater_inv[row2 * LDS]);
|
||||||
IVDEP
|
|
||||||
ALIGNED
|
|
||||||
for (uint64_t j = 0; j < LDS; j++) {
|
for (uint64_t j = 0; j < LDS; j++) {
|
||||||
tmp[j] = Binv[0] * r1dim[j] + Binv[1] * r2dim[j];
|
tmp[j] = Binv[0] * r1dim[j] + Binv[1] * r2dim[j];
|
||||||
tmp[LDS + j] = Binv[2] * r1dim[j] + Binv[3] * r2dim[j];
|
tmp[LDS + j] = Binv[2] * r1dim[j] + Binv[3] * r2dim[j];
|
||||||
@ -1732,8 +1729,6 @@ qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
|||||||
|
|
||||||
// Compute (S^T)^{-1} - C * tmp : Dim x LDS
|
// Compute (S^T)^{-1} - C * tmp : Dim x LDS
|
||||||
for (uint64_t i = 0; i < Dim; i++) {
|
for (uint64_t i = 0; i < Dim; i++) {
|
||||||
IVDEP
|
|
||||||
ALIGNED
|
|
||||||
for (uint64_t j = 0; j < LDS; j++) {
|
for (uint64_t j = 0; j < LDS; j++) {
|
||||||
Slater_inv[i * LDS + j] -= C[i * 2] * tmp[j];
|
Slater_inv[i * LDS + j] -= C[i * 2] * tmp[j];
|
||||||
Slater_inv[i * LDS + j] -= C[i * 2 + 1] * tmp[LDS + j];
|
Slater_inv[i * LDS + j] -= C[i * 2 + 1] * tmp[LDS + j];
|
||||||
@ -1748,11 +1743,11 @@ qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
|
|||||||
#+begin_src c
|
#+begin_src c
|
||||||
static inline qmckl_exit_code qmckl_woodbury_2x2_{Dim}(
|
static inline qmckl_exit_code qmckl_woodbury_2x2_{Dim}(
|
||||||
const qmckl_context context,
|
const qmckl_context context,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
/*
|
/*
|
||||||
C := S^{-1} * U, dim x 2
|
C := S^{-1} * U, dim x 2
|
||||||
B := 1 + V * C, 2 x 2
|
B := 1 + V * C, 2 x 2
|
||||||
@ -1883,7 +1878,7 @@ qmckl_exit_code qmckl_woodbury_2x2(const qmckl_context context,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_HPC
|
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
|
||||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||||
switch (Dim) {
|
switch (Dim) {
|
||||||
<<woodbury_2x2_switch-case_generator()>>
|
<<woodbury_2x2_switch-case_generator()>>
|
||||||
@ -2314,11 +2309,11 @@ qmckl_exit_code qmckl_woodbury_3x3_doc (
|
|||||||
qmckl_exit_code qmckl_woodbury_3x3_hpc(const qmckl_context context,
|
qmckl_exit_code qmckl_woodbury_3x3_hpc(const qmckl_context context,
|
||||||
const uint64_t LDS,
|
const uint64_t LDS,
|
||||||
const uint64_t Dim,
|
const uint64_t Dim,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
/*
|
/*
|
||||||
C := S^{-1} * U, dim x 3
|
C := S^{-1} * U, dim x 3
|
||||||
B := 1 + V * C, 3 x 3
|
B := 1 + V * C, 3 x 3
|
||||||
@ -2420,11 +2415,11 @@ qmckl_exit_code qmckl_woodbury_3x3_hpc(const qmckl_context context,
|
|||||||
#+begin_src c
|
#+begin_src c
|
||||||
static inline qmckl_exit_code qmckl_woodbury_3x3_{Dim}(
|
static inline qmckl_exit_code qmckl_woodbury_3x3_{Dim}(
|
||||||
const qmckl_context context,
|
const qmckl_context context,
|
||||||
const double* __restrict Updates,
|
const double* restrict Updates,
|
||||||
const uint64_t* __restrict Updates_index,
|
const uint64_t* restrict Updates_index,
|
||||||
const double breakdown,
|
const double breakdown,
|
||||||
double* __restrict Slater_inv,
|
double* restrict Slater_inv,
|
||||||
double* __restrict determinant) {
|
double* restrict determinant) {
|
||||||
/*
|
/*
|
||||||
C := S^{-1} * U, dim x 3
|
C := S^{-1} * U, dim x 3
|
||||||
B := 1 + V * C, 3 x 3
|
B := 1 + V * C, 3 x 3
|
||||||
@ -2575,7 +2570,7 @@ qmckl_exit_code qmckl_woodbury_3x3(const qmckl_context context,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_HPC
|
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
|
||||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||||
switch (Dim) {
|
switch (Dim) {
|
||||||
<<woodbury_3x3_switch-case_generator()>>
|
<<woodbury_3x3_switch-case_generator()>>
|
||||||
@ -3037,7 +3032,7 @@ qmckl_exit_code qmckl_sm_splitting(
|
|||||||
"qmckl_sm_splitting",
|
"qmckl_sm_splitting",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_HPC
|
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
|
||||||
return qmckl_sm_splitting_hpc(
|
return qmckl_sm_splitting_hpc(
|
||||||
context,
|
context,
|
||||||
LDS,
|
LDS,
|
||||||
|
Loading…
Reference in New Issue
Block a user