Commit Graph

94 Commits

Author SHA1 Message Date
Brad King
13b40c1ea2 Merge topic 'FindBLAS-LAPACK-docs'
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6218
2021-06-14 09:48:37 -04:00
Brad King
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
Fixes: #22295
2021-06-11 08:41:25 -04:00
Brad King
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation 2021-06-11 08:40:37 -04:00
Brad King
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs 2021-06-11 08:02:59 -04:00
Brad King
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments 2021-06-11 08:00:22 -04:00
Brad King
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout 2021-06-11 07:58:15 -04:00
Brad King
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation
Move the list of vendors to a dedicated section shared by both modules.
Format it as a definition list.
2021-06-11 07:51:37 -04:00
Peter Knowles
130fa72bb3 Find{BLAS,LAPACK}: Update for Intel oneAPI structure under MKLROOT
Add search paths for the Intel oneAPI MKL directory structure
so that we do not rely on paths in `LD_LIBRARY_PATH`.
2021-06-11 06:55:09 -04:00
Robert Maynard
2c9e623e31 Find{BLAS,LAPACK}: Add support for the NVHPC LAPACK library 2021-05-05 12:04:32 -04:00
Brad King
cb6889a09c FindLAPACK: Fix finding generic LAPACK with BLA_STATIC
Fixes: #21071
2021-04-21 14:41:46 -04:00
Brad King
193714d67d Find{BLAS,LAPACK}: Simplify search for static libraries
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_FIND_LIBRARY_SUFFIXES` locally without affecting the global
state.  This avoids the need for local state switching that was added in
commit 9ef82d95d8 (FindBLAS: Fix detection of OpenMP as dependency of
BLA_STATIC, 2021-04-07, v3.20.1~3^2), so remove that.
2021-04-21 14:23:17 -04:00
Brad King
2e2db28e2f Find{BLAS,LAPACK}: Simplify check_function_exists state maintenance
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_REQUIRED_QUIET` locally without affecting the global state.
2021-04-21 14:20:28 -04:00
Brad King
dcd604ee62 Find{BLAS,LAPACK}: Make library variable names more robust 2021-04-14 14:57:03 -04:00
Brad King
98ef6632d9 Find{BLAS,LAPACK}: Generalize recognition of dependencies as link flags 2021-04-14 14:57:03 -04:00
Brad King
a57c4eef76 Find{BLAS,LAPACK}: Convert internal CHECK_*_LIBRARIES to functions 2021-04-14 14:57:03 -04:00
Brad King
a5a6ac7033 Find{BLAS,LAPACK}: Clarify name of internal argument for dependencies 2021-04-14 14:57:03 -04:00
Brad King
d248401d12 Find{BLAS,LAPACK}: Simplify appending to list of libraries 2021-04-14 14:57:03 -04:00
Brad King
116edb5c04 Find{BLAS,LAPACK}: Revert bad refactoring of internal CHECK_*_LIBRARIES
Refactoring in commit 4c74c86f40 (FindBLAS/LAPACK: Add support for the
Fujitsu SSL2 library, 2021-01-27) was done in order to support calling
`find_library` on the dependencies as well as the candidate libraries.
However, it broke a few things:

* Intel MKL's BLAS/LAPACK are no longer found.  We specify their
  dependencies using `-l...` flags, so we should not try to use
  `find_library` for them.

* The dependencies are repeated because we accumulate them in the
  `find_library` search loop and then append them at the end too.

Revert the incorrect part of the refactoring.  Retain the flags part
needed for the Fujitsu vendor.

Fixes: #22056
2021-04-14 14:55:51 -04:00
Chuck Atkins
4c74c86f40 FindBLAS/LAPACK: Add support for the Fujitsu SSL2 library
This also does some additional work to fix issues with
libraries provided only via compiler options and no explicit
library names.

Co-Author: Yuichiro Utsumi <utsumi.yuichiro@jp.fujitsu.com>
2021-03-31 09:15:38 -04:00
Florent Pruvost
d21ad02d44 FindLAPACK: Add pkgconfig support
- mimic FindBLAS

Fixes: #21700
2021-01-14 17:19:07 +01:00
Igor S. Gerasimov
d6df83a690 Find{BLAS,LAPACK}: Add support for Elbrus Math Library
http://mossigplan.acm.org/EML_introduction_engl.pdf
2020-12-09 16:49:41 +03:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Mattias Ellert
68349ae214 Find{BLAS,LAPACK}: Add support for FlexiBLAS
http://www.mpi-magdeburg.mpg.de/mpcsc/software/FlexiBLAS/
2020-09-14 21:40:33 +02:00
Seth R Johnson
c156704ff0 FindLAPACK: Use find_package_handle_standard_args
LAPACK previously used custom and verbose output messages.
2020-08-07 13:08:30 -04:00
Brad King
8a3a1cf71a Merge topic 'find-blas-lapack-mklroot-win'
196f042b58 FindLAPACK: Handle Windows Intel MKLROOT with backslash
96c19ecd55 FindBLAS: Handle Windows Intel MKLROOT with backslash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4982
2020-07-08 08:23:31 -04:00
Michael Hirsch
196f042b58 FindLAPACK: Handle Windows Intel MKLROOT with backslash 2020-07-07 09:55:29 -04:00
Sibi Siddharthan
8e671f2564 FindLAPACK use NAMES_PER_DIR
Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
2020-07-02 00:42:24 +05:30
evatux
56e645a4c3 Find{BLAS,LAPACK}: Add missing thread library for Intel MKL on Win32
The patch also updates the documentation to explicitly state
that Intel10_32 stands for threaded case (linked with Intel OpenMP).
Later, one may need to add Intel10_32_seq to support linking
with the sequential version of Intel MKL.

Fixes: #20857
2020-06-23 09:16:14 -07:00
evatux
8d5a07ce76 FindLAPACK: Extend search directories for MKL
Even though Intel MKL typically puts the libraries under
`$MKLROOT/lib/$arch_$os` some installations may still use
`$MKLROOT/lib/$arch/` path. Ideally, `$arch` should be a
symlink to `$arch_$os`, but sometimes the opposite happens
(for instance, see Intel MKL distribution in Arch Linux [1]),
and sometimes only `$arch` directory alone is present.

This patch extends the search list with `$MKLROOT/lib/$arch` with
lower priority than `$MKLROOT/lib/$arch_$os`, as the latter is the
official path to Intel MKL libraries.

It is also worth mentioning that Intel MKL Link Line Adviser [2]
recommends using `$MKLROOT/lib/$arch` directory in a link line:
```
 -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64
 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
```

[1] https://www.archlinux.org/packages/community/x86_64/intel-mkl/files/

[2] https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html
2020-06-16 10:33:18 -07:00
Robert Maynard
4ed936d1b8 FindLAPACK: Provide the LAPACK::LAPACK import target 2020-04-27 14:19:02 -04:00
Olly Perks
14ffa6e90e Find{BLAS,LAPACK}: Add support for ArmPL targets
Add support for the Arm Performance Libraries (ArmPL) which provide an
implementation of BLAS, LAPACK and FFTW for use on Arm Linux systems:

    https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries
2020-04-09 11:55:04 -04:00
Mario Emmenlauer
807a129f3c Find{BLAS,LAPACK}: Include parent of points directory in search
This is required if MKLROOT points to the subdirectory .../mkl/ instead of
the root of an Intel MKL library installation. Only in this case the MKL
will be searched starting from the parent directory, to detect relevant
dependencies in parallel subdirectories, like 'compiler' and 'tbb'.
2020-01-31 11:36:07 +01:00
Mario Emmenlauer
fe86dc43fe Find{BLAS,LAPACK}: Fixed an incorrect use of a macro argument 2020-01-31 11:32:46 +01:00
Mario Emmenlauer
4d7c69208e Find{BLAS,LAPACK}: Search always in dynamic linker paths
Previously the search in the dynamic linker paths 'LIB', 'LD_LIBRARY_PATH'
and 'DYLD_LIBRARY_PATH' was dependent on the value of the environment
variable 'MKLROOT'. If MKLROOT was given, the dynamic linker paths where
not searched. This seems slightly counter-intuitive.
This PR changes the behavior so that MKLROOT is searched first, but if
unsuccesful, the dynamic linker paths are tried as well.
2020-01-28 10:27:22 +01:00
Mario Emmenlauer
fde5fcbc71 Find{BLAS,LAPACK}: Avoid repeated setting of prefered library suffixes 2020-01-28 10:27:22 +01:00
Mario Emmenlauer
fd1d4b823f Find{BLAS,LAPACK}: Fixed incorrect static library suffix for Apple 2020-01-28 10:27:22 +01:00
Mario Emmenlauer
c60c847510 Find{BLAS,LAPACK}: Added support for MKL single dynamic library 2020-01-28 10:27:22 +01:00
Mario Emmenlauer
59dbff6daa Find{BLAS,LAPACK}: Added support for static MKL required linker flags 2020-01-28 10:27:22 +01:00
Mario Emmenlauer
6bd9cee638 Find{BLAS,LAPACK}: Fixed detection of MKL, and several MKL improvements 2020-01-28 10:27:22 +01:00
Mario Emmenlauer
beb2bbd5b5 Find{BLAS,LAPACK}: Cleanup whitespace, style, and comments
Bring whitespace and code style up to date in these scripts.  Both
scripts share the same origin but have diverged over time, so
synchronize them again.  This is relevant because BLAS and LAPACK
detection is often performed simultaneously, so both scripts should
evolve in sync.  While at it, update a few comments.

This update is intended to have no functional changes.
2020-01-21 22:55:17 +01:00
Mario Emmenlauer
972c2cc7ca FindLAPACK: Fixed order of arguments for internal helper macro 2020-01-21 22:54:15 +01:00
Mario Emmenlauer
7346a3226f Find{BLAS,LAPACK}: Clarify names of internal helper macro
Also clarify names of their arguments.
2020-01-20 11:30:53 -05:00
Brad King
930f204b68 FindLAPACK: Fix support for LAPACK symbols inside BLAS libraries
Fix the condition added by commit 68dcbeee01 (FindLAPACK: Test for
implicitly linked LAPACK libraries, 2019-06-11, v3.16.0-rc1~560^2) to
use BLAS libraries if they are sufficient with no dedicated LAPACK
libraries.

Fixes: #20099
2019-12-18 05:51:50 -05:00
Jakub Benda
68dcbeee01 FindLAPACK: Test for implicitly linked LAPACK libraries
Apply the change from commit 5b8f69ebe9 (FindBLAS: Detect implicitly
linked BLAS library, 2018-08-28, v3.13.0-rc1~150^2~2), to FindLAPACK
also.  Typically both BLAS and LAPACK are provided the same way,
e.g. in a Cray Compiler Environment.
2019-06-17 08:56:05 -04:00
Kitware Robot
932dcce1e6 Modules: Consistently use 2 space indentation 2019-05-14 15:26:46 -04:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Brad King
74cba6a3fd Merge topic 'lapack-docs'
be7b30f67e Find{BLAS,LAPACK}: Add note and example for using Intel MKL
b323407235 Find{BLAS,LAPACK}: Update docs to use modern conventions
ba30b94435 FindLAPACK: Remove extra indentation from a line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2880
2019-01-31 11:08:19 -05:00
Brad King
bb735025de Find{BLAS,LAPACK}: Drop unnecessary mark_as_advanced calls
Cache entries created by `try_compile` are already `INTERNAL`.
2019-01-31 09:11:03 -05:00
Michael Hirsch, Ph.D
be7b30f67e Find{BLAS,LAPACK}: Add note and example for using Intel MKL 2019-01-30 10:16:08 -05:00
Michael Hirsch, Ph.D
b323407235 Find{BLAS,LAPACK}: Update docs to use modern conventions 2019-01-30 10:15:00 -05:00