Deactivated hpc versions woodburry

This commit is contained in:
Anthony Scemama 2024-02-24 01:18:06 +02:00
parent 574cde88e5
commit fd9ce7ed5e
1 changed files with 45 additions and 50 deletions

View File

@ -365,11 +365,11 @@ qmckl_exit_code qmckl_sm_naive_hpc(
const uint64_t LDS,
const uint64_t Dim,
const uint64_t N_updates,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
if (qmckl_context_check(context) == QMCKL_NULL_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}(
const qmckl_context context,
const uint64_t N_updates,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
return qmckl_failwith(context,
@ -561,13 +561,14 @@ qmckl_exit_code qmckl_sm_naive(const qmckl_context context,
NULL);
}
#ifdef HAVE_HPC
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
switch (Dim) {
<<naive_switch-case_generator()>>
}
}
else { // Updating smaller sub-matrix
else
{ // Updating smaller sub-matrix
return qmckl_sm_naive_hpc(
context,
LDS,
@ -1033,14 +1034,14 @@ qmckl_exit_code qmckl_sm_splitting_core_hpc(
uint64_t LDS,
uint64_t Dim,
uint64_t N_updates,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict later_updates,
uint64_t* __restrict later_index,
uint64_t* __restrict later,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict later_updates,
uint64_t* restrict later_index,
uint64_t* restrict later,
double* restrict determinant) {
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
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}(
const qmckl_context context,
uint64_t N_updates,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict later_updates,
uint64_t* __restrict later_index,
uint64_t* __restrict later,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict later_updates,
uint64_t* restrict later_index,
uint64_t* restrict later,
double* restrict determinant) {
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
return qmckl_failwith(
@ -1252,7 +1253,7 @@ qmckl_exit_code qmckl_sm_splitting_core(
uint64_t* later,
double* determinant) {
#ifdef HAVE_HPC
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
switch (Dim) {
<<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,
const uint64_t LDS,
const uint64_t Dim,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
/*
C := S^{-1} * U, dim 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++) {
C[i * 2] = 0;
C[i * 2 + 1] = 0;
IVDEP
ALIGNED
for (uint64_t k = 0; k < LDS; k++) {
C[i * 2] += Slater_inv[i * LDS + k] * Updates[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* r1dim = &(Slater_inv[row1 * LDS]);
double* r2dim = &(Slater_inv[row2 * LDS]);
IVDEP
ALIGNED
for (uint64_t j = 0; j < LDS; j++) {
tmp[j] = Binv[0] * r1dim[j] + Binv[1] * 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
for (uint64_t i = 0; i < Dim; i++) {
IVDEP
ALIGNED
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 + 1] * tmp[LDS + j];
@ -1748,11 +1743,11 @@ qmckl_exit_code qmckl_woodbury_2x2_hpc(const qmckl_context context,
#+begin_src c
static inline qmckl_exit_code qmckl_woodbury_2x2_{Dim}(
const qmckl_context context,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
/*
C := S^{-1} * U, dim x 2
B := 1 + V * C, 2 x 2
@ -1883,7 +1878,7 @@ qmckl_exit_code qmckl_woodbury_2x2(const qmckl_context context,
NULL);
}
#ifdef HAVE_HPC
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
switch (Dim) {
<<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,
const uint64_t LDS,
const uint64_t Dim,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
/*
C := S^{-1} * U, dim 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
static inline qmckl_exit_code qmckl_woodbury_3x3_{Dim}(
const qmckl_context context,
const double* __restrict Updates,
const uint64_t* __restrict Updates_index,
const double* restrict Updates,
const uint64_t* restrict Updates_index,
const double breakdown,
double* __restrict Slater_inv,
double* __restrict determinant) {
double* restrict Slater_inv,
double* restrict determinant) {
/*
C := S^{-1} * U, dim x 3
B := 1 + V * C, 3 x 3
@ -2575,7 +2570,7 @@ qmckl_exit_code qmckl_woodbury_3x3(const qmckl_context context,
NULL);
}
#ifdef HAVE_HPC
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
switch (Dim) {
<<woodbury_3x3_switch-case_generator()>>
@ -3037,7 +3032,7 @@ qmckl_exit_code qmckl_sm_splitting(
"qmckl_sm_splitting",
NULL);
}
#ifdef HAVE_HPC
#ifdef HAVE_HPC__BROKEN_WITH_CRAY
return qmckl_sm_splitting_hpc(
context,
LDS,