clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
838 stars 242 forks source link

build errors on version 2.5 #192

Open gujunli opened 8 years ago

gujunli commented 8 years ago

since I have problem building the latest version, i check out version 2.5 (with commit 413819faa5820e87e0a5e5a48345694c21e5768c). The make command ran in the following error. [ 61%] Building CXX object tests/CMakeFiles/test-correctness.dir/correctness/tcase-filter.cpp.o [ 61%] Building C object tests/CMakeFiles/test-correctness.dir/cmdline.c.o [ 61%] Building CXX object tests/CMakeFiles/test-correctness.dir/common.cpp.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/clBLAS-wrapper.cpp.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/BlasBase.cpp.o In file included from /home/dschaa/clBLAS/src/build/tests/gtest-external-prefix/src/gtest-external/include/gtest/gtest.h:66:0, from /home/dschaa/clBLAS/src/tests/BlasBase.cpp:20: /home/dschaa/clBLAS/src/build/tests/gtest-external-prefix/src/gtest-external/include/gtest/gtest-typed-test.h:239:47: warning: anonymous variadic macros were introduced in C99 [-Wvariadic-macros]

define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \

                                           ^

/home/dschaa/clBLAS/src/tests/BlasBase.cpp: In member function ‘void clMath::BlasBase::SetUp()’: /home/dschaa/clBLAS/src/tests/BlasBase.cpp:250:29: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, clint*)’ is deprecated (declared at /opt/AMDAPPSDK-3.0/include/CL/cl.h:1359) [-Wdeprecated-declarations] commandQueues[i] = clCreateCommandQueue(context_, dev, ^ /home/dschaa/clBLAS/src/tests/BlasBase.cpp:251:50: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, clint)’ is deprecated (declared at /opt/AMDAPPSDK-3.0/include/CL/cl.h:1359) [-Wdeprecated-declarations] 0 /_CL_QUEUE_PROFILINGENABLE/, &err); ^ [ 62%] Building C object tests/CMakeFiles/test-correctness.dir/blas.c.o [ 62%] Building C object tests/CMakeFiles/test-correctness.dir/blas-cblas.c.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/blas-wrapper.cpp.o make[2]: _\ No rule to make target /opt/acml5.3.1/gfortran64_mp/lib/libacml.so', needed bystaging/test-correctness'. Stop. make[1]: *\ [tests/CMakeFiles/test-correctness.dir/all] Error 2

tingxingdong commented 8 years ago

This is a set of building dependences. So you linked ACML correctly?

Build dependencies https://github.com/clMathLibraries/clBLAS/blob/master/README.md#library-for-linuxLibrary for Linux

https://github.com/clMathLibraries/clBLAS/blob/master/README.md#library-for-mac-osxLibrary for Mac OSX

https://github.com/clMathLibraries/clBLAS/blob/master/README.md#test-infrastructureTest infrastructure

https://github.com/clMathLibraries/clBLAS/blob/master/README.md#performance-infrastructurePerformance infrastructure

https://github.com/clMathLibraries/clBLAS/blob/master/README.md

On Thu, Dec 3, 2015 at 6:06 PM, Junli Gu notifications@github.com wrote:

since I have problem building the latest version, i check out version 2.5 (with commit 413819f https://github.com/clMathLibraries/clBLAS/commit/413819faa5820e87e0a5e5a48345694c21e5768c). The make command ran in the following error. [ 61%] Building CXX object tests/CMakeFiles/test-correctness.dir/correctness/tcase-filter.cpp.o [ 61%] Building C object tests/CMakeFiles/test-correctness.dir/cmdline.c.o [ 61%] Building CXX object tests/CMakeFiles/test-correctness.dir/common.cpp.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/clBLAS-wrapper.cpp.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/BlasBase.cpp.o In file included from /home/dschaa/clBLAS/src/build/tests/gtest-external-prefix/src/gtest-external/include/gtest/gtest.h:66:0, from /home/dschaa/clBLAS/src/tests/BlasBase.cpp:20: /home/dschaa/clBLAS/src/build/tests/gtest-external-prefix/src/gtest-external/include/gtest/gtest-typed-test.h:239:47: warning: anonymous variadic macros were introduced in C99 [-Wvariadic-macros]

define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \

^ /home/dschaa/clBLAS/src/tests/BlasBase.cpp: In member function ‘void clMath::BlasBase::SetUp()’: /home/dschaa/clBLAS/src/tests/BlasBase.cpp:250:29: warning: ‘ _cl_commandqueue clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, clint)’ is deprecated (declared at /opt/AMDAPPSDK-3.0/include/CL/cl.h:1359) [-Wdeprecated-declarations] commandQueues[i] = clCreateCommandQueue(context, dev, ^ /home/dschaa/clBLAS/src/tests/BlasBase.cpp:251:50: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, clint )’ is deprecated (declared at /opt/AMDAPPSDK-3.0/include/CL/cl.h:1359) [-Wdeprecated-declarations] 0 /_CL_QUEUE_PROFILING_ENABLE

/, &err); ^ [ 62%] Building C object tests/CMakeFiles/test-correctness.dir/blas.c.o [ 62%] Building C object tests/CMakeFiles/test-correctness.dir/blas-cblas.c.o [ 62%] Building CXX object tests/CMakeFiles/test-correctness.dir/blas-wrapper.cpp.o make[2]: ** No rule to make target /opt/acml5.3.1/gfortran64_mp/lib/libacml.so', needed bystaging/test-correctness'. Stop. make[1]: *\ [tests/CMakeFiles/test-correctness.dir/all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/clMathLibraries/clBLAS/issues/192.

Tingxing dong

hughperkins commented 8 years ago

Just in case useful, one option is to simply turn off self-tests. That's what I do. Build like this:

cd clBLAS/src
mkdir build
cd build
ccmake ..
# press 'c' for configure
# set the following options as follows:
# BUILD_KTEST=OFF
# BUILD_TEST=OFF
# CORR_TEST_WITH_ACML=OFF
# press 'c' for configure, then 'g' for generate
make -j 4
MajorBreakfast commented 8 years ago

@hughperkins Note that CORR_TEST_WITH_ACML=OFF fails on linux if no fortran compiler is installed because of https://github.com/clMathLibraries/clBLAS/blob/master/src/CMakeLists.txt#L99.

hughperkins commented 8 years ago

@MajorBreakfast ok, you mean, safer to turn off tests, but leave acml on? Seems unintuitive but true...

I'm just a bystander by the way :-D

But anyway, yes, seems like that if statement should have something like (...) AND BUILD_TEST tagged onto the end, right?

TimmyLiu commented 8 years ago

@MajorBreakfast I noticed this recently too. CORR_TEST_WITH_ACML=OFF indicates testing with netlib's BLAS (fortran interface) on linux. Although we should also make sure BUILD_TEST is on to require gfortran compiler. This should be a easy fix.

MajorBreakfast commented 8 years ago

@TimmyLiu That would be great! Also consider making it a combo box instead of an on/off switch. That way nobody can get confused by it in the future.

set(CORR_TEST "ACML" CACHE STRING "Comparision library used in testing")
set_property(CACHE CORR_TEST PROPERTY STRINGS "ACML" "Netlib BLAS")
TimmyLiu commented 8 years ago

@MajorBreakfast thanks for the advice. PR #193 was merged before I saw this. Anyways, fortran compiler should not be required is test is turned off.