From f922adf05e418312ddcb3e024c6bca179d7c8865 Mon Sep 17 00:00:00 2001 From: Gurtej Kanwar Date: Sun, 21 Aug 2022 16:16:18 +0200 Subject: [PATCH 1/3] Fix Photon ComplexField type --- Grid/qcd/action/gauge/Photon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grid/qcd/action/gauge/Photon.h b/Grid/qcd/action/gauge/Photon.h index 465aa8bd..3d4baccd 100644 --- a/Grid/qcd/action/gauge/Photon.h +++ b/Grid/qcd/action/gauge/Photon.h @@ -49,7 +49,7 @@ NAMESPACE_BEGIN(Grid); typedef Lattice LinkField; typedef Lattice Field; - typedef Field ComplexField; + typedef LinkField ComplexField; }; typedef QedGImpl QedGImplR; From 554c2383593a85695f716eaebfcad539210ff689 Mon Sep 17 00:00:00 2001 From: Gurtej Kanwar Date: Sun, 21 Aug 2022 17:28:57 +0200 Subject: [PATCH 2/3] Update OpenSSL digest to use high-level methods This avoids deprecation warnings when compiling against OpenSSL 3.0 but should still be backwards compatible. It is the recommended way to use the digest API going forward. --- Grid/util/Sha.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Grid/util/Sha.h b/Grid/util/Sha.h index ee164c34..f3789ac4 100644 --- a/Grid/util/Sha.h +++ b/Grid/util/Sha.h @@ -27,6 +27,7 @@ /* END LEGAL */ extern "C" { #include +#include } #ifdef USE_IPP #include "ipp.h" @@ -70,10 +71,8 @@ public: static inline std::vector sha256(const void *data,size_t bytes) { std::vector hash(SHA256_DIGEST_LENGTH); - SHA256_CTX sha256; - SHA256_Init (&sha256); - SHA256_Update(&sha256, data,bytes); - SHA256_Final (&hash[0], &sha256); + auto digest = EVP_get_digestbyname("SHA256"); + EVP_Digest(data, bytes, &hash[0], NULL, digest, NULL); return hash; } static inline std::vector sha256_seeds(const std::string &s) From 60dfb49afa48b75455fe076e25f67d09bef4a74e Mon Sep 17 00:00:00 2001 From: Gurtej Kanwar Date: Sun, 21 Aug 2022 17:29:55 +0200 Subject: [PATCH 3/3] Remove FP16 tests when FP16 is disabled --- tests/Test_simd.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Test_simd.cc b/tests/Test_simd.cc index 468bc982..16205ee1 100644 --- a/tests/Test_simd.cc +++ b/tests/Test_simd.cc @@ -793,6 +793,7 @@ int main (int argc, char ** argv) } std::cout <<" OK ! "<