From c40bbb5d968642d4a7e35cac74a1b4ea9a9ad7ba Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 15:37:58 +0200 Subject: [PATCH 1/7] added travis batch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 0cdab0f7393e6d87e93834fab18337d9bdfbd090 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 15:42:26 +0200 Subject: [PATCH 2/7] disabled building clfft on travis for now --- .travis.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9b37b7..60f9b67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,17 +32,17 @@ 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} @@ -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 From c7912318ceaff794b4f00e62cb779f769ddc1bf5 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 15:52:23 +0200 Subject: [PATCH 3/7] commented pull of amd app sdk out for now --- .travis.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60f9b67..0601f3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,7 @@ cache: #- ${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 From 1688cb887edb75e99df2af07f9fd16f881cd07c7 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 16:09:05 +0200 Subject: [PATCH 4/7] splitted multiple compile definitions into individual calls --- test/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b2136d6..f6c1779 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_THREADS=${GEARSHIFFT_FFTW_THREADS}) + add_test(NAME ${TEST_EXEC} COMMAND ${TEST_EXEC}) endif() From c5dc2a3e86099159cb965ce48ccd5d839c5c8d38 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 16:13:54 +0200 Subject: [PATCH 5/7] added sentinel to guard against non-existent macro --- test/test_fftw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_fftw.cpp b/test/test_fftw.cpp index 5e7f0de..428d822 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_THREADS) && GEARSHIFFT_FFTW_THREADS==1 BOOST_AUTO_TEST_CASE( FFT1D2Threads, * boost::unit_test::tolerance(0.0001) ) { static const int N = 32; From 97e5964656a863e6f97a74c784f6a306c78f82a1 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Thu, 23 Aug 2018 16:14:21 +0200 Subject: [PATCH 6/7] fixed variable misnomer that assigned an empty string instead of an int --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f6c1779..57b22a6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ if(FFTW_FOUND) set(LIBS ${FFTW_LIBRARIES}) target_link_libraries(${TEST_EXEC} ${LIBS} ${Boost_LIBRARIES}) target_compile_definitions(${TEST_EXEC} PUBLIC -DBOOST_TEST_DYN_LINK) - target_compile_definitions(${TEST_EXEC} PUBLIC -DGEARSHIFFT_FFTW_THREADS=${GEARSHIFFT_FFTW_THREADS}) + target_compile_definitions(${TEST_EXEC} PUBLIC -DGEARSHIFFT_FFTW_THREADS=${GEARSHIFFT_FFTW_USE_THREADS}) add_test(NAME ${TEST_EXEC} COMMAND ${TEST_EXEC}) endif() From 85f4280ca5f50879eeaf10641c95affb04a4aa60 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Fri, 24 Aug 2018 10:25:11 +0200 Subject: [PATCH 7/7] change preprocessor macro GEARSHIFFT_FFTW_THREADS -> GEARSHIFFT_USE_FFTW_THREADS --- inc/libraries/fftw/fftw.hpp | 8 ++++---- test/CMakeLists.txt | 2 +- test/test_fftw.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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 57b22a6..2d92f23 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ if(FFTW_FOUND) set(LIBS ${FFTW_LIBRARIES}) target_link_libraries(${TEST_EXEC} ${LIBS} ${Boost_LIBRARIES}) target_compile_definitions(${TEST_EXEC} PUBLIC -DBOOST_TEST_DYN_LINK) - target_compile_definitions(${TEST_EXEC} PUBLIC -DGEARSHIFFT_FFTW_THREADS=${GEARSHIFFT_FFTW_USE_THREADS}) + 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 428d822..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 defined(GEARSHIFFT_FFTW_THREADS) && 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;