Browse Source

Merge branch 'develop' into hugetlb-doc

tags/v0.3.28^2
Martin Kroeker GitHub 1 year ago
parent
commit
fc10673fd3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
8 changed files with 32 additions and 6 deletions
  1. +1
    -1
      Makefile.system
  2. +6
    -0
      cmake/system.cmake
  3. +14
    -0
      cpuid_x86.c
  4. +3
    -0
      ctest/Makefile
  5. +2
    -2
      docs/user_manual.md
  6. +3
    -0
      test/Makefile
  7. +1
    -1
      utest/test_extensions/utest_main2.c
  8. +2
    -2
      utest/test_extensions/xerbla.c

+ 1
- 1
Makefile.system View File

@@ -355,7 +355,7 @@ OBJCONV = $(CROSS_SUFFIX)objconv
# When fortran support was either not detected or actively deselected, only build BLAS.
ifeq ($(NOFORTRAN), 1)
C_LAPACK = 1
override FEXTRALIB =
override FEXTRALIB =
ifeq ($(C_COMPILER), GCC)
CCOMMON_OPT += -Wno-error=incompatible-pointer-types
endif


+ 6
- 0
cmake/system.cmake View File

@@ -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)


+ 14
- 0
cpuid_x86.c View File

@@ -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:


+ 3
- 0
ctest/Makefile View File

@@ -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=


+ 2
- 2
docs/user_manual.md View File

@@ -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.

@@ -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>
```



+ 3
- 0
test/Makefile View File

@@ -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



+ 1
- 1
utest/test_extensions/utest_main2.c View File

@@ -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;


+ 2
- 2
utest/test_extensions/xerbla.c View File

@@ -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;
}
}

Loading…
Cancel
Save