...
 
Commits (2)
......@@ -74,7 +74,7 @@
## 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, User (see BLAS_LIBRARIES_USER)
##  ARMPL, ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic, User (see BLAS_LIBRARIES_USER)
# C/CXX should be enabled to use Intel mkl
###
# We handle different modes to find the dependency
......@@ -161,6 +161,7 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
set(${LIBRARIES})
set(_combined_name)
set(ENV_MKLROOT "$ENV{MKLROOT}")
set(ENV_ARMPL "$ENV{ARMPL_DIR}")
set(ENV_BLAS_DIR "$ENV{BLAS_DIR}")
set(ENV_BLAS_LIBDIR "$ENV{BLAS_LIBDIR}")
if (NOT _libdir)
......@@ -199,6 +200,9 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32")
endif()
endif()
if (ENV_ARMPL)
list(APPEND _libdir "${ENV_ARMPL}/lib")
endif()
list(APPEND _libdir "$ENV{LIBRARY_PATH}")
if (WIN32)
string(REPLACE ":" ";" _libdir2 "$ENV{LIB}")
......@@ -452,7 +456,7 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
# set paths where to look for
set(PATH_TO_LOOK_FOR "${_inc_env}")
# Try to find the fftw header in the given paths
# Try to find the mkl header in the given paths
# -------------------------------------------------
# call cmake macro to find the header path
if(BLAS_INCDIR)
......@@ -853,6 +857,103 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
unset(BLAS_mkl_threading)
endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (BLA_VENDOR MATCHES "ARMPL*" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES OR BLA_VENDOR MATCHES "ARMPL*")
# Looking for include
# -------------------
# Add system include paths to search include
# ------------------------------------------
unset(_inc_env)
set(ENV_ARMPL "$ENV{ARMPL_DIR}")
set(ENV_BLAS_DIR "$ENV{BLAS_DIR}")
set(ENV_BLAS_INCDIR "$ENV{BLAS_INCDIR}")
if(ENV_BLAS_INCDIR)
list(APPEND _inc_env "${ENV_BLAS_INCDIR}")
elseif(ENV_BLAS_DIR)
list(APPEND _inc_env "${ENV_BLAS_DIR}")
list(APPEND _inc_env "${ENV_BLAS_DIR}/include")
else()
if (ENV_ARMPL)
list(APPEND _inc_env "${ENV_ARMPL}/include")
endif()
# system variables
if(WIN32)
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}")
list(APPEND _inc_env "${_path_env}")
else()
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{CPATH}")
list(APPEND _inc_env "${_path_env}")
string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}")
list(APPEND _inc_env "${_path_env}")
endif()
endif()
list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
list(REMOVE_DUPLICATES _inc_env)
# set paths where to look for
set(PATH_TO_LOOK_FOR "${_inc_env}")
# Try to find the armpl header in the given paths
# -------------------------------------------------
# call cmake macro to find the header path
if(BLAS_INCDIR)
set(BLAS_armpl.h_DIRS "BLAS_armpl.h_DIRS-NOTFOUND")
find_path(BLAS_armpl.h_DIRS
NAMES armpl.h
HINTS ${BLAS_INCDIR})
else()
if(BLAS_DIR)
set(BLAS_armpl.h_DIRS "BLAS_armpl.h_DIRS-NOTFOUND")
find_path(BLAS_armpl.h_DIRS
NAMES armpl.h
HINTS ${BLAS_DIR}
PATH_SUFFIXES "include")
else()
set(BLAS_armpl.h_DIRS "BLAS_armpl.h_DIRS-NOTFOUND")
find_path(BLAS_armpl.h_DIRS
NAMES armpl.h
HINTS ${PATH_TO_LOOK_FOR})
endif()
endif()
mark_as_advanced(BLAS_armpl.h_DIRS)
# If found, add path to cmake variable
# ------------------------------------
if (BLAS_armpl.h_DIRS)
set(BLAS_INCLUDE_DIRS "${BLAS_armpl.h_DIRS}")
else ()
set(BLAS_INCLUDE_DIRS "BLAS_INCLUDE_DIRS-NOTFOUND")
if(NOT BLAS_FIND_QUIETLY)
message(STATUS "Looking for BLAS -- armpl.h not found")
endif()
endif()
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"armpl"
""
)
if(NOT BLAS_FIND_QUIETLY)
if(BLAS_LIBRARIES)
message(STATUS "Looking for ARMPL BLAS: found")
else()
message(STATUS "Looking for ARMPL BLAS: not found")
endif()
endif()
if (BLAS_LIBRARIES)
set (BLAS_VENDOR_FOUND "ARMPL")
endif()
endif (NOT BLAS_LIBRARIES OR BLA_VENDOR MATCHES "ARMPL*")
endif (BLA_VENDOR MATCHES "ARMPL*" OR BLA_VENDOR STREQUAL "All")
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
......
......@@ -1008,6 +1008,7 @@ subs = {
('', 'S_', 'D_', 'C_', 'Z_' ),
('', 'FLT_EPSILON', 'DBL_EPSILON', 'FLT_EPSILON', 'DBL_EPSILON' ),
('', 's_RAFF_FLOAT', 'd_RAFF_FLOAT', 'c_RAFF_FLOAT', 'z_RAFF_FLOAT' ),
('', 'MPI_FLOAT', 'MPI_DOUBLE', 'MPI_COMPLEX32', 'MPI_COMPLEX64' ),
('', 'MPI_FLOAT', 'MPI_DOUBLE', 'MPI_COMPLEX', 'MPI_DOUBLE_COMPLEX'),
('', 'MPI_FLOAT', 'MPI_DOUBLE', 'MPI_FLOAT', 'MPI_DOUBLE' ),
# ----- unused?
......