Skip to content

Commit

Permalink
Merge branch 'develop' into hugetlb-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored May 7, 2024
2 parents dc99b61 + c20189c commit fc10673
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions cmake/system.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions cpuid_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions ctest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions docs/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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>
```
Expand Down
3 changes: 3 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion utest/test_extensions/utest_main2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions utest/test_extensions/xerbla.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -85,4 +85,4 @@ void set_xerbla(char* current_rout, int expected_info){
lerr = TRUE;
_info = expected_info;
rout = current_rout;
}
}

0 comments on commit fc10673

Please sign in to comment.