-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.2: issue with build flexiblas
binaries
#48
Comments
Something against reusing this spec? :) |
Initially I've started my work on top of that spec. |
I've been trying to diagnose this issue using [tkloczko@pers-jacek joblib-1.4.2]$ strace -fe trace=file /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
execve("/usr/bin/sphinx-build", ["/usr/bin/sphinx-build", "-n", "-T", "-b", "man", "doc", "build/sphinx/man"], 0x7ffe1952bfc0 /* 28 vars */) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[..]
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/lib64/libflexiblas.so.3", O_RDONLY|O_CLOEXEC) = 4
access("/etc/flexiblasrc", F_OK) = 0
openat(AT_FDCWD, "/etc/flexiblasrc", O_RDONLY) = 4
readlink("/etc", 0x7ffe50433dc0, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/flexiblasrc", 0x7ffe50433dc0, 1023) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/etc/flexiblasrc.d/", {st_mode=S_IFDIR|0755, st_size=22, ...}, 0) = 0
openat(AT_FDCWD, "/etc/flexiblasrc.d/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/etc/flexiblasrc.d//netlib.conf", O_RDONLY) = 5
readlink("/etc", 0x7ffe50433dc0, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/flexiblasrc.d", 0x7ffe50433dc0, 1023) = -1 EINVAL (Invalid argument)
readlink("/etc/flexiblasrc.d/netlib.conf", 0x7ffe50433dc0, 1023) = -1 EINVAL (Invalid argument)
access("/home/tkloczko/.flexiblasrc", F_OK) = -1 ENOENT (No such file or directory)
access("/home/tkloczko/.flexiblasrc.pers-jacek", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/flexiblas/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
access("libflexiblas_netlib.so", R_OK) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/flexiblas//libflexiblas_netlib.so", {st_mode=S_IFREG|0755, st_size=44248, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib64/flexiblas//libflexiblas_netlib.so", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/lib64/libblas.so.3", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/lib64/libgfortran.so.5", O_RDONLY|O_CLOEXEC) = 4
access("libflexiblas_fallback_lapack.so", R_OK) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/flexiblas//libflexiblas_fallback_lapack.so", {st_mode=S_IFREG|0755, st_size=14952, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib64/flexiblas//libflexiblas_fallback_lapack.so", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/lib64/liblapack.so.3", O_RDONLY|O_CLOEXEC) = 4
flexiblas Failed to get the BLAS backend (OPENBLAS-OPENMP) from the configuration.
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=1081238, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++ BTW: why flexiblas is trying to use DSO |
Regarding your Can you show the content of |
Even if you don't use my spec, this command may help you get all the build dependencies:
|
[tkloczko@pers-jacek SPECS]$ ls -la /usr/lib64/flexiblas/
total 60
drwxr-xr-x 1 root root 106 May 10 19:41 .
dr-xr-xr-x 1 root root 23990 May 10 19:41 ..
-rwxr-xr-x 1 root root 14952 May 10 00:57 libflexiblas_fallback_lapack.so
-rwxr-xr-x 1 root root 44256 May 10 00:57 libflexiblas_netlib.so
[tkloczko@pers-jacek SPECS]$ flexiblas list
System-wide:
System-wide (config directory):
NETLIB
library = libflexiblas_netlib.so
comment =
User config:
Host config:
Enviroment config:
[tkloczko@pers-jacek SPECS]$ flexiblas print
FlexiBLAS, version 3.4.2
Copyright (C) 2013-2024 Martin Koehler and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
Configured BLAS libraries:
System-wide (/etc/flexiblasrc):
System-wide from config directory (/etc/flexiblasrc.d/)
NETLIB
library = libflexiblas_netlib.so
comment =
User config (/home/tkloczko/.flexiblasrc):
Host config (/home/tkloczko/.flexiblasrc.pers-jacek):
Available hooks:
Backend and hook search paths:
/usr/lib64/flexiblas/
Default BLAS:
System: OPENBLAS-OPENMP
User: (none)
Host: (none)
Active Default: OPENBLAS-OPENMP (System)
Run-time properties:
verbose = 0 (System) |
Any hints/advices? 🤔 |
You missing installing the backends. The folder
only contains the netlib implementation and the falllback codes for LAPACK. But in your runtime config you are trying to load You have two options...
|
Issue is that i my case
I'm building temporary flexiblas without blis and atlas installed. |
Above cmake produces only belom list of loadable modules -rwxr-xr-x 1 tkloczko tkloczko 14952 May 13 11:56 libflexiblas_fallback_lapack.so
-rwxr-xr-x 1 tkloczko tkloczko 15688 May 13 11:56 libflexiblas_hook_dummy.so
-rwxr-xr-x 1 tkloczko tkloczko 819336 May 13 11:56 libflexiblas_hook_profile.so
-rwxr-xr-x 1 tkloczko tkloczko 44256 May 13 11:56 libflexiblas_netlib.so
-rwxr-xr-x 1 tkloczko tkloczko 39744 May 13 11:56 libflexiblas_openblas-threads.so |
Now, setting the default BLAS to |
But it still do not explain why |
The log shows
so the OpenBLAS version installed on your system is built with Pthreads support and not with OpenMP support. |
I don't see anything about OpenMP support in OpenBLAS 0.3.27 cmake output + /usr/bin/cmake -B x86_64-redhat-linux-gnu -D BUILD_SHARED_LIBS=ON -D CMAKE_AR=/usr/bin/gcc-ar -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_C_FLAGS_RELEASE=-DNDEBUG -D CMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D CMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_NM=/usr/bin/gcc-nm -D CMAKE_RANLIB=/usr/bin/gcc-ranlib -D CMAKE_VERBOSE_MAKEFILE=ON -D INCLUDE_INSTALL_DIR=/usr/include -D LIB_INSTALL_DIR=/usr/lib64 -D LIB_SUFFIX=64 -D SHARE_INSTALL_PREFIX=/usr/share -D SYSCONF_INSTALL_DIR=/etc -S . -D BUILD_STATIC_LIBS=OFF -D BUILD_TESTING=ON -D BUILD_WITHOUT_CBLAS=OFF -D BUILD_WITHOUT_LAPACK=OFF -D CPP_THREAD_SAFETY_GEMV=ON -D CPP_THREAD_SAFETY_TEST=ON -D DYNAMIC_ARCH=OFF -D INTERFACE64=OFF -D USE_LOCKING=OFF -D USE_PERL=ON
CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 14.1.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:101 (message):
CMake support is experimental. It does not yet support all build options
and may not produce the same Makefiles that OpenBLAS ships with.
CMake Warning (dev) at cmake/system_check.cmake:13 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "LINUX" will no longer be dereferenced when the
policy is set to NEW. Since the policy is not set the OLD behavior will be
used.
Call Stack (most recent call first):
cmake/system.cmake:8 (include)
CMakeLists.txt:104 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for stdatomic.h
-- Looking for stdatomic.h - found
-- GEMM multithread threshold set to 4.
-- Multi-threading enabled with 48 threads.
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - /usr/bin/gfortran
-- The Fortran compiler identification is GNU 14.1.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Running getarch
-- GETARCH results:
CORE=SKYLAKEX
LIBCORE=skylakex
NUM_CORES=48
HAVE_MMX=1
HAVE_SSE=1
HAVE_SSE2=1
HAVE_SSE3=1
HAVE_SSSE3=1
HAVE_SSE4_1=1
HAVE_SSE4_2=1
HAVE_AVX=1
HAVE_AVX2=1
HAVE_AVX512VL=1
HAVE_FMA3=1
MAKEFLAGS += -j 48
-- Compiling a 64-bit binary.
-- Building Single Precision
-- Building Double Precision
-- Building Complex Precision
-- Building Double Complex Precision
-- /home/tkloczko/rpmbuild/BUILD/OpenBLAS-0.3.27/x86_64-redhat-linux-gnu/interface/CMakeFiles/scopy.c
[..]
-- /home/tkloczko/rpmbuild/BUILD/OpenBLAS-0.3.27/x86_64-redhat-linux-gnu/lapack/CMakeFiles/ztrti2_LU.c
-- fortran lapack
-- Building deprecated routines
-- Building Single Precision
-- Building Double Precision
-- Building Single Precision Complex
-- Building Double Precision Complex
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- The CXX compiler identification is GNU 14.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generating openblas_config.h in include/openblas
-- Generating f77blas.h in include/openblas
-- Generating cblas.h in include/openblas
-- Copying LAPACKE header files to include/openblas
-- Configuring done (6.7s)
-- Generating done (1.3s) |
Try compiling OpenBLAS with the standard makefile, e.g.
|
Again, if you want to build openblas yourself, you can use Fedora's openblas spec for reference, as we build the three versions. |
So does it mean that OpenBLAS cmake is broken? 🤔 |
What do you mean broken? Did you check the documentation? OpenBLAS provides three flavors. The default one uses pthreads. If that's not what you want, you need to change the proper options. You have 1) a working OpenBLAS RPM that provides these three flavors in Fedora, I provided the command to install everything you need; 2) a working OpenBLAS spec that builds the latter if you want to do it yourself; 3) a working FlexiBLAS spec that demonstrates how to build it for all backends. Please take a look at these resources and read the documentation. We tried to tell you multiple times. So far, I don't see any issue with FlexiBLAS: you provided a library, FlexiBLAS found it and is ready to use it. So I think this can be closed. If OpenBLAS documentation + all the examples available are not clear enough, I suggest you to ask for help there. |
Checked OpenBLAS documentation and NONE of those options are documented in case of use cmake to build it. |
For instance, docs/build_system.md:
among other things. But yet again, we are discussing OpenBLAS... ¯_(ツ)_/¯ |
Thank you for the hints 👍 😄 As I've resolved building flexiblas OpenBLAS DSO just found that OpenBLAS is build with: %build
%cmake \
-D BUILD_STATIC_LIBS=OFF \
-D BUILD_TESTING=ON \
-D BUILD_WITHOUT_CBLAS=OFF \
-D BUILD_WITHOUT_LAPACK=OFF \
-D CPP_THREAD_SAFETY_GEMV=ON \
-D CPP_THREAD_SAFETY_TEST=ON \
-D DYNAMIC_ARCH=OFF \
-D INTERFACE64=OFF \
-D USE_LOCKING=OFF \
-D USE_OPENMP=ON \
-D USE_PERL=ON \
-D USE_THREAD=ON \
%{nil}
%cmake_build
%if %{with 8bytes_int}
%cmake \
-B %{_vpath_builddir}-8bytes_int \
-D BUILD_STATIC_LIBS=OFF \
-D BUILD_TESTING=ON \
-D BUILD_WITHOUT_CBLAS=OFF \
-D BUILD_WITHOUT_LAPACK=OFF \
-D CPP_THREAD_SAFETY_GEMV=ON \
-D CPP_THREAD_SAFETY_TEST=ON \
-D DYNAMIC_ARCH=OFF \
-D INTERFACE64=ON \
-D USE_LOCKING=OFF \
-D USE_OPENMP=ON \
-D USE_PERL=ON \
-D USE_THREAD=ON \
%{nil}
%cmake_build
%endif On building 64bits int flexiblas OpenBLAS DSO is not build + /usr/bin/cmake -B x86_64-redhat-linux-gnu -D BUILD_SHARED_LIBS=ON -D CMAKE_AR=/usr/bin/gcc-ar -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_C_FLAGS_RELEASE=-DNDEBUG -D CMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D CMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_NM=/usr/bin/gcc-nm -D CMAKE_RANLIB=/usr/bin/gcc-ranlib -D CMAKE_VERBOSE_MAKEFILE=ON -D INCLUDE_INSTALL_DIR=/usr/include -D LIB_INSTALL_DIR=/usr/lib64 -D LIB_SUFFIX=64 -D SHARE_INSTALL_PREFIX=/usr/share -D SYSCONF_INSTALL_DIR=/etc -S . -B x86_64-redhat-linux-gnu-8bytes_int -D CMAKE_SKIP_INSTALL_RPATH=ON -D FLEXIBLAS_DEFAULT_BLAS=ON -D INTEGER8=ON -D LAPACK_API_VERSION=3.4.2 -D SYS_BLAS_LIBRARY=-lblas64 -D SYS_LAPACK_LIBRARY=-llapack -D TESTS=ON
CMake Warning (dev) at CMakeLists.txt:4 (PROJECT):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 14.1.1
-- The Fortran compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Configuring FlexiBLAS 3.4.2
-- SYSCONFDIR: /etc
-- LIBDIR: /usr/lib64
-- BINDIR: /usr/bin
-- INCLUDEDIR: /usr/include
-- MANDIR: /usr/share/man
-- Compiler_ID: GNU
-- FCompiler_ID: GNU
-- Fortran compiler supports -frecursive
-- Fortran compiler supports -fPIC
-- Fortran compiler supports -O3
-- Fortran compiler supports -Wimplicit-procedure
-- Fortran compiler supports -Wall
-- Fortran compiler supports -Wunused
-- Fortran compiler supports -Warray-temporaries
-- Fortran compiler supports -fbacktrace
-- Fortran compiler supports -Wshadow
-- Fortran compiler supports -O0
-- Performing Test C_W_PEDANTIC
-- Performing Test C_W_PEDANTIC - Success
-- Performing Test C_W_STRICT_PROTOTYPES
-- Performing Test C_W_STRICT_PROTOTYPES - Success
-- Performing Test C_W_CAST_QUAL
-- Performing Test C_W_CAST_QUAL - Success
-- Performing Test C_STACK_PROTECTOR
-- Performing Test C_STACK_PROTECTOR - Success
-- Performing Test C_STACK_CLASH
-- Performing Test C_STACK_CLASH - Success
-- Performing Test FC_STACK_PROTECTOR
-- Performing Test FC_STACK_PROTECTOR - Success
-- Performing Test FC_STACK_CLASH
-- Performing Test FC_STACK_CLASH - Success
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Verifying Fortran/C Compiler Compatibility
-- Verifying Fortran/C Compiler Compatibility - Success
-- Check for Thread Local Storage
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Success
-- Performing Test HAVE__THREAD_LOCAL
-- Performing Test HAVE__THREAD_LOCAL - Success
-- Performing Test HAVE_GNU_THREAD_LOCAL
-- Performing Test HAVE_GNU_THREAD_LOCAL - Success
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
-- Looking for include file sys/sysmacro.h
-- Looking for include file sys/sysmacro.h - not found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for RTLD_GLOBAL
-- Looking for RTLD_GLOBAL - found
-- Looking for RTLD_DEEPBIND
-- Looking for RTLD_DEEPBIND - found
-- Looking for RTLD_NOW
-- Looking for RTLD_NOW - found
-- Looking for RTLD_NODELETE
-- Looking for RTLD_NODELETE - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Check for __attribute__((constructor))
-- Looking for attribute: constructor - works
-- Check for __attribute__((alias("foo")))
-- Looking for attribute: alias("foo") - works
-- Check for __attribute__((visibility("hidden")))
-- Looking for attribute: visibility("hidden") - works
-- Check for __attribute__((visibility("default")))
-- Looking for attribute: visibility("default") - works
-- Check for __attribute__((unused))
-- Looking for attribute: unused - works
-- libcscutils in project build
-- LIBCSCUTILS Features
-- Enable module: inifile
-- Enable module: ds
-- Check Generic Functionality
-- Check for __attribute__((constructor))
-- Looking for attribute: constructor - works
-- Check for __attribute__((deprecated))
-- Looking for attribute: deprecated - works
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for pthread_yield
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield - not found.
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Enable csc_show_backtrace.
-- Looking for strnlen
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for strnlen - found (using _POSIX_C_SOURCE=200809L).
-- Looking for strndup
-- Looking for strndup
-- Looking for strndup - not found
-- Looking for strndup
-- Looking for strndup - not found
-- Looking for strndup
-- Looking for strndup - not found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strndup - found (using _POSIX_C_SOURCE=200809L).
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for getline
-- Looking for getline
-- Looking for getline - not found
-- Looking for getline
-- Looking for getline - not found
-- Looking for getline
-- Looking for getline - not found
-- Looking for getline
-- Looking for getline - found
-- Looking for getline - found (using _POSIX_C_SOURCE=200809L).
-- Looking for getdelim
-- Looking for getdelim
-- Looking for getdelim - not found
-- Looking for getdelim
-- Looking for getdelim - not found
-- Looking for getdelim
-- Looking for getdelim - not found
-- Looking for getdelim
-- Looking for getdelim - found
-- Looking for getdelim - found (using _POSIX_C_SOURCE=200809L).
-- Features for CSC-INIFILE
-- Looking for realpath
-- Looking for realpath
-- Looking for realpath - found
-- Looking for realpath - found (using _NONE_).
-- External Libraries
-- Could NOT find CPUFREQ (missing: CPUFREQ_LIBRARIES CPUFREQ_INCLUDE_DIR)
CPUFREQ not found. Either cpufreq.h or libcpupower.so is missing.
-- Setting GNU Compiler Flags
-- Looking for strdup
-- Looking for strdup
-- Looking for strdup - not found
-- Looking for strdup
-- Looking for strdup - not found
-- Looking for strdup
-- Looking for strdup - not found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strdup - found (using _POSIX_C_SOURCE=200809L).
-- Looking for realpath
-- Looking for realpath
-- Looking for realpath - found
-- Looking for realpath - found (using _NONE_).
-- Use external LAPACK from -llapack with API_VERSION 3.4.2
CMake Warning at cmake/lapack.cmake:242 (MESSAGE):
The requested LAPACK_VERSION is less than 3.6.1. We recommend to use a
newer API version.
Call Stack (most recent call first):
CMakeLists.txt:352 (INCLUDE)
-- Use system provided NETLIB BLAS for fallback generation. SYS_BLAS_LIBRARY = -lblas64
-- Use system provided LAPACK for fallback generation. SYS_LAPACK_LIBRARY = -llapack
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Could NOT find OpenBLASSerial64 (missing: OpenBLASSerial64_LIBRARY)
-- OpenBLASSerial64 not found.
-- Could NOT find OpenBLASPThread64 (missing: OpenBLASPThread64_LIBRARY)
-- OpenBLASPThread64 not found.
-- Could NOT find OpenBLASOpenMP64 (missing: OpenBLASOpenMP64_LIBRARY)
-- OpenBLASOpenMP64 not found.
-- Could NOT find BlisSerial64 (missing: BlisSerial64_LIBRARY)
-- BlisSerial64 not found.
-- Could NOT find BlisPThread64 (missing: BlisPThread64_LIBRARY)
-- BlisPThread64 not found.
-- Could NOT find BlisOpenMP64 (missing: BlisOpenMP64_LIBRARY)
-- BlisOpenMP64 not found.
-- Search for MKL: mkl_gf_ilp64 mkl_sequential mkl_core
-- MklSerial64 not found.
-- Search for MKL: mkl_gf_ilp64 mkl_gnu_thread mkl_core
-- MklOpenMP64 not found.
-- PP:
-- SP:
-- MKL_TBB depends on TBB. Not Found.
-- MklTBB64 not found.
--
-- Search for ATLAS
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Check for BLAS64 interface: 0 TRUE
-- BLAS64 Library Generic works with 64bit integers
-- Found BLAS64: Generic (/usr/lib64/libblas64.so)
--
-- Search for Apple
-- Check for BLAS64 interface: 0 TRUE
-- BLAS64 Library Generic works with 64bit integers
-- Found BLAS64: Generic (/usr/lib64/libblas64.so)
-- Default BLAS not found. Use NETLIB instead.
-- Found hook directory.
-- Build profile hook.
-- Enable Multithread Demo
-- Build Extra Benchmarks
-- Found PythonInterp: /usr/bin/python3
-- Found Python (3.10.14): /usr/include/python3.10
-- Enable Testing...
-- Setting GNU Compiler Flags
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/sblat1.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/sblat2.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/sblat3.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/dblat1.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/dblat2.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/dblat3.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/cblat1.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/cblat2.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/cblat3.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/zblat1.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/zblat2.in
-- /home/tkloczko/rpmbuild/BUILD/flexiblas-3.4.2/test/blas/zblat3.in
-- ------------------------------------------------
-- Final Configuration Status
-- ------------------------------------------------
-- Build 8 byte integer: ON
-- Build CBLAS interface: ON
-- Install path: /usr
-- Extra BLAS search path: /usr/lib64/flexiblas64/
-- LAPACK Support: ON
-- LAPACK_API_VERSION: 3.4.2
-- ABI: GNU
-- Interface to Extra BLAS Libraries:
-- Default BLAS: NETLIB
--
-- Compiler Options:
-- CMAKE_C_FLAGS = -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fPIC -std=c99 -fstack-protector-strong -fstack-clash-protection -D_FILE_OFFSET_BITS=64
-- CMAKE_C_FLAGS_RELEASE = -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual
-- CMAKE_C_FLAGS_DEBUG = -g -Wall -Wunused -g -Wextra -Wshadow -Wstrict-aliasing -Wundef -Wlogical-op -Wparentheses -Wcast-qual -O0 -Wpedantic -Wstrict-prototypes -Wcast-qual
-- CMAKE_Fortran_FLAGS = -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules -frecursive -fPIC -fdefault-integer-8 -fstack-protector-strong -fstack-clash-protection -fdefault-integer-8
-- CMAKE_Fortran_FLAGS_RELEASE = -DNDEBUG -O3
-- CMAKE_Fortran_FLAGS_DEBUG = -g -Wimplicit-procedure -Wall -Wunused -Warray-temporaries -fbacktrace -Wshadow -O0
-- ------------------------------------------------
-- Configuring done (20.3s)
-- Generating done (0.5s) Above output is almost identical with that one Any hint? 🤔 |
If Flexiblas with
If the library does not have any of the names above, it is not found. A question in general, what about using the provided spec files or packages @Enchufa2 mentioned? They are well configured and working properly. |
Only now I found in cmake params copied here is %if %{with 8bytes_int}
%cmake \
-B %{_vpath_builddir}-8bytes_int \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-D FLEXIBLAS_DEFAULT_BLAS=ON \
-D INTEGER8=ON \
-D LAPACK_API_VERSION="$(rpm -q --qf '%{VERSION}' lapack-devel)" \
-D SYS_BLAS_LIBRARY="$(pkg-config --libs blas64)" \
-D SYS_LAPACK_LIBRARY="$(pkg-config --libs lapack64)" \
-D TESTS=ON \
%{nil}
%make_build %{_vpath_builddir}-8bytes_int
%endif Just found that lapack last version has bug in lapack.pc.in has hardcoded -llapack and to fix that it is necessary to add -Libs: -L${libdir} -llapack
+Libs: -L${libdir} -l@LAPACKLIB@ To have I found as well many LTO related issue in flexiblas but will open for that separated ticket. Thank you very much for all your hits 👍 😄 |
FYI just created Reference-LAPACK/lapack#1015 |
Since this seems to not a bug in FlexiBLAS, i will close this issue. |
OK just been able successfully build flexiblas 😄 Last thing is that on test suite execution ech unit is executed with multiple threads which number is probably calculated on number of available cores. |
That's is exactly the behavior I expected when running ctest in parallel and having any multithreaded BLAS set as default. If you are using NETLIB Blas as default, no oversubscription will happen. It is the same problem as you run many compute intensive applications on your computer. Thus no bug. |
That is default setup of the ctest and as single unit executed without parallelization consumes 100% of ALL cores it means that this should be changes to sequential execution. |
Since my default workflow uses NETLIB (i.e. a single threaded BLAS) in testing, I am used to running the test in parallel. For any multithreaded BLAS you have to ensure that the number of threads do not lead to an oversubscription. It is the same as running many computational expensive applications at once on a single computer. In your case, a single test consumes all of the available CPU resources since you are using OpenBLAS with OpenMP. That will also happen if you are compiling LAPACK with the BLAS operations coming from OpenBLAS. |
Are you sure? 🤔 |
I tested it with cmake ( cmake-3.28.2) from FC40, FlexiBLAS with NETLIB and running |
Please try with those cmake setting which I'm unsung. |
I did and the above thing happend. |
I've manage to build my own
flexiblas
binaries and package all that as rpm package.On top of that I've build my own python
numpy
binaries wiecha are usingflexiblas
however on any use of thosenumpy
fails with core dump andflexiblas Failed to get the BLAS backend (OPENBLAS-OPENMP) from the configuration.
message.Fir example on building
joblib
python module documentation I have:My understanding is that something is missing or even
flexiblas
is indirectly build however I'm struggling with diagnose this issue and error message does not point and what is missing/wwong.May I ask for some help/hint? 🤔
flexiblas
was build using cmake params:and after install
flexiblas
packageflexiblas list
showsand
flexiblas print
The text was updated successfully, but these errors were encountered: