Commit Graph

71 Commits

Author SHA1 Message Date
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
Michael Hirsch, Ph.D
ba30b94435 FindLAPACK: Remove extra indentation from a line 2019-01-30 08:20:10 -05:00
Jakub Benda
d5f691be0b FindLAPACK: Additional libraries for MKL+gfortran combination
As per Intel MKL command line advisor, "libdl" is added to the list of
libraries that provide LAPACK functionality. Furthermore, the implicit
link directories are added to the searched libraries to allow finding
of "libgomp".
2018-11-18 20:16:39 +00:00
Jakub Benda
8b63265ea5 FindLAPACK: Unify internal variables related to MKL
Auxiliary internal variables related to MKL are now consistently
prefixed with LAPACK_mkl_ and unset at the end of the MKL section.
2018-11-18 20:00:14 +00:00
Jakub Benda
ede1715c1d FindLAPACK: Remove MKL components already provided by MKL BLAS
A surplus library libmkl_gf_... has been removed from the LAPACK
libraries serach path (when relevant, it is already provided by BLAS).
Similarly, the thread libraries do not need to be explicitly added to
the implicit LAPACK libraries, as they are already included in the
list (via BLAS libraries provided by FindBLAS).
2018-11-18 19:56:24 +00:00
Jakub Benda
03879b11af FindLAPACK: Prioritize Intel MKL
As in FindBLAS, the Intel Math Kernel Library is now the preferred
LAPACK vendor. (The corresponding section of the code has been moved
upwards.)
2018-11-18 19:48:23 +00:00
Brad King
c752edfcb3 Merge topic 'blaslapack95'
f1a3e4eca8 FindLAPACK: Correct library name and symbol searched in LAPACK95 wrapper
970b18e9a5 FindBLAS: Correct symbol searched in BLAS95 wrapper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2560
2018-11-06 11:29:42 -05:00
Jakub Benda
f1a3e4eca8 FindLAPACK: Correct library name and symbol searched in LAPACK95 wrapper
The symbol "CHEEV", originally used to determine if a library provides
Fortran 95 wrappers for LAPACK, has been replaced by "cheev_f95". "CHEEV"
is provided by libmkl_intel_(i)lp64, which does not provide the generic
Fortran 95 wrappers. Instead, libmkl_lapack95_(i)lp64 does; one of the
specializations of the type-generic interfaces contained in that library
is "lapack_f95".

Also, FindLAPACK used libmkl_intel_(i)lp64 instead of the correct
libmkl_lapack95_(i)lp64 library for LAPACK95 functionality. This has
been fixed, too.
2018-11-05 08:00:02 -05:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Jakub Benda
d0fb3e6c52 Find{BLAS,LAPACK}: Find also ILP64 MKL BLAS and LAPACK
Modern Intel MKL packages offer 64-bit BLAS and LAPACK libraries in any
of the eight combinations of the following three binary options:

  - sequential or threaded
  - LP64 or ILP64
  - static or shared

The modules FindBLAS and FindLAPACK did not allow full selection of
arbitrary combination; in particular, only LP64 variant was used.

The original list of possible BLA_VENDOR values related to MKL,

  Intel10_64lp
  Intel10_64lp_seq

is thus extended by another pair of "vendors",

  Intel10_64ilp
  Intel10_64ilp_seq

Depending on the selection, either "_lp64", or "_ilp64" MKL libraries
are searched for. Some comments in the two CMake modules were modified
to indicate that even though the "vendors" contain the number "10",
they also apply to all further versions of MKL.
2018-10-08 13:21:08 -04:00
J M Dieterich
f5bc78263e Find{BLAS,LAPACK}: Add support for FLAME blis and libflame
FLAME (github.com/flame) provides a variety of numerical libraries.
`blis` and `libflame` can be setup to expose BLAS/LAPACK interfaces.

Fixes: #17470
2017-11-16 11:43:15 -05:00
Gregor Jasny
ded9859c92 FindBLAS/LAPACK: Format documentation
Closes #16624
2017-03-22 09:10:28 -04:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Melven Roehrig-Zoellner
1694112dfa Find{BLAS,LAPACK}: Fix when used in pure Fortran projects (#16039)
Use `CMAKE_<LANG>_COMPILER_LOADED` to detect enabled languages because
`if( _LANGUAGES_ MATCHES C )` is always true on Windows as the RC
language is activated automatically and matches C.
2016-04-05 09:03:23 -04:00
J M Dieterich
5f6b4f690a Find{BLAS,LAPACK}: Add support for OpenBLAS (#16024)
OpenBLAS (www.openblas.net) is the successor to GotoBLAS.
2016-03-18 11:23:36 -04:00
Rolf Eike Beer
7eacbaed4d Replace MATCHES ".+" tests with NOT STREQUAL "" 2014-04-14 18:17:23 +02:00
Rolf Eike Beer
b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Clinton Stimpson
83934757c9 Find*: Make find_package(.. QUIET) affect Check* modules.
Fixes issues #14812 and #14813 where find_package(OpenMP QUIET) and
find_package(Qt4 QUIET) would still print out messages when calling
check*() functions.

Also a partial fix for  #14445 where building CMake
(without cmake-gui) when Qt5 is installed and Qt4 is not installed
and warnings come out of FindQt4.cmake.
2014-03-29 20:22:54 -06:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Leszek Swirski
192a9182f8 FindLAPACK: MKL clean up and fix for windows 2013-10-08 16:07:43 +01:00
Rolf Eike Beer
8ebf74b02f Find* (and some other): use ${CMAKE_CURRENT_LIST_DIR} in include()
This solves a lots of warnings, e.g. in the FindModulesExecuteAll test. If the
installed version on the system is rather old this may even lead to bugs, e.g.
https://bugs.gentoo.org/show_bug.cgi?id=436540
2012-11-04 05:55:37 +01:00
Kitware Robot
9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Rolf Eike Beer
af80da349b remove lib64 Unix paths if the respective lib path is also given
If FIND_LIBRARY_USE_LIB64_PATHS is set both will be searched anyway.
2012-07-21 10:15:52 +02:00
Alexey Ozeritsky
4585e573b8 FindBLAS/FindLAPACK: Work with MKL version 10.3 (#12924, #12925) 2012-02-16 18:03:08 -05:00