Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandicoot adaption #352

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
environment:
ARMADILLO_DOWNLOAD: "https://sourceforge.net/projects/arma/files/armadillo-9.800.6.tar.xz"
ARMADILLO_DOWNLOAD: "http://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zoq is that version downgrade deliberate?
recent releases of ensmallen require armadillo 9.800+

BLAS_LIBRARY: "%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a"
BLAS_LIBRARY_DLL: "%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll"

Expand All @@ -26,7 +26,7 @@ build_script:
- cd ..
- appveyor DownloadFile %ARMADILLO_DOWNLOAD% -FileName armadillo.tar.xz
- 7z x armadillo.tar.xz -so -txz | 7z x -si -ttar > nul
- cd armadillo-9.800.6 && mkdir build && cd build
- cd armadillo-8.400.0 && mkdir build && cd build
- >
cmake -G "%VSVER%"
-DBLAS_LIBRARY:FILEPATH=%BLAS_LIBRARY%
Expand All @@ -43,7 +43,7 @@ build_script:
- cd ensmallen && mkdir build && cd build
- >
cmake -G "%VSVER%"
-DARMADILLO_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%/../armadillo-9.800.6/include/
-DARMADILLO_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%/../armadillo-8.400.0/include/
-DARMADILLO_LIBRARIES=%BLAS_LIBRARY%
-DLAPACK_LIBRARY=%BLAS_LIBRARY%
-DBLAS_LIBRARY=%BLAS_LIBRARY%
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ script:
- if [ $ARMADILLO == "latest" ]; then
curl https://ftp.fau.de/macports/distfiles/armadillo/`curl https://ftp.fau.de/macports/distfiles/armadillo/ -- | grep '.tar.xz' | sed 's/^.*<a href="\(armadillo-[0-9]*.[0-9]*.[0-9]*.tar.xz\)".*$/\1/' | tail -1` | tar xvJ && cd armadillo*;
else
curl -L https://sourceforge.net/projects/arma/files/armadillo-9.800.6.tar.xz | tar -xvJ && cd armadillo*;
curl https://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*;
fi
- cmake . && make && sudo make install && cd ..
- mkdir build && cd build && cmake .. && make ensmallen_tests -j2
Expand Down
44 changes: 44 additions & 0 deletions CMake/COOT_FindCLBLAS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - Find clBLAS (includes and library)
# This module defines
# CLBLAS_INCLUDE_DIR
# CLBLAS_LIBRARIES
# CLBLAS_FOUND
# also defined, but not for general use are
# CLBLAS_LIBRARY, where to find the library.

find_path(CLBLAS_INCLUDE_DIR clBLAS.h
/usr/include/
/usr/local/include/
)

set(CLBLAS_NAMES ${CLBLAS_NAMES} clBLAS)
find_library(CLBLAS_LIBRARY
NAMES ${CLBLAS_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
)

if (CLBLAS_LIBRARY AND CLBLAS_INCLUDE_DIR)
set(CLBLAS_LIBRARIES ${CLBLAS_LIBRARY})
set(CLBLAS_FOUND "YES")
else ()
set(CLBLAS_FOUND "NO")
endif ()

if (CLBLAS_FOUND)
if (NOT CLBLAS_FIND_QUIETLY)
message(STATUS "Found a clBLAS library: ${CLBLAS_LIBRARIES}")
endif ()
else ()
if (CLBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find a clBLAS library")
endif ()
endif ()

# Deprecated declarations.
set (NATIVE_CLBLAS_INCLUDE_PATH ${CLBLAS_INCLUDE_DIR} )
get_filename_component (NATIVE_CLBLAS_LIB_PATH ${CLBLAS_LIBRARY} PATH)

mark_as_advanced(
CLBLAS_LIBRARY
CLBLAS_INCLUDE_DIR
)
44 changes: 44 additions & 0 deletions CMake/COOT_FindCLBlast.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - Find clBlast (includes and library)
# This module defines
# CLBLAST_INCLUDE_DIR
# CLBLAST_LIBRARIES
# CLBLAST_FOUND
# also defined, but not for general use are
# CLBLAST_LIBRARY, where to find the library.

find_path(CLBLAST_INCLUDE_DIR clblast.h
/usr/include/
/usr/local/include/
)

set(CLBLAST_NAMES ${CLBLAST_NAMES} clblast)
find_library(CLBLAST_LIBRARY
NAMES ${CLBLAST_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
)

if (CLBLAST_LIBRARY AND CLBLAST_INCLUDE_DIR)
set(CLBLAST_LIBRARIES ${CLBLAST_LIBRARY})
set(CLBLAST_FOUND "YES")
else ()
set(CLBLAST_FOUND "NO")
endif ()

if (CLBLAST_FOUND)
if (NOT CLBLAST_FIND_QUIETLY)
message(STATUS "Found a clBlast library: ${CLBLAST_LIBRARIES}")
endif ()
else ()
if (CLBLAST_FIND_REQUIRED)
message(FATAL_ERROR "Could not find a clBlast library")
endif ()
endif ()

# Deprecated declarations.
set (NATIVE_CLBLAST_INCLUDE_PATH ${CLBLAST_INCLUDE_DIR} )
get_filename_component (NATIVE_CLBLAST_LIB_PATH ${CLBLAST_LIBRARY} PATH)

mark_as_advanced(
CLBLAST_LIBRARY
CLBLAST_INCLUDE_DIR
)
35 changes: 35 additions & 0 deletions CMake/COOT_FindNVRTC.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# - Find clBlast (includes and library)
# This module defines
# CLBLAST_INCLUDE_DIR
# CLBLAST_LIBRARIES
# CLBLAST_FOUND
# also defined, but not for general use are
# CLBLAST_LIBRARY, where to find the library.

set(NVRTC_NAMES ${NVRTC_NAMES} nvrtc)
find_library(NVRTC_LIBRARY
NAMES ${NVRTC_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu/
)

if (NVRTC_LIBRARY)
set(NVRTC_LIBRARIES ${NVRTC_LIBRARY})
set(NVRTC_FOUND "YES")
else ()
set(NVRTC_FOUND "NO")
endif ()

if (NVRTC_FOUND)
if (NOT NVRTC_FIND_QUIETLY)
message(STATUS "Found NVRTC library: ${NVRTC_LIBRARIES}")
endif ()
else ()
if (NVRTC_FIND_REQUIRED)
message(FATAL_ERROR "Could not find NVRTC library")
endif ()
endif ()

# Deprecated declarations.
get_filename_component (NATIVE_NVRTC_LIB_PATH ${NVRTC_LIBRARY} PATH)

mark_as_advanced(NVRTC_LIBRARY)
2 changes: 1 addition & 1 deletion CMake/FindArmadillo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp")

# ARMA_USE_BLAS
string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_BLAS[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_BLAS[ \t]*\r?\n" ARMA_USE_BLAS "${_armadillo_CONFIG_CONTENTS}")
# ARMA_USE_ARPACK

# ARMA_USE_ARPACK
string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_ARPACK[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_ARPACK[ \t]*\r?\n" ARMA_USE_ARPACK "${_armadillo_CONFIG_CONTENTS}")

Expand Down
Loading