FindBLAS doesn't find threaded AMD BLIS
FindBLAS can't find the threaded version of AMD BLIS because AMD renamed it to libblis-mt.so
.
Original BLIS:
$ spack load blis@0.9.0 threads=openmp
$ cmake ..
-- The C compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /home/bc/spack/opt/spack/linux-rocky8-zen2/gcc-11.2.0/blis-0.9.0-dqr5nqarqk2cmec33i6mc4c4l7mgf5li/lib/libblis.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bc/experimentos/cmake-blis/openmp
$ ls -l `spack location -i blis@0.9.0 threads=openmp`/lib
total 1237
-rw-r--r--. 1 bc bc 3960040 Jun 8 17:50 libblis.a
lrwxrwxrwx. 1 bc bc 16 Jun 8 17:50 libblis.so -> libblis.so.4.0.0
lrwxrwxrwx. 1 bc bc 16 Jun 8 17:50 libblis.so.4 -> libblis.so.4.0.0
-rwxr-xr-x. 1 bc bc 2709352 Jun 8 17:50 libblis.so.4.0.0
AMD BLIS:
$ spack load amdblis@3.1 threads=openmp
$ cmake ..
-- The C compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bc/experimentos/cmake-blis/amd
$ ls -l `spack location -i amdblis@3.1 threads=openmp`/lib
total 3
-rw-r--r--. 1 bc bc 6538252 Jun 8 18:11 libblis-mt.a
lrwxrwxrwx. 1 bc bc 19 Jun 8 18:11 libblis-mt.so -> libblis-mt.so.3.1.0
lrwxrwxrwx. 1 bc bc 19 Jun 8 18:11 libblis-mt.so.3 -> libblis-mt.so.3.1.0
-rwxr-xr-x. 1 bc bc 4909176 Jun 8 18:11 libblis-mt.so.3.1.0
Edited by Carlos Bederian