| @@ -355,7 +355,7 @@ OBJCONV = $(CROSS_SUFFIX)objconv | |||||
| # When fortran support was either not detected or actively deselected, only build BLAS. | # When fortran support was either not detected or actively deselected, only build BLAS. | ||||
| ifeq ($(NOFORTRAN), 1) | ifeq ($(NOFORTRAN), 1) | ||||
| C_LAPACK = 1 | C_LAPACK = 1 | ||||
| override FEXTRALIB = | |||||
| override FEXTRALIB = | |||||
| ifeq ($(C_COMPILER), GCC) | ifeq ($(C_COMPILER), GCC) | ||||
| CCOMMON_OPT += -Wno-error=incompatible-pointer-types | CCOMMON_OPT += -Wno-error=incompatible-pointer-types | ||||
| endif | endif | ||||
| @@ -160,6 +160,12 @@ else() | |||||
| endif () | endif () | ||||
| 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") | include("${PROJECT_SOURCE_DIR}/cmake/prebuild.cmake") | ||||
| if (DEFINED TARGET) | if (DEFINED TARGET) | ||||
| if (${TARGET} STREQUAL COOPERLAKE AND NOT NO_AVX512) | if (${TARGET} STREQUAL COOPERLAKE AND NOT NO_AVX512) | ||||
| @@ -1535,6 +1535,7 @@ int get_cpuname(void){ | |||||
| return CPUTYPE_SANDYBRIDGE; | return CPUTYPE_SANDYBRIDGE; | ||||
| else | else | ||||
| return CPUTYPE_NEHALEM; | return CPUTYPE_NEHALEM; | ||||
| case 0: // Meteor Lake | |||||
| case 7: // Rocket Lake | case 7: // Rocket Lake | ||||
| if(support_avx512()) | if(support_avx512()) | ||||
| return CPUTYPE_SKYLAKEX; | return CPUTYPE_SKYLAKEX; | ||||
| @@ -1560,6 +1561,19 @@ int get_cpuname(void){ | |||||
| return CPUTYPE_NEHALEM; | return CPUTYPE_NEHALEM; | ||||
| } | } | ||||
| break; | 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; | break; | ||||
| case 0x7: | case 0x7: | ||||
| @@ -25,6 +25,9 @@ endif | |||||
| override CFLAGS += -DADD$(BU) -DCBLAS | override CFLAGS += -DADD$(BU) -DCBLAS | ||||
| ifeq ($(F_COMPILER),GFORTRAN) | ifeq ($(F_COMPILER),GFORTRAN) | ||||
| ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4)) | |||||
| override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS)) -O0 | |||||
| endif | |||||
| override FFLAGS += -fno-tree-vectorize | override FFLAGS += -fno-tree-vectorize | ||||
| endif | endif | ||||
| override TARGET_ARCH= | override TARGET_ARCH= | ||||
| @@ -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 | 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. | 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. | ||||
| @@ -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 <m> <n> <k> | ./time_dgemm <m> <n> <k> | ||||
| ``` | ``` | ||||
| @@ -1,6 +1,9 @@ | |||||
| TOPDIR = .. | TOPDIR = .. | ||||
| include ../Makefile.system | include ../Makefile.system | ||||
| ifeq ($(F_COMPILER),GFORTRAN) | ifeq ($(F_COMPILER),GFORTRAN) | ||||
| ifneq (, $(filter $(CORE),LOONGSON3R3 LOONGSON3R4)) | |||||
| override FFLAGS = $(filter_out(-O2 -O3,$(FFLAGS)) -O0 | |||||
| endif | |||||
| override FFLAGS += -fno-tree-vectorize | override FFLAGS += -fno-tree-vectorize | ||||
| endif | endif | ||||
| @@ -40,7 +40,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||||
| #define CTEST_ADD_TESTS_MANUALLY | #define CTEST_ADD_TESTS_MANUALLY | ||||
| #include "cblas.h" | #include "cblas.h" | ||||
| #include "openblas_utest.h" | |||||
| #include "utest/openblas_utest.h" | |||||
| #if 1 | #if 1 | ||||
| CTEST(amax, samax){ | CTEST(amax, samax){ | ||||
| blasint N=3, inc=1; | blasint N=3, inc=1; | ||||
| @@ -39,7 +39,7 @@ static char *rout; | |||||
| static void F77_xerbla(char *srname, void *vinfo) | static void F77_xerbla(char *srname, void *vinfo) | ||||
| { | { | ||||
| int info=*(int*)vinfo; | |||||
| blasint info=*(blasint*)vinfo; | |||||
| if (link_xerbla) | if (link_xerbla) | ||||
| { | { | ||||
| @@ -85,4 +85,4 @@ void set_xerbla(char* current_rout, int expected_info){ | |||||
| lerr = TRUE; | lerr = TRUE; | ||||
| _info = expected_info; | _info = expected_info; | ||||
| rout = current_rout; | rout = current_rout; | ||||
| } | |||||
| } | |||||