Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
8a568012
Commit
8a568012
authored
Jun 21, 2016
by
Quentin Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' into master
parents
0f9e1cf9
16b3a43f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
860 additions
and
311 deletions
+860
-311
Addons/CKernelApi/Src/FUserKernelEngine.hpp
Addons/CKernelApi/Src/FUserKernelEngine.hpp
+12
-4
CMakeLists.txt
CMakeLists.txt
+61
-78
CMakeModules/morse/find/FindBLAS.cmake
CMakeModules/morse/find/FindBLAS.cmake
+162
-6
CMakeModules/morse/find/FindBLASEXT.cmake
CMakeModules/morse/find/FindBLASEXT.cmake
+72
-35
CMakeModules/morse/find/FindFFTW.cmake
CMakeModules/morse/find/FindFFTW.cmake
+391
-166
CMakeModules/morse/find/FindLAPACK.cmake
CMakeModules/morse/find/FindLAPACK.cmake
+93
-5
CMakeModules/morse/find/FindLAPACKEXT.cmake
CMakeModules/morse/find/FindLAPACKEXT.cmake
+60
-14
Src/ScalFmmConfig.h.cmake
Src/ScalFmmConfig.h.cmake
+1
-0
Src/Utils/FDft.hpp
Src/Utils/FDft.hpp
+4
-3
Tests/Utils/testFFT.cpp
Tests/Utils/testFFT.cpp
+4
-0
No files found.
Addons/CKernelApi/Src/FUserKernelEngine.hpp
View file @
8a568012
...
...
@@ -125,10 +125,14 @@ public:
virtual
void
M2M
(
CellClass
*
const
FRestrict
cell
,
const
CellClass
*
const
FRestrict
*
const
FRestrict
children
,
const
int
level
)
{
if
(
kernel
.
m2m_full
){
std
::
vector
<
void
*>
userCellArray
;
for
(
int
i
=
0
;
i
<
8
;
++
i
){
userCellArray
.
push_back
(
children
[
i
]
->
getContainer
());
kernel
.
m2m_full
(
level
,
cell
->
getContainer
(),
userCellArray
.
data
(),
userData
);
for
(
int
idx
=
0
;
idx
<
8
;
++
idx
){
if
(
children
[
idx
]
){
userCellArray
.
push_back
(
children
[
idx
]
->
getContainer
());
}
else
{
userCellArray
.
push_back
(
nullptr
);
}
}
kernel
.
m2m_full
(
level
,
cell
->
getContainer
(),
userCellArray
.
data
(),
userData
);
}
else
{
if
(
kernel
.
m2m
){
for
(
int
idx
=
0
;
idx
<
8
;
++
idx
){
...
...
@@ -167,7 +171,11 @@ public:
if
(
kernel
.
l2l_full
){
std
::
vector
<
void
*>
userCellArray
;
for
(
int
i
=
0
;
i
<
8
;
++
i
){
userCellArray
.
push_back
(
children
[
i
]
->
getContainer
());
if
(
children
[
i
]){
userCellArray
.
push_back
(
children
[
i
]
->
getContainer
());
}
else
{
userCellArray
.
push_back
(
nullptr
);
}
kernel
.
l2l_full
(
level
,
cell
->
getContainer
(),
userCellArray
.
data
(),
userData
);
}
}
else
{
...
...
CMakeLists.txt
View file @
8a568012
...
...
@@ -328,9 +328,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# SYMBOL_NAMESPACE "PM_"
# SYMBOLS init testPPM:init)
message
(
STATUS
"CMAKE_CXX_COMPILER_ID STREQUAL
${
CMAKE_CXX_COMPILER_ID
}
"
)
option
(
SCALFMM_USE_MKL_AS_BLAS
"Set to ON to use MKL CBLAS"
OFF
)
option
(
SCALFMM_USE_MKL_AS_BLAS
"Set to ON to use MKL BLAS/LAPACK"
OFF
)
option
(
SCALFMM_USE_ESSL_AS_BLAS
"Set to ON to use ESSL BLAS/LAPACK"
OFF
)
if
(
SCALFMM_USE_MKL_AS_BLAS
)
set
(
BLA_VENDOR
"Intel10_64lp_seq"
)
find_package
(
BLASEXT QUIET
)
# not REQUIRED
...
...
@@ -338,6 +339,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
if
(
BLAS_LIBRARIES
)
set
(
BLASLAPACK_LIBRARIES
${
BLAS_LIBRARIES
}
)
endif
()
elseif
(
SCALFMM_USE_ESSL_AS_BLAS
)
set
(
BLA_VENDOR
"IBMESSL"
)
find_package
(
BLASEXT QUIET
)
# not REQUIRED
find_package
(
LAPACKEXT QUIET
)
# not REQUIRED
if
(
LAPACK_LIBRARIES
)
set
(
BLASLAPACK_LIBRARIES
"
${
LAPACK_LIBRARIES
}
"
)
endif
()
if
(
BLAS_LIBRARIES
)
list
(
APPEND BLASLAPACK_LIBRARIES
${
BLAS_LIBRARIES
}
)
endif
()
elseif
(
SCALFMM_USE_EXTERNAL_BLAS
)
message
(
STATUS
"BLAS SET BY EXTERNAL PROGRAM =
${
BLAS_LIBRARIES
}
"
)
list
(
APPEND BLASLAPACK_LIBRARIES
"
${
BLAS_LIBRARIES
}
"
)
...
...
@@ -352,7 +363,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
list
(
APPEND BLASLAPACK_LIBRARIES
"
${
BLAS_LIBRARIES
}
"
)
endif
()
endif
()
if
(
BLAS_FOUND
)
set
(
SCALFMM_LIBRARIES
"
${
SCALFMM_LIBRARIES
}
;
${
BLASLAPACK_LIBRARIES
}
"
)
if
(
BLAS_LIBRARY_DIRS
)
...
...
@@ -363,6 +374,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# the RPATH to be used when installing
list
(
APPEND CMAKE_INSTALL_RPATH
"
${
LAPACK_LIBRARY_DIRS
}
"
)
endif
()
message
(
STATUS
"check BLAS Fortran mangling"
)
# check blas and lapack symbols naming
set
(
CMAKE_REQUIRED_LIBRARIES
"
${
BLAS_LIBRARIES
}
"
)
check_function_exists
(
dgemv_ DGEMV_ADD_
)
...
...
@@ -374,19 +386,19 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
message
(
STATUS
"BLAS dgemv_ symbol found, SCALFMM_BLAS_ADD_ is ON"
)
else
(
DGEMV_ADD_
)
set
(
SCALFMM_BLAS_ADD_ OFF
)
check_function_exists
(
DGEMV DGEMV_UPCASE
)
if
(
DGEMV_UPCASE
)
set
(
SCALFMM_BLAS_UPCASE ON
)
message
(
STATUS
"BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON"
)
else
(
DGEMV_UPCASE
)
# set (SCALFMM_BLAS_UPCASE OFF)
check_function_exists
(
DGEMV DGEMV_UPCASE
)
if
(
DGEMV_UPCASE
)
set
(
SCALFMM_BLAS_UPCASE ON
)
message
(
STATUS
"BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON"
)
else
(
DGEMV_UPCASE
)
# set (SCALFMM_BLAS_UPCASE OFF)
check_function_exists
(
dgemv DGEMV_NOCHANGE
)
if
(
DGEMV_NOCHANGE
)
set
(
SCALFMM_BLAS_NOCHANGE ON
)
message
(
STATUS
"BLAS dgemv symbol found, SCALFMM_BLAS_NOCHANGE is ON"
)
# else (DGEMV_NOCHANGE)
# set (SCALFMM_BLAS_NOCHANGE OFF)
endif
(
DGEMV_NOCHANGE
)
# else (DGEMV_NOCHANGE)
# set (SCALFMM_BLAS_NOCHANGE OFF)
endif
(
DGEMV_NOCHANGE
)
endif
(
DGEMV_UPCASE
)
endif
(
DGEMV_ADD_
)
if
(
(
NOT DGEMV_ADD_
)
AND
(
NOT DGEMV_UPCASE
)
AND
(
NOT DGEMV_NOCHANGE
)
)
...
...
@@ -403,88 +415,59 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
#
# FFT option
#
CMAKE_DEPENDENT_OPTION
(
SCALFMM_USE_MKL_AS_FFTW
"Set to ON to use MKL FFTW"
ON
"SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS"
OFF
)
CMAKE_DEPENDENT_OPTION
(
SCALFMM_USE_MKL_AS_FFTW
"Set to ON to use MKL FFTW"
ON
"SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS"
OFF
)
CMAKE_DEPENDENT_OPTION
(
SCALFMM_USE_ESSL_AS_FFTW
"Set to ON to use ESSL FFTW"
ON
"SCALFMM_USE_FFT;SCALFMM_USE_ESSL_AS_BLAS"
OFF
)
if
(
SCALFMM_USE_FFT
)
message
(
STATUS
"SCALFMM USE FFT Configure:"
)
# The package find_package(FFTW) can be used with the following COMPONENTS:
# MKL, ESSL, THREADS|OMP and/or SIMPLE|LONG|QUAD
# Default will find the real double precision fftw library version without THREADS|OMP
if
(
SCALFMM_USE_MKL_AS_FFTW
)
message
(
STATUS
" SCALFMM USE FFT from MKL"
)
find_package
(
FFTW COMPONENTS MKL
)
elseif
(
SCALFMM_USE_ESSL_AS_FFTW
)
message
(
STATUS
" SCALFMM USE FFT from ESSL "
)
find_package
(
FFTW COMPONENTS ESSL
)
add_definitions
(
-DSCALFMM_USE_ESSL_AS_FFTW
)
else
()
message
(
STATUS
" SCALFMM USE FFTW"
)
find_package
(
FFTW COMPONENTS SIMPLE
)
endif
()
message
(
STATUS
" SCALFMM USE MKL "
)
if
(
SCALFMM_USE_MKL_AS_BLAS
)
unset
(
FFT_LIBRARIES CACHE
)
message
(
STATUS
" SCALFMM USE MKL already defined"
)
set
(
FFT_INCLUDES
"$ENV{MKLROOT}/include/fftw"
CACHE STRING
"Set your MKL flags"
)
if
(
BLAS_FOUND
)
set
(
FFTW_FOUND ON
)
endif
()
else
(
SCALFMM_USE_MKL_AS_BLAS
)
# The package can be used with the following COMPONENTS:
# MKL, THREADS|OMP and/or SIMPLE|DOUBLE|LONG|QUAD
# Default is DOUBLE and without THREADS|OMP
find_package
(
FFTW COMPONENTS MKL
)
# not REQUIRED
if
(
FFTW_LIBRARY_DIRS_DEP
)
set
(
FFT_LIBRARIES
"-L
${
FFTW_LIBRARY_DIRS_DEP
}
;"
CACHE STRING
"Set your MKL flags"
)
endif
()
if
(
FFTW_LIBRARIES_DEP
)
foreach
(
fft_lib
${
FFTW_LIBRARIES_DEP
}
)
set
(
FFT_LIBRARIES
"
${
FFT_LIBRARIES
}
;
${
fft_lib
}
;"
)
endforeach
()
endif
()
set
(
FFT_INCLUDES
"
${
FFTW_INCLUDE_DIRS_DEP
}
"
)
if
(
FFT_LIBRARIES
)
set
(
SCALFMM_LIBRARIES
"
${
SCALFMM_LIBRARIES
}
;
${
FFT_LIBRARIES
}
"
)
endif
()
endif
(
SCALFMM_USE_MKL_AS_BLAS
)
else
(
SCALFMM_USE_MKL_AS_FFTW
)
message
(
STATUS
" SCALFMM USE FFTW "
)
# The package can be used with the following COMPONENTS:
# MKL, THREADS|OMP and/or SIMPLE|DOUBLE|LONG|QUAD
# Default is DOUBLE and without THREADS|OMP
find_package
(
FFTW COMPONENTS SIMPLE
)
# not REQUIRED
if
(
FFTW_LIBRARY_DIRS_DEP
)
set
(
FFT_LIBRARIES
"-L
${
FFTW_LIBRARY_DIRS_DEP
}
;"
CACHE STRING
"Set your FFTW path"
)
endif
()
if
(
FFTW_LIBRARIES_DEP
)
foreach
(
fft_lib
${
FFTW_LIBRARIES_DEP
}
)
set
(
FFT_LIBRARIES
"
${
FFT_LIBRARIES
}
;
${
fft_lib
}
;"
)
endforeach
()
endif
()
set
(
FFT_INCLUDES
"
${
FFTW_INCLUDE_DIRS_DEP
}
"
)
if
(
FFT_LIBRARIES
)
set
(
SCALFMM_LIBRARIES
"
${
SCALFMM_LIBRARIES
}
;
${
FFT_LIBRARIES
}
"
)
endif
()
if
(
FFTW_LIBRARY_DIRS
)
# the RPATH to be used when installing
list
(
APPEND CMAKE_INSTALL_RPATH
"
${
FFTW_LIBRARY_DIRS
}
"
)
endif
()
if
(
FFTW_LIBRARY_DIRS_DEP
)
set
(
FFT_LIBRARIES
"-L
${
FFTW_LIBRARY_DIRS_DEP
}
;"
CACHE STRING
"Set your MKL flags"
)
endif
()
if
(
FFTW_LIBRARIES_DEP
)
foreach
(
fft_lib
${
FFTW_LIBRARIES_DEP
}
)
set
(
FFT_LIBRARIES
"
${
FFT_LIBRARIES
}
;
${
fft_lib
}
;"
)
endforeach
()
endif
()
endif
(
SCALFMM_USE_MKL_AS_FFTW
)
set
(
FFT_INCLUDES
"
${
FFTW_INCLUDE_DIRS_DEP
}
"
)
if
(
FFT_LIBRARIES
)
set
(
SCALFMM_LIBRARIES
"
${
SCALFMM_LIBRARIES
}
;
${
FFT_LIBRARIES
}
"
)
endif
()
if
(
FFTW_LIBRARY_DIRS
)
# the RPATH to be used when installing
list
(
APPEND CMAKE_INSTALL_RPATH
"
${
FFTW_LIBRARY_DIRS
}
"
)
endif
()
if
(
FFT_INCLUDES
)
set
(
SCALFMM_INCLUDES
"
${
SCALFMM_INCLUDES
}
;
${
FFT_INCLUDES
}
"
)
endif
()
if
(
FFTW_FOUND
)
message
(
STATUS
" SCALFMM_LIBRARIES =
${
SCALFMM_LIBRARIES
}
"
)
message
(
STATUS
" SCALFMM_INCLUDES =
${
SCALFMM_INCLUDES
}
"
)
else
()
if
(
NOT FFTW_FOUND
)
message
(
WARNING
"FFTW has not been found, SCALFMM will continue to compile but some applications will be disabled."
)
message
(
WARNING
"If you have FFTW set FFTW_LIBDIR, FFTW_INCDIR or FFTW_DIR (CMake variables using -D or environment variables)."
)
set
(
SCALFMM_USE_FFT OFF
)
endif
()
endif
(
SCALFMM_USE_FFT
)
list
(
APPEND FUSE_LIST
"FFT"
)
message
(
STATUS
" SCALFMM_LIBRARIES =
${
SCALFMM_LIBRARIES
}
"
)
message
(
STATUS
" SCALFMM_INCLUDES =
${
SCALFMM_INCLUDES
}
"
)
message
(
STATUS
"SCALFMM_USE_FFT =
${
SCALFMM_USE_FFT
}
"
)
list
(
REMOVE_DUPLICATES SCALFMM_INCLUDES
)
list
(
REMOVE_DUPLICATES SCALFMM_LIBRARIES
)
#
# C++ 2011
...
...
@@ -788,7 +771,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set
(
SCALFMM_COMPILE_LIBS
""
)
foreach
(
lib_var
${
SCALFMM_LIBRARIES
}
)
string
(
STRIP
${
lib_var
}
lib_var
)
LIST
(
APPEND SCALFMM_COMPILE_LIBS
${
lib_var
}
)
LIST
(
APPEND SCALFMM_COMPILE_LIBS
${
lib_var
}
)
endforeach
()
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/Src/ScalFmmConfig.h.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/Src/ScalFmmConfig.h
)
...
...
CMakeModules/morse/find/FindBLAS.cmake
View file @
8a568012
...
...
@@ -44,7 +44,7 @@
### List of vendors (BLA_VENDOR) valid in this module
########## List of vendors (BLA_VENDOR) valid in this module
## Open (for OpenBlas), Eigen (for EigenBlas), Goto, ATLAS PhiPACK,
## CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
## CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
IBMESSLMT
## Intel10_32 (intel mkl v10 32 bit), Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
## Intel10_64lp_seq (intel mkl v10 64 bit,sequential code, lp64 model),
## Intel( older versions of mkl 32 and 64 bit),
...
...
@@ -330,11 +330,9 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
if
(
_libraries_work
)
set
(
${
LIBRARIES
}
${${
LIBRARIES
}}
${
_thread
}
)
else
(
_libraries_work
)
set
(
${
LIBRARIES
}
FALSE
)
set
(
${
LIBRARIES
}
FALSE
)
endif
(
_libraries_work
)
# message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
endmacro
(
Check_Fortran_Libraries
)
...
...
@@ -707,6 +705,14 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
endif
(
_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
${
_LIBRARIES
}
)
message
(
STATUS
"Looking for MKL BLAS: found"
)
else
()
message
(
STATUS
"Looking for MKL BLAS: not found"
)
endif
()
endif
()
endif
(
BLA_VENDOR MATCHES
"Intel*"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -722,6 +728,13 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
"goto2"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Goto BLAS: found"
)
else
()
message
(
STATUS
"Looking for Goto BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"Goto"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -740,6 +753,13 @@ if (BLA_VENDOR STREQUAL "Open" OR BLA_VENDOR STREQUAL "All")
"openblas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Open BLAS: found"
)
else
()
message
(
STATUS
"Looking for Open BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"Open"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -758,6 +778,13 @@ if (BLA_VENDOR STREQUAL "Eigen" OR BLA_VENDOR STREQUAL "All")
"eigen_blas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Eigen BLAS: found"
)
else
()
message
(
STATUS
"Looking for Eigen BLAS: not found"
)
endif
()
endif
()
endif
()
if
(
NOT BLAS_LIBRARIES
)
...
...
@@ -770,6 +797,13 @@ if (BLA_VENDOR STREQUAL "Eigen" OR BLA_VENDOR STREQUAL "All")
"eigen_blas_static"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Eigen BLAS: found"
)
else
()
message
(
STATUS
"Looking for Eigen BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"Eigen"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -787,6 +821,13 @@ if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
"f77blas;atlas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Atlas BLAS: found"
)
else
()
message
(
STATUS
"Looking for Atlas BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"ATLAS"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -804,6 +845,13 @@ if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
"sgemm;dgemm;blas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for PhiPACK BLAS: found"
)
else
()
message
(
STATUS
"Looking for PhiPACK BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"PhiPACK"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -821,6 +869,13 @@ if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
"cxml"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for CXML BLAS: found"
)
else
()
message
(
STATUS
"Looking for CXML BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"CXML"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -838,6 +893,13 @@ if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
"dxml"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for DXML BLAS: found"
)
else
()
message
(
STATUS
"Looking for DXML BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"DXML"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -858,6 +920,13 @@ if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
if
(
BLAS_LIBRARIES
)
set
(
BLAS_LINKER_FLAGS
"-xlic_lib=sunperf"
)
endif
()
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for SunPerf BLAS: found"
)
else
()
message
(
STATUS
"Looking for SunPerf BLAS: not found"
)
endif
()
endif
()
endif
()
endif
()
...
...
@@ -875,6 +944,13 @@ if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
"scsl"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for SCSL BLAS: found"
)
else
()
message
(
STATUS
"Looking for SCSL BLAS: not found"
)
endif
()
endif
()
endif
()
endif
()
...
...
@@ -892,12 +968,19 @@ if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
"complib.sgimath"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for SGIMATH BLAS: found"
)
else
()
message
(
STATUS
"Looking for SGIMATH BLAS: not found"
)
endif
()
endif
()
endif
()
endif
()
# BLAS in IBM ESSL library
?
(requires generic BLAS lib, too)
# BLAS in IBM ESSL library (requires generic BLAS lib, too)
if
(
BLA_VENDOR STREQUAL
"IBMESSL"
OR BLA_VENDOR STREQUAL
"All"
)
if
(
NOT BLAS_LIBRARIES
)
...
...
@@ -906,9 +989,39 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
BLAS
sgemm
""
"essl"
"essl;xlfmath;xlf90_r;blas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for IBM ESSL BLAS: found"
)
else
()
message
(
STATUS
"Looking for IBM ESSL BLAS: not found"
)
endif
()
endif
()
endif
()
endif
()
# BLAS in IBM ESSL_MT library (requires generic BLAS lib, too)
if
(
BLA_VENDOR STREQUAL
"IBMESSLMT"
OR BLA_VENDOR STREQUAL
"All"
)
if
(
NOT BLAS_LIBRARIES
)
check_fortran_libraries
(
BLAS_LIBRARIES
BLAS
sgemm
""
"esslsmp;xlsmp;xlfmath;xlf90_r;blas"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for IBM ESSL MT BLAS: found"
)
else
()
message
(
STATUS
"Looking for IBM ESSL MT BLAS: not found"
)
endif
()
endif
()
endif
()
endif
()
...
...
@@ -1035,6 +1148,13 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml;acml_mv"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for ACML BLAS: found"
)
else
()
message
(
STATUS
"Looking for ACML BLAS: not found"
)
endif
()
endif
()
endif
()
if
(
NOT BLAS_LIBRARIES
)
...
...
@@ -1046,6 +1166,13 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml_mp;acml_mv"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for ACML BLAS: found"
)
else
()
message
(
STATUS
"Looking for ACML BLAS: not found"
)
endif
()
endif
()
endif
()
if
(
NOT BLAS_LIBRARIES
)
...
...
@@ -1057,6 +1184,13 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml;acml_mv;CALBLAS"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for ACML BLAS: found"
)
else
()
message
(
STATUS
"Looking for ACML BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR MATCHES
"ACML.*"
OR BLA_VENDOR STREQUAL
"All"
)
# ACML
...
...
@@ -1074,6 +1208,13 @@ if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
"Accelerate"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Apple BLAS: found"
)
else
()
message
(
STATUS
"Looking for Apple BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"Apple"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -1090,8 +1231,16 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
"vecLib"
""
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for NAS BLAS: found"
)
else
()
message
(
STATUS
"Looking for NAS BLAS: not found"
)
endif
()
endif
()
endif
()
endif
(
BLA_VENDOR STREQUAL
"NAS"
OR BLA_VENDOR STREQUAL
"All"
)
...
...
@@ -1110,6 +1259,13 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
"
${
SEARCH_LIB
}
"
"
${
LGFORTRAN
}
"
)
if
(
NOT BLAS_FIND_QUIETLY
)
if
(
BLAS_LIBRARIES
)
message
(
STATUS
"Looking for Generic BLAS: found"
)
else
()
message
(
STATUS
"Looking for Generic BLAS: not found"
)
endif
()
endif
()
endif
()
endforeach
()
...
...
CMakeModules/morse/find/FindBLASEXT.cmake
View file @
8a568012
...
...
@@ -43,13 +43,25 @@
# add a cache variable to let the user specify the BLAS vendor
set
(
BLA_VENDOR
""
CACHE STRING
"list of possible BLAS vendor:
Open, Eigen, Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
Open, Eigen, Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
IBMESSLMT,
Intel10_32 (intel mkl v10 32 bit),
Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),
Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),
Intel( older versions of mkl 32 and 64 bit),
ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic"
)
if
(
NOT BLASEXT_FIND_QUIETLY
)
message
(
STATUS
"In FindBLASEXT"
)
message
(
STATUS
"If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure."
)
message
(
STATUS
"List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic"
)
endif
()
if
(
NOT BLAS_FOUND
)
# First try to detect two cases:
...
...
@@ -75,34 +87,24 @@ if(BLA_VENDOR STREQUAL "All" AND
endif
()
if
(
NOT BLASEXT_FIND_QUIETLY
)
message
(
STATUS
"A BLAS library has been found (
${
BLAS_LIBRARIES
}
) but we"
"have also potentially detected some BLAS libraries from the MKL."
"We try to use this one."
)
message
(
STATUS
"If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure."
)
message
(
STATUS
"List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic"
)
"have also potentially detected some multithreaded BLAS libraries from the MKL."
"We try to find both libraries lists (Sequential/Multithreaded)."
)
endif
()
set
(
BLAS_FOUND
""
)
elseif
(
BLA_VENDOR STREQUAL
"All"
AND BLAS_acml_LIBRARY
)
set
(
BLA_VENDOR
"ACML"
)
if
(
NOT BLASEXT_FIND_QUIETLY
)
message
(
STATUS
"A BLAS library has been found (
${
BLAS_LIBRARIES
}
) but we"
"have also potentially detected some BLAS libraries from the ACML."
"We try to use this one."
)
message
(
STATUS
"If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure."
)
message
(
STATUS
"List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic"
)
"have also potentially detected some multithreaded BLAS libraries from the ACML."
"We try to find both libraries lists (Sequential/Multithreaded)."
)
endif
()
set
(
BLAS_FOUND
""
)
elseif
(
BLA_VENDOR STREQUAL
"All"
AND BLAS_essl_LIBRARY
)
set
(
BLA_VENDOR
"IBMESSL"
)
if
(
NOT BLASEXT_FIND_QUIETLY
)
message
(
STATUS
"A BLAS library has been found (
${
BLAS_LIBRARIES
}
) but we"
"have also potentially detected some multithreaded BLAS libraries from the ESSL."
"We try to find both libraries lists (Sequential/Multithreaded)."
)
endif
()
set
(
BLAS_FOUND
""
)
endif
()
...
...
@@ -238,6 +240,35 @@ elseif(BLA_VENDOR MATCHES "ACML*")
set
(
BLAS_PAR_LIBRARIES
"
${
BLAS_PAR_LIBRARIES-NOTFOUND
}
"
)
endif
()
# IBMESSL case
elseif
(
BLA_VENDOR MATCHES
"IBMESSL*"
)
## look for the sequential version
set
(
BLA_VENDOR
"IBMESSL"
)
if
(
BLASEXT_FIND_REQUIRED
)
find_package
(
BLAS REQUIRED
)
else
()
find_package
(
BLAS
)
endif
()
if
(
BLAS_FOUND
)
set
(
BLAS_SEQ_LIBRARIES
"
${
BLAS_LIBRARIES
}
"
)
else
()
set
(
BLAS_SEQ_LIBRARIES
"
${
BLAS_SEQ_LIBRARIES-NOTFOUND
}
"
)
endif
()
## look for the multithreaded version
set
(
BLA_VENDOR
"IBMESSLMT"
)
if
(
BLASEXT_FIND_REQUIRED
)