diff --git a/.travis.yml b/.travis.yml index b9b37b7..0601f3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,20 +32,20 @@ env: - BOOST_VERSION=1.60.0 - CUDA_VERSION=8.0.61-1 - CUDA_VERSION_SHORT=8.0 - - GEARSHIFFT_CLFFT_VERSION=v2.12.2 + #- GEARSHIFFT_CLFFT_VERSION=v2.12.2 - CLANG_VERSION=3.8 - FFTW_CACHE_PATH=${TRAVIS_BUILD_DIR}/deps/fftw - - AMDAPPSDK_VERSION=291 + #- AMDAPPSDK_VERSION=291 # - AMDAPPSDK_VERSION=300 cache: directories: - ${TRAVIS_BUILD_DIR}/deps/cuda-${CUDA_VERSION_SHORT} - - ${TRAVIS_BUILD_DIR}/deps/clfft-${GEARSHIFFT_CLFFT_VERSION} + #- ${TRAVIS_BUILD_DIR}/deps/clfft-${GEARSHIFFT_CLFFT_VERSION} - ${TRAVIS_BUILD_DIR}/deps/boost-${BOOST_VERSION} - ${TRAVIS_BUILD_DIR}/sources/ - - ${AMDAPPSDKROOT} + #- ${AMDAPPSDKROOT} - ${FFTW_CACHE_PATH} addons: @@ -91,19 +91,19 @@ before_install: travis_retry sudo apt-get update -qq CUDA_APT=${CUDA_VERSION_SHORT/./-} travis_retry sudo apt-get install -qy cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} cuda-cufft-${CUDA_APT} cuda-cufft-dev-${CUDA_APT} - - bash .travis/install_amd_sdk.sh ${AMDAPPSDK_VERSION} - - | - if [[ ${AMDAPPSDK_VERSION} == "300" ]]; then - export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64/sdk:${LD_LIBRARY_PATH} - export CMAKE_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64/sdk:${CMAKE_LIBRARY_PATH} - else # 291 - export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH} - export CMAKE_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${CMAKE_LIBRARY_PATH} - fi - export OPENCL_VENDOR_PATH=${AMDAPPSDKROOT}/etc/OpenCL/vendors - mkdir -p ${OPENCL_VENDOR_PATH}; - echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd; - - ${AMDAPPSDKROOT}/bin/x86_64/clinfo + # - bash .travis/install_amd_sdk.sh ${AMDAPPSDK_VERSION} + # - | + # if [[ ${AMDAPPSDK_VERSION} == "300" ]]; then + # export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64/sdk:${LD_LIBRARY_PATH} + # export CMAKE_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64/sdk:${CMAKE_LIBRARY_PATH} + # else # 291 + # export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH} + # export CMAKE_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${CMAKE_LIBRARY_PATH} + # fi + # export OPENCL_VENDOR_PATH=${AMDAPPSDKROOT}/etc/OpenCL/vendors + # mkdir -p ${OPENCL_VENDOR_PATH}; + # echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd; + # - ${AMDAPPSDKROOT}/bin/x86_64/clinfo install: - if [ "${CXX}" == "g++" ]; then export CXX=g++-5; export CC=${CXX/g++/gcc}; export GCOV=${CXX/g++/gcov}; fi @@ -129,18 +129,18 @@ install: export PATH=${CUDA_ROOT}/bin:${PATH} # clfft - - | - export CLFFT_ROOT=${TRAVIS_BUILD_DIR}/deps/clfft-${GEARSHIFFT_CLFFT_VERSION} - export CMAKE_PREFIX_PATH=${CLFFT_ROOT}:${CMAKE_PREFIX_PATH} - CLFFT_SRC=${TRAVIS_BUILD_DIR}/sources/clfft-${GEARSHIFFT_CLFFT_VERSION} + # - | + # export CLFFT_ROOT=${TRAVIS_BUILD_DIR}/deps/clfft-${GEARSHIFFT_CLFFT_VERSION} + # export CMAKE_PREFIX_PATH=${CLFFT_ROOT}:${CMAKE_PREFIX_PATH} + # CLFFT_SRC=${TRAVIS_BUILD_DIR}/sources/clfft-${GEARSHIFFT_CLFFT_VERSION} - if [[ -z "$(ls -A ${CLFFT_ROOT})" ]]; then - travis_retry git clone https://github.com/clMathLibraries/clFFT.git ${CLFFT_SRC} - (cd ${CLFFT_SRC}; git checkout ${GEARSHIFFT_CLFFT_VERSION}) - (cd ${CLFFT_SRC}/src; cmake -DBUILD64=ON -DBUILD_CALLBACK_CLIENT=OFF -DBUILD_CLIENT=OFF -DBUILD_EXAMPLES=OFF -DBUILD_LOADLIBRARIES=ON -DBUILD_RUNTIME=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TEST=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CLFFT_ROOT} -DSUFFIX_LIB=64 && make && make install) - else - echo "Using cached clfft version at $CLFFT_ROOT" - fi + # if [[ -z "$(ls -A ${CLFFT_ROOT})" ]]; then + # travis_retry git clone https://github.com/clMathLibraries/clFFT.git ${CLFFT_SRC} + # (cd ${CLFFT_SRC}; git checkout ${GEARSHIFFT_CLFFT_VERSION}) + # (cd ${CLFFT_SRC}/src; cmake -DBUILD64=ON -DBUILD_CALLBACK_CLIENT=OFF -DBUILD_CLIENT=OFF -DBUILD_EXAMPLES=OFF -DBUILD_LOADLIBRARIES=ON -DBUILD_RUNTIME=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TEST=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CLFFT_ROOT} -DSUFFIX_LIB=64 && make && make install) + # else + # echo "Using cached clfft version at $CLFFT_ROOT" + # fi # Versions - $CXX --version - nvcc --version @@ -151,10 +151,10 @@ script: - set -e - cmake ../ -DCMAKE_BUILD_TYPE=${GEARSHIFFT_BUILD_TYPE} -DCMAKE_VERBOSE_MAKEFILE=ON - make - - | - echo "clFFT" - ./gearshifft_clfft -l - ./gearshifft_clfft -e 32 + # - | + # echo "clFFT" + # ./gearshifft_clfft -l + # ./gearshifft_clfft -e 32 - | echo "FFTW" ./gearshifft_fftw -l diff --git a/README.md b/README.md index 67753b7..26080b9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![gearshifft](images/gearshifft_logo_img_100.png) -## Benchmark Suite for Heterogeneous Implementations of FFTs [![DOI](https://zenodo.org/badge/60610005.svg)](https://zenodo.org/badge/latestdoi/60610005) +## Benchmark Suite for Heterogeneous Implementations of FFTs [![DOI](https://zenodo.org/badge/60610005.svg)](https://zenodo.org/badge/latestdoi/60610005) [![Build Status](https://travis-ci.org/mpicbg-scicomp/gearshifft.svg?branch=master)](https://travis-ci.org/mpicbg-scicomp/gearshifft) This is a simple and easy extensible benchmark system to answer the question, which FFT library performs best under which conditions. Conditions are given by compute architecture, inplace or outplace as well as real or complex transforms, data precision, and so on. diff --git a/inc/libraries/fftw/fftw.hpp b/inc/libraries/fftw/fftw.hpp index dafd790..7709ad5 100644 --- a/inc/libraries/fftw/fftw.hpp +++ b/inc/libraries/fftw/fftw.hpp @@ -373,7 +373,7 @@ namespace fftw { static std::string get_device_list() { std::ostringstream msg; -#if GEARSHIFFT_FFTW_THREADS==1 +#if defined(GEARSHIFFT_FFTW_USE_THREADS) && GEARSHIFFT_FFTW_USE_THREADS==1 int av_procs = std::thread::hardware_concurrency(); msg << av_procs << " CPU Threads supported.\n"; #else @@ -385,7 +385,7 @@ namespace fftw { std::string get_used_device_properties() { -#if GEARSHIFFT_FFTW_THREADS==1 +#if defined(GEARSHIFFT_FFTW_USE_THREADS) && GEARSHIFFT_FFTW_USE_THREADS==1 // Returns the number of supported concurrent threads of implementation size_t maxndevs = std::thread::hardware_concurrency(); size_t ndevs = options().getNumberDevices(); @@ -535,7 +535,7 @@ namespace fftw { throw std::runtime_error("FFT data exceeds physical memory. "+ss.str()); } -#if GEARSHIFFT_FFTW_USE_THREADS==1 +#if defined(GEARSHIFFT_FFTW_USE_THREADS) && GEARSHIFFT_FFTW_USE_THREADS==1 if( traits::thread_api::init_threads()==0 ) throw std::runtime_error("fftw thread initialization failed."); @@ -550,7 +550,7 @@ namespace fftw { ~FftwImpl(){ destroy(); -#if GEARSHIFFT_FFTW_USE_THREADS==1 +#if defined(GEARSHIFFT_FFTW_USE_THREADS) && GEARSHIFFT_FFTW_USE_THREADS==1 traits::thread_api::cleanup_threads(); #else traits::no_thread_api::cleanup(); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b2136d6..2d92f23 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,6 +31,8 @@ if(FFTW_FOUND) add_executable(${TEST_EXEC} test_fftw.cpp) set(LIBS ${FFTW_LIBRARIES}) target_link_libraries(${TEST_EXEC} ${LIBS} ${Boost_LIBRARIES}) - target_compile_definitions(${TEST_EXEC} PUBLIC -DBOOST_TEST_DYN_LINK -DGEARSHIFFT_FFTW_THREADS=${GEARSHIFFT_FFTW_THREADS}) + target_compile_definitions(${TEST_EXEC} PUBLIC -DBOOST_TEST_DYN_LINK) + target_compile_definitions(${TEST_EXEC} PUBLIC -DGEARSHIFFT_FFTW_USE_THREADS=${GEARSHIFFT_FFTW_USE_THREADS}) + add_test(NAME ${TEST_EXEC} COMMAND ${TEST_EXEC}) endif() diff --git a/test/test_fftw.cpp b/test/test_fftw.cpp index 5e7f0de..56ad080 100644 --- a/test/test_fftw.cpp +++ b/test/test_fftw.cpp @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE( FFT1D, * boost::unit_test::tolerance(0.0001) ) fftw_cleanup(); } -#if GEARSHIFFT_FFTW_THREADS==1 +#if defined(GEARSHIFFT_FFTW_USE_THREADS) && GEARSHIFFT_FFTW_USE_THREADS==1 BOOST_AUTO_TEST_CASE( FFT1D2Threads, * boost::unit_test::tolerance(0.0001) ) { static const int N = 32;