Skip to content

Commit b4dc1b9

Browse files
committed
Removed the option to use LIBXSMM. It is outdated
1 parent 1773588 commit b4dc1b9

File tree

3 files changed

+6
-38
lines changed

3 files changed

+6
-38
lines changed

Common/include/linear_algebra/blas_structure.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929

3030
#pragma once
3131

32-
/* LIBXSMM include files, if supported. */
33-
#ifdef HAVE_LIBXSMM
34-
#include "libxsmm.h"
35-
#endif
36-
3732
class CConfig;
3833

3934
/*!
@@ -494,7 +489,7 @@ class CBlasStructure {
494489
}
495490

496491
private:
497-
#if !(defined(HAVE_LIBXSMM) || defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
492+
#if !(defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
498493
(defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE))
499494
/* Blocking parameters for the outer kernel. We multiply mc x kc blocks of
500495
the matrix A with kc x nc panels of the matrix B (this approach is referred

Common/src/linear_algebra/blas_structure.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" void dgemv_(char*, const int*, const int*, const passivedouble*, cons
4343

4444
/* Constructor. Initialize the const member variables, if needed. */
4545
CBlasStructure::CBlasStructure()
46-
#if !(defined(HAVE_LIBXSMM) || defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
46+
#if !(defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
4747
(defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE))
4848
: mc(256),
4949
kc(128),
@@ -62,37 +62,25 @@ void CBlasStructure::gemm(const int M, const int N, const int K, const su2double
6262
#endif
6363

6464
#if (defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE)) || \
65-
!(defined(HAVE_LIBXSMM) || defined(HAVE_MKL) || defined(HAVE_BLAS))
65+
!(defined(HAVE_MKL) || defined(HAVE_BLAS))
6666
/* Native implementation of the matrix product. This optimized implementation
6767
assumes that the matrices are in column major order. This can be
6868
accomplished by swapping N and M and A and B. This implementation is based
6969
on https://github.com/flame/how-to-optimize-gemm. */
7070
gemm_imp(N, M, K, B, A, C);
7171

72-
#else
73-
#ifdef HAVE_LIBXSMM
74-
75-
/* The gemm function of libxsmm is used to carry out the multiplication.
76-
Note that libxsmm_gemm expects the matrices in column major order. That's
77-
why the in the calling sequence A and B and M and N are reversed. */
78-
su2double alpha = 1.0;
79-
su2double beta = 0.0;
80-
char trans = 'N';
81-
82-
libxsmm_dgemm(&trans, &trans, &N, &M, &K, &alpha, B, &N, A, &K, &beta, C, &N);
83-
8472
#else // MKL and BLAS
8573

8674
/* The standard blas routine dgemm is used for the multiplication.
8775
Call dgemm without transposing the matrices. In that case dgemm expects
88-
the matrices in column major order, see the comments for libxsmm. */
76+
the matrices in column major order. That's why the in the calling
77+
sequence A and B and M and N are reversed. */
8978
su2double alpha = 1.0;
9079
su2double beta = 0.0;
9180
char trans = 'N';
9281

9382
dgemm_(&trans, &trans, &N, &M, &K, &alpha, B, &N, A, &K, &beta, C, &N);
9483

95-
#endif
9684
#endif
9785

9886
/* Store the profiling information, if needed. */
@@ -131,7 +119,7 @@ void CBlasStructure::gemv(const int M, const int N, const su2double* A, const su
131119
#endif
132120
}
133121

134-
#if !(defined(HAVE_LIBXSMM) || defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
122+
#if !(defined(HAVE_BLAS) || defined(HAVE_MKL)) || \
135123
(defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE))
136124

137125
/* Macros for accessing submatrices of a matmul using the leading dimension. */

SU2_CFD/src/SU2_CFD.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727

2828
#include "../include/SU2_CFD.hpp"
2929

30-
/* LIBXSMM include files, if supported. */
31-
#ifdef HAVE_LIBXSMM
32-
#include "libxsmm.h"
33-
#endif
34-
3530
/* Include file, needed for the runtime NaN catching. You also have to include feenableexcept(...) below. */
3631
//#include <fenv.h>
3732

@@ -77,11 +72,6 @@ int main(int argc, char *argv[]) {
7772
/*--- Uncomment the following line if runtime NaN catching is desired. ---*/
7873
// feenableexcept(FE_INVALID | FE_OVERFLOW | FE_DIVBYZERO );
7974

80-
/*--- Initialize libxsmm, if supported. ---*/
81-
#ifdef HAVE_LIBXSMM
82-
libxsmm_init();
83-
#endif
84-
8575
/*--- Create a pointer to the main SU2 Driver ---*/
8676

8777
CDriver* driver = nullptr;
@@ -154,11 +144,6 @@ int main(int argc, char *argv[]) {
154144

155145
delete driver;
156146

157-
/*---Finalize libxsmm, if supported. ---*/
158-
#ifdef HAVE_LIBXSMM
159-
libxsmm_finalize();
160-
#endif
161-
162147
/*--- Finalize AD. ---*/
163148
AD::Finalize();
164149

0 commit comments

Comments
 (0)