From 95315f95d2f5af3d3c0813aef175430bc9931344 Mon Sep 17 00:00:00 2001 From: cyk <57099728+cyk2018@users.noreply.github.com> Date: Sat, 6 Apr 2024 13:51:01 +0800 Subject: [PATCH 1/8] Update user_manual.md for static linker when I use static link method to compile , result is undefined with pthread_create, so we should add -lpthread --- docs/user_manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_manual.md b/docs/user_manual.md index b5cd632f1..0855f8119 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -159,7 +159,7 @@ int main(int argc, char* argv[]) ``` ``` -gcc -o time_dgemm time_dgemm.c /your/path/libopenblas.a +gcc -o time_dgemm time_dgemm.c /your/path/libopenblas.a -lpthread ./time_dgemm ``` From f4ee0a423b62c1a7f02baa748f8a491bd548fda9 Mon Sep 17 00:00:00 2001 From: Ayappan P Date: Thu, 25 Apr 2024 07:32:21 -0400 Subject: [PATCH 2/8] Fix openblas_utest_ext build in AIX --- utest/test_extensions/utest_main2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/test_extensions/utest_main2.c b/utest/test_extensions/utest_main2.c index 1a761cb75..41269f0e1 100644 --- a/utest/test_extensions/utest_main2.c +++ b/utest/test_extensions/utest_main2.c @@ -40,7 +40,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CTEST_ADD_TESTS_MANUALLY #include "cblas.h" -#include "openblas_utest.h" +#include "utest/openblas_utest.h" #if 1 CTEST(amax, samax){ blasint N=3, inc=1; From b1d722fc0cf563298de8c5ae66fc04a1901d4bf1 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 29 Apr 2024 15:37:26 +0200 Subject: [PATCH 3/8] Fix cast to work with INTERFACE64 (especially on big-endian) --- utest/test_extensions/xerbla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utest/test_extensions/xerbla.c b/utest/test_extensions/xerbla.c index 9487b20a6..8c90d4ce7 100644 --- a/utest/test_extensions/xerbla.c +++ b/utest/test_extensions/xerbla.c @@ -39,7 +39,7 @@ static char *rout; static void F77_xerbla(char *srname, void *vinfo) { - int info=*(int*)vinfo; + blasint info=*(blasint*)vinfo; if (link_xerbla) { @@ -85,4 +85,4 @@ void set_xerbla(char* current_rout, int expected_info){ lerr = TRUE; _info = expected_info; rout = current_rout; -} \ No newline at end of file +} From edacf9b3973634d2540d1b7d076715d3f37d9c79 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 30 Apr 2024 08:50:47 +0200 Subject: [PATCH 4/8] Work around spurious BLAS3 test errors on LOONGSON3R3/4 (#4667) Force compilation with gfortran to use O0 on older Loongson hardware to avoid spurious test failures --- ctest/Makefile | 3 +++ test/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ctest/Makefile b/ctest/Makefile index 6c7cc1ed5..46885f3bb 100644 --- a/ctest/Makefile +++ b/ctest/Makefile @@ -25,6 +25,9 @@ endif override CFLAGS += -DADD$(BU) -DCBLAS ifeq ($(F_COMPILER),GFORTRAN) +ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4)) + override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS)) -O0 +endif override FFLAGS += -fno-tree-vectorize endif override TARGET_ARCH= diff --git a/test/Makefile b/test/Makefile index 6a50b6c98..85bdca103 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,9 @@ TOPDIR = .. include ../Makefile.system ifeq ($(F_COMPILER),GFORTRAN) +ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4)) + override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS)) -O0 +endif override FFLAGS += -fno-tree-vectorize endif From 7c915e64cad5bc12e85a2d8db01a3a4cb3996040 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 30 Apr 2024 17:48:14 +0200 Subject: [PATCH 5/8] Silence a GCC14 warning/error in the f2c-converted LAPACK --- Makefile.system | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.system b/Makefile.system index 840389db7..620a462e3 100644 --- a/Makefile.system +++ b/Makefile.system @@ -356,6 +356,9 @@ OBJCONV = $(CROSS_SUFFIX)objconv ifeq ($(NOFORTRAN), 1) C_LAPACK = 1 override FEXTRALIB = +ifeq ($(C_COMPILER), GCC) +CCOMMON_OPT += -Wno-error=incompatible-pointer-types +endif endif ifeq ($(C_COMPILER), GCC) From 3d26837a35129c2de021bab79dc1dbe1c1df00fb Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 30 Apr 2024 19:05:18 +0200 Subject: [PATCH 6/8] Suppress GCC14 error exit in the f2c-converted LAPACK --- cmake/system.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/system.cmake b/cmake/system.cmake index 7166cc07f..6fec04bfc 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -160,6 +160,12 @@ else() endif () endif () +if (C_LAPACK) + if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU") + set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-error=incompatible-pointer-types") + endif () +endif () + include("${PROJECT_SOURCE_DIR}/cmake/prebuild.cmake") if (DEFINED TARGET) if (${TARGET} STREQUAL COOPERLAKE AND NOT NO_AVX512) From a82ecadc11c10cbf82b2f9647bf76f9bb764185f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 4 May 2024 15:48:48 +0200 Subject: [PATCH 7/8] mention LD_LIBRARY_PATH --- docs/user_manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_manual.md b/docs/user_manual.md index 0855f8119..4d5fa9eaa 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -49,7 +49,7 @@ For more information, please read [Installation Guide](install.md). gcc -o test test.c -I/your_path/OpenBLAS/include/ -L/your_path/OpenBLAS/lib -Wl,-rpath,/your_path/OpenBLAS/lib -lopenblas ``` -The `-Wl,-rpath,/your_path/OpenBLAS/lib` option to linker can be omitted if you ran `ldconfig` to update linker cache, put `/your_path/OpenBLAS/lib` in `/etc/ld.so.conf` or a file in `/etc/ld.so.conf.d`, or installed OpenBLAS in a location part of `ld.so` default search path. Otherwise, linking at runtime will fail. +The `-Wl,-rpath,/your_path/OpenBLAS/lib` option to linker can be omitted if you ran `ldconfig` to update linker cache, put `/your_path/OpenBLAS/lib` in `/etc/ld.so.conf` or a file in `/etc/ld.so.conf.d`, or installed OpenBLAS in a location that is part of the `ld.so` default search path (usually /lib,/usr/lib and /usr/local/lib). Alternatively, you can set the environment variable LD_LIBRARY_PATH to point to the folder that contains libopenblas.so. Otherwise, linking at runtime will fail with a message like `cannot open shared object file: no such file or directory` If the library is multithreaded, please add `-lpthread`. If the library contains LAPACK functions, please add `-lgfortran` or other Fortran libs, although if you only make calls to LAPACKE routines, i.e. your code has `#include "lapacke.h"` and makes calls to methods like `LAPACKE_dgeqrf`, `-lgfortran` is not needed. From bbd227ce4a657a137bc08d93ec23e49f31dff095 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 6 May 2024 00:11:44 +0200 Subject: [PATCH 8/8] Add Intel Meteor Lake and Emerald Rapids --- cpuid_x86.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cpuid_x86.c b/cpuid_x86.c index 6cf4d6503..40735c563 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -1535,6 +1535,7 @@ int get_cpuname(void){ return CPUTYPE_SANDYBRIDGE; else return CPUTYPE_NEHALEM; + case 0: // Meteor Lake case 7: // Rocket Lake if(support_avx512()) return CPUTYPE_SKYLAKEX; @@ -1560,6 +1561,19 @@ int get_cpuname(void){ return CPUTYPE_NEHALEM; } break; + case 12: //family 6 exmodel 12 + switch (model) { + case 15: + if(support_avx512()) + return CPUTYPE_SAPPHIRERAPIDS; + if(support_avx2()) + return CPUTYPE_HASWELL; + if(support_avx()) + return CPUTYPE_SANDYBRIDGE; + else + return CPUTYPE_NEHALEM; + } + break; } break; case 0x7: