Closed hughperkins closed 9 years ago
Hi @Ambext , please can you try the 'new-clew' branch perhaps?
git clone --recursive https://github.com/hughperkins/cltorch.git -b new-clew cltorch-newclew
cd cltorch-newclew
luarocks make rocks/cltorch-scm-1.rockspec
It uses clew to provide the opencl header files and so on. It feeds those to clBLAS.
I am having new errors messages similar to this one: path/cltorch-newclew/clMathLibraries/clBLAS/src/include/kern_cache.h:26:10: fatal error: 'OpenCL/cl.h' file not found include OpenCL/cl.h ^
It is interestingly similar to the previous issue of the build not being able to find opencl Having looked around I believe the header call has to be include OpenCl/opencl.h
So far I haven't had time / skill to change all the header calls to check that this fix would work.
clBLAS is a third-party library. Ideally, I wont change it, if I can avoid doing so (although I can, via a fork). I'm feeding it 'fake' include files for opencl. Looks like however, it searches in a different location on apple:
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
Seems not an insurmountable problem. Will dig a bit.
Try now?
I have tried using the new-clew branch
it found opencl
-- Found OPENCL: /Users/mnemonis/torch/install/lib/libclew.dylib
but it didn't build
Building C object library/CMakeFiles/clBLAS.dir/tools/tune/storage_io.c.o Building C object library/CMakeFiles/clBLAS.dir/tools/tune/storage_data.c.o 1 warning generated. Linking CXX shared library libclBLAS.dylib [100%] Built target clBLAS [ 35%] Performing install step for 'clBLAS-external' [ 4%] Built target tplgen TPLGEN Running..... [ 4%] Built target GENERATE_CLT [ 44%] Built target tune [100%] Built target clBLAS Install the project... -- Install configuration: "RelWithDebInfo" -- Installing: /Users/mnemonis/torch/install/./include/clBLAS.h -- Installing: /Users/mnemonis/torch/install/./include/clAmdBlas.h -- Installing: /Users/mnemonis/torch/install/./include/clAmdBlas.version.h -- Installing: /Users/mnemonis/torch/install/./include/clBLAS-complex.h -- Installing: /Users/mnemonis/torch/install/./include/clBLAS.version.h -- Installing: /Users/mnemonis/torch/install/share/clBLAS/clBLASTargets.cmake -- Installing: /Users/mnemonis/torch/install/share/clBLAS/clBLASTargets-relwithdebinfo.cmake -- Installing: /Users/mnemonis/torch/install/share/clBLAS/clBLASConfigVersion.cmake -- Installing: /Users/mnemonis/torch/install/share/clBLAS/clBLASConfig.cmake -- Installing: /Users/mnemonis/torch/install/lib/libclBLAS.2.4.0.dylib -- Installing: /Users/mnemonis/torch/install/lib/libclBLAS.2.dylib -- Installing: /Users/mnemonis/torch/install/lib/libclBLAS.dylib -- Installing: /Users/mnemonis/torch/install/bin/clBLAS-tune [ 37%] Completed 'clBLAS-external' [ 37%] Built target clBLAS-external make: *\ [all] Error 2
I am investigating what are the relevant error messages. Full log is here
https://www.cubbyusercontent.com/pli/Terminal+Saved+Output.txt/_92578939fec042eba94b6096f7bc5d32
BTW how to send you a log file without having the whole thing polluting this issue webpage ?
Well, you have a dedicated issue, so just pasting all here works for me :-)
(Otherwise, if you must, you can use pastebin etc if you want, but note that it's not really easy for me to access pastebin)
Here it is Exowide:cltorch-newclew mnemonis$ luarocks make rocks/cltorch-scm-1.rockspec cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="/Users/mnemonis/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/Users/mnemonis/torch/install/lib/luarocks/rocks/cltorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /Users/mnemonis/torch/install
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew
On branch new-clew
Your branch is up-to-date with 'origin/new-clew'.
nothing to commit, working directory clean
Submodule path 'EasyCL': checked out '089301b5a482c4bc3a70a06ae4a536f32eaeab05'
Submodule path 'EasyCL/thirdparty/clew': checked out '1d2752564b6af98d24127cdb2d573d3f9ac98f02'
Submodule path 'clMathLibraries/clBLAS': checked out 'bdaf1f9ef3d97168fdaff4c3ef588feeae72b171'
CMAKE_INSTALL_PREFIX /Users/mnemonis/torch/install
CMAKE_INSTALL_PREFIX /Users/mnemonis/torch/install
CLBLAS_INCLUDE_DIRS /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src;/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/EasyCL/thirdparty/clew/include/proxy-opencl
DEEPCL_LIBRARIES /Users/mnemonis/torch/install/lib/libEasyCL.dylib
git version 2.4.5
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build
[ 1%] Scanning dependencies of target git_cltorch_rec
Scanning dependencies of target easycl_delete_stamp
Generating TensorMath.c
default
default
default
default
default
default
default
default
default
default
[ 1%] Built target easycl_delete_stamp
Scanning dependencies of target cltorch_static
[ 7%] [ 7%] [ 7%] [ 8%] [ 10%] [ 12%] Building CXX object CMakeFiles/cltorch_static.dir/init.cpp.o
Building C object CMakeFiles/cltorch_static.dir/Storage.c.o
Building C object CMakeFiles/cltorch_static.dir/torch/utils.c.o
Building C object CMakeFiles/cltorch_static.dir/Tensor.c.o
Building C object CMakeFiles/cltorch_static.dir/TensorOperator.c.o
Building C object CMakeFiles/cltorch_static.dir/TensorMath.c.o
Submodule path '../EasyCL': checked out '089301b5a482c4bc3a70a06ae4a536f32eaeab05'
Submodule path '../EasyCL/thirdparty/clew': checked out '1d2752564b6af98d24127cdb2d573d3f9ac98f02'
Submodule path '../clMathLibraries/clBLAS': checked out 'bdaf1f9ef3d97168fdaff4c3ef588feeae72b171'
[ 12%] Built target git_cltorch_rec
Scanning dependencies of target clBLAS-external
Scanning dependencies of target EasyCL-external
[ 16%] [ 16%] Creating directories for 'clBLAS-external'
Creating directories for 'EasyCL-external'
In file included from /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/init.cpp:21:
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/lib/THCl/THClGeneral.h:24:1: warning:
struct 'EasyCL' was previously declared as a class [-Wmismatched-tags]
struct EasyCL;
^
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/EasyCL/EasyCL.h:40:21: note:
previous use is here
class EasyCL_EXPORT EasyCL {
^
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/lib/THCl/THClGeneral.h:24:1: note:
did you mean class here?
struct EasyCL;
^~
class
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/lib/THCl/THClGeneral.h:25:1: warning:
struct 'CLWrapper' was previously declared as a class [-Wmismatched-tags]
struct CLWrapper;
^
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/EasyCL/CLWrapper.h:17:21: note:
previous use is here
class EasyCL_EXPORT CLWrapper {
^
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/lib/THCl/THClGeneral.h:25:1: note:
did you mean class here?
struct CLWrapper;
^~
class
[ 19%] [ 19%] No download step for 'clBLAS-external'
No download step for 'EasyCL-external'
[ 23%] [ 25%] [ 26%] [ 26%] No patch step for 'EasyCL-external'
No update step for 'clBLAS-external'
No update step for 'EasyCL-external'
No patch step for 'clBLAS-external'
[ 28%] Performing configure step for 'EasyCL-external'
[ 30%] Performing configure step for 'clBLAS-external'
loading initial cache file /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/EasyCL/tmp/EasyCL-external-cache.cmake
loading initial cache file /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/clBLAS/tmp/clBLAS-external-cache.cmake
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
2 warnings generated.
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
Linking CXX static library libcltorch_static.a
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compiler ABI info - done
[ 30%] -- Detecting C compile features
Built target cltorch_static
-- Detecting C compile features - done
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CXX compile features - done
-- Target platform: 64-bit
-- Found OPENCL: /Users/mnemonis/torch/install/lib/libclew.dylib
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:515 ] _boost_TEST_VERSIONS = 1.44.0;1.44;1.47.0;1.47;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:517 ] Boost_USE_MULTITHREADED = ON
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:519 ] Boost_USE_STATIC_LIBS = ON
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:521 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:523 ] Boost_ADDITIONAL_VERSIONS = 1.44.0;1.44;1.47.0;1.47
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:525 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:577 ] Declared as CMake or Environmental Variables:
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:579 ] BOOST_ROOT =
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:581 ] BOOST_INCLUDEDIR =
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:583 ] BOOST_LIBRARYDIR =
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:585 ] _boost_TEST_VERSIONS = 1.44.0;1.44;1.47.0;1.47;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:654 ] Include debugging info:
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:656 ] _boost_INCLUDE_SEARCH_DIRS = PATHS;C:/boost/include;C:/boost;/sw/local/include
-- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:658 ] _boost_PATH_SUFFIXES = boost-1_44_0;boost_1_44_0;boost/boost-1_44_0;boost/boost_1_44_0;boost-1_44;boost_1_44;boost/boost-1_44;boost/boost_1_44;boost-1_47_0;boost_1_47_0;boost/boost-1_47_0;boost/boost_1_47_0;boost-1_47;boost_1_47;boost/boost-1_47;boost/boost_1_47;boost-1_58_0;boost_1_58_0;boost/boost-1_58_0;boost/boost_1_58_0;boost-1_58;boost_1_58;boost/boost-1_58;boost/boost_1_58;boost-1_57_0;boost_1_57_0;boost/boost-1_57_0;boost/boost_1_57_0;boost-1_57;boost_1_57;boost/boost-1_57;boost/boost_1_57;boost-1_56_0;boost_1_56_0;boost/boost-1_56_0;boost/boost_1_56_0;boost-1_56;boost_1_56;boost/boost-1_56;boost/boost_1_56;boost-1_55_0;boost_1_55_0;boost/boost-1_55_0;boost/boost_1_55_0;boost-1_55;boost_1_55;boost/boost-1_55;boost/boost_1_55;boost-1_54_0;boost_1_54_0;boost/boost-1_54_0;boost/boost_1_54_0;boost-1_54;boost_1_54;boost/boost-1_54;boost/boost_1_54;boost-1_53_0;boost_1_53_0;boost/boost-1_53_0;boost/boost_1_53_0;boost-1_53;boost_1_53;boost/boost-1_53;boost/boost_1_53;boost-1_52_0;boost_1_52_0;boost/boost-1_52_0;boost/boost_1_52_0;boost-1_52;boost_1_52;boost/boost-1_52;boost/boost_1_52;boost-1_51_0;boost_1_51_0;boost/boost-1_51_0;boost/boost_1_51_0;boost-1_51;boost_1_51;boost/boost-1_51;boost/boost_1_51;boost-1_50_0;boost_1_50_0;boost/boost-1_50_0;boost/boost_1_50_0;boost-1_50;boost_1_50;boost/boost-1_50;boost/boost_1_50;boost-1_49_0;boost_1_49_0;boost/boost-1_49_0;boost/boost_1_49_0;boost-1_49;boost_1_49;boost/boost-1_49;boost/boost_1_49;boost-1_48_0;boost_1_48_0;boost/boost-1_48_0;boost/boost_1_48_0;boost-1_48;boost_1_48;boost/boost-1_48;boost/boost_1_48;boost-1_47_0;boost_1_47_0;boost/boost-1_47_0;boost/boost_1_47_0;boost-1_47;boost_1_47;boost/boost-1_47;boost/boost_1_47;boost-1_46_1;boost_1_46_1;boost/boost-1_46_1;boost/boost_1_46_1;boost-1_46_0;boost_1_46_0;boost/boost-1_46_0;boost/boost_1_46_0;boost-1_46;boost_1_46;boost/boost-1_46;boost/boost_1_46;boost-1_45_0;boost_1_45_0;boost/boost-1_45_0;boost/boost_1_45_0;boost-1_45;boost_1_45;boost/boost-1_45;boost/boost_1_45;boost-1_44_0;boost_1_44_0;boost/boost-1_44_0;boost/boost_1_44_0;boost-1_44;boost_1_44;boost/boost-1_44;boost/boost_1_44;boost-1_43_0;boost_1_43_0;boost/boost-1_43_0;boost/boost_1_43_0;boost-1_43;boost_1_43;boost/boost-1_43;boost/boost_1_43;boost-1_42_0;boost_1_42_0;boost/boost-1_42_0;boost/boost_1_42_0;boost-1_42;boost_1_42;boost/boost-1_42;boost/boost_1_42;boost-1_41_0;boost_1_41_0;boost/boost-1_41_0;boost/boost_1_41_0;boost-1_41;boost_1_41;boost/boost-1_41;boost/boost_1_41;boost-1_40_0;boost_1_40_0;boost/boost-1_40_0;boost/boost_1_40_0;boost-1_40;boost_1_40;boost/boost-1_40;boost/boost_1_40;boost-1_39_0;boost_1_39_0;boost/boost-1_39_0;boost/boost_1_39_0;boost-1_39;boost_1_39;boost/boost-1_39;boost/boost_1_39;boost-1_38_0;boost_1_38_0;boost/boost-1_38_0;boost/boost_1_38_0;boost-1_38;boost_1_38;boost/boost-1_38;boost/boost_1_38;boost-1_37_0;boost_1_37_0;boost/boost-1_37_0;boost/boost_1_37_0;boost-1_37;boost_1_37;boost/boost-1_37;boost/boost_1_37;boost-1_36_1;boost_1_36_1;boost/boost-1_36_1;boost/boost_1_36_1;boost-1_36_0;boost_1_36_0;boost/boost-1_36_0;boost/boost_1_36_0;boost-1_36;boost_1_36;boost/boost-1_36;boost/boost_1_36;boost-1_35_1;boost_1_35_1;boost/boost-1_35_1;boost/boost_1_35_1;boost-1_35_0;boost_1_35_0;boost/boost-1_35_0;boost/boost_1_35_0;boost-1_35;boost_1_35;boost/boost-1_35;boost/boost_1_35;boost-1_34_1;boost_1_34_1;boost/boost-1_34_1;boost/boost_1_34_1;boost-1_34_0;boost_1_34_0;boost/boost-1_34_0;boost/boost_1_34_0;boost-1_34;boost_1_34;boost/boost-1_34;boost/boost_1_34;boost-1_33_1;boost_1_33_1;boost/boost-1_33_1;boost/boost_1_33_1;boost-1_33_0;boost_1_33_0;boost/boost-1_33_0;boost/boost_1_33_0;boost-1_33;boost_1_33;boost/boost-1_33;boost/boost_1_33
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
EasyCL
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done -- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/EasyCL/src/EasyCL-external-build [ 32%] Performing build step for 'EasyCL-external' Scanning dependencies of target clew_delete_stamp -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:678 ] location of version.hpp: /usr/local/include/boost/version.hpp -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:702 ] version.hpp reveals boost 1.58.0 -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:787 ] guessed _boost_COMPILER = -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:797 ] _boost_MULTITHREADED = -mt -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:840 ] _boost_RELEASE_ABI_TAG = - -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:842 ] _boost_DEBUG_ABI_TAG = -d -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:890 ] _boost_LIBRARY_SEARCH_DIRS = /usr/local/include/lib;/usr/local/include/../lib;/usr/local/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:1001 ] Searching for PROGRAM_OPTIONS_LIBRARY_RELEASE: boost_program_options-mt-1_58;boost_program_options-mt;boost_program_options-mt-1_58;boost_program_options-mt;boost_program_options [ 0%] Built target clew_delete_stamp -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:1037 ] Searching for PROGRAM_OPTIONS_LIBRARY_DEBUG: boost_program_options-mt-d-1_58;boost_program_options-mt-d;boost_program_options-mt-d-1_58;boost_program_options-mt-d;boost_program_options-mt;boost_program_options -- [ /usr/local/Cellar/cmake/3.2.3/share/cmake/Modules/FindBoost.cmake:1088 ] Boost_FOUND = 1 -- Boost version: 1.58.0 -- Found the following Boost libraries: -- program_options -- Boost_PROGRAM_OPTIONS_LIBRARY: /usr/local/lib/libboost_program_options.a Scanning dependencies of target clew-external [ 4%] Creating directories for 'clew-external' [ 9%] No download step for 'clew-external' -- Configuring done [ 13%] [ 18%] No update step for 'clew-external' No patch step for 'clew-external' [ 22%] Performing configure step for 'clew-external' loading initial cache file /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/EasyCL/src/EasyCL-external-build/clew/tmp/clew-external-cache.cmake CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
clBLAS
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done -- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/clBLAS/src/clBLAS-external-build [ 33%] Performing build step for 'clBLAS-external' -- The C compiler identification is AppleClang 6.1.0.6020053 Scanning dependencies of target tplgen [ 0%] Creating directories for 'tplgen' -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc [ 1%] Performing download step (DIR copy) for 'tplgen' -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info [ 2%] [ 2%] No patch step for 'tplgen' No update step for 'tplgen' [ 2%] Performing configure step for 'tplgen' -- Detecting C compiler ABI info - done -- Detecting C compile features -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Detecting C compiler ABI info - done -- Detecting C compile features -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Project source dir = /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/EasyCL/thirdparty/clew -- Project build dir = /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/EasyCL/src/EasyCL-external-build/clew/src/clew-external-build -- Configuring done CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
clew
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/EasyCL/src/EasyCL-external-build/clew/src/clew-external-build
[ 27%] Performing build step for 'clew-external'
Scanning dependencies of target clew
[100%] Building C object src/CMakeFiles/clew.dir/clew.c.o
Linking C shared library libclew.dylib
[100%] Built target clew
[ 31%] Performing install step for 'clew-external'
-- Detecting CXX compile features - done
-- Configuring done
[100%] -- Generating done
-- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/build/clBLAS/src/clBLAS-external-build/library/tplgen-prefix/src/tplgen-build
Built target clew
Install the project...
[ 3%] -- Install configuration: "RelWithDebInfo"
Performing build step for 'tplgen'
-- Installing: /Users/mnemonis/torch/install/lib/libclew.1.0.0.dylib
-- Up-to-date: /Users/mnemonis/torch/install/lib/libclew.dylib
-- Installing: /Users/mnemonis/torch/install/include/clew.h
[ 36%] Scanning dependencies of target tplgen
Completed 'clew-external'
[100%] Building CXX object CMakeFiles/tplgen.dir/tplgen.cpp.o
[ 36%] Built target clew-external
Scanning dependencies of target gpuinfo
Scanning dependencies of target EasyCL
[ 40%] [ 45%] [ 50%] [ 54%] [ 59%] [ 63%] Building CXX object CMakeFiles/gpuinfo.dir/gpuinfo.cpp.o
Building CXX object CMakeFiles/gpuinfo.dir/platforminfo_helper.cpp.o
[ 68%] Building CXX object CMakeFiles/gpuinfo.dir/deviceinfo_helper.cpp.o
Building CXX object CMakeFiles/gpuinfo.dir/DeviceInfo.cpp.o
Building CXX object CMakeFiles/EasyCL.dir/EasyCL.cpp.o
Building CXX object CMakeFiles/EasyCL.dir/CLKernel.cpp.o
Building CXX object CMakeFiles/EasyCL.dir/CLWrapper.cpp.o
Linking CXX executable tplgen
[100%] Built target tplgen
[ 4%] No install step for 'tplgen'
[ 72%] Building CXX object CMakeFiles/EasyCL.dir/platforminfo_helper.cpp.o
[ 4%] Completed 'tplgen'
[ 4%] Built target tplgen
Scanning dependencies of target GENERATE_CLT
TPLGEN Running.....
Processing gemm.cl
Processing gemm_helper.cl
Processing gbmv.cl
Processing ger.cl
Processing her.cl
Processing symm_helper.cl
Processing syr2_her2.cl
Processing syr_her.cl
Processing trsv.cl
Processing her2.cl
Processing symm.cl
Processing syr2.cl
Processing syr.cl
Processing trmv.cl
Processing trsv_gemv.cl
Processing swap.cl
Processing scal.cl
Processing copy.cl
Processing axpy.cl
Processing dot.cl
Processing reduction.cl
Processing rotg.cl
Processing rotmg.cl
Processing rotm.cl
Processing iamax.cl
Processing nrm2.cl
Processing asum.cl
[ 4%] Built target GENERATE_CLT
Scanning dependencies of target clBLAS
[ 77%] Building CXX object CMakeFiles/EasyCL.dir/deviceinfo_helper.cpp.o
Scanning dependencies of target tune
[ 4%] Building C object library/CMakeFiles/clBLAS.dir/common/list.c.o
[ 81%] Building CXX object CMakeFiles/EasyCL.dir/DevicesInfo.cpp.o
[ 4%] Linking CXX executable gpuinfo
Building C object library/CMakeFiles/clBLAS.dir/common/clkern.c.o
[ 81%] Built target gpuinfo
[ 5%] Building C object library/CMakeFiles/clBLAS.dir/common/kern_cache.c.o
[ 86%] Building CXX object CMakeFiles/EasyCL.dir/DeviceInfo.cpp.o
[ 5%] Building C object library/tools/tune/CMakeFiles/tune.dir/tune.c.o
[ 5%] /Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src/library/tools/tune/tune.c:629:13: warning:
enumeration value 'TYPE_UNSIGNED_INT' not handled in switch [-Wswitch]
switch (mi->dtype)
^
Building C object library/CMakeFiles/clBLAS.dir/common/kerngen_core.c.o
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src/library/tools/tune/tune.c:1165:17: warning:
enumeration value 'TYPE_UNSIGNED_INT' not handled in switch [-Wswitch]
switch (bExtra->dtype)
^
[ 6%] Building C object library/CMakeFiles/clBLAS.dir/common/kgen_basic.c.o
[ 6%] Building C object library/CMakeFiles/clBLAS.dir/common/kgen_loop_helper.c.o
[ 90%] Building CXX object CMakeFiles/EasyCL.dir/util/easycl_stringhelper.cpp.o
[ 7%] Building C object library/CMakeFiles/clBLAS.dir/common/kgen_guard.c.o
[ 7%] Building C object library/CMakeFiles/clBLAS.dir/common/misc.c.o
2 warnings generated.
[ 7%] Building C object library/tools/tune/CMakeFiles/tune.dir/toolslib.c.o
[ 8%] Building C object library/CMakeFiles/clBLAS.dir/common/devinfo.c.o
[ 9%] [ 9%] Building C object library/tools/tune/CMakeFiles/tune.dir/fileio.c.o
[ 95%] Building C object library/CMakeFiles/clBLAS.dir/common/devinfo-cache.c.o
Building CXX object CMakeFiles/EasyCL.dir/templates/LuaTemplater.cpp.o
[ 9%] Building C object library/CMakeFiles/clBLAS.dir/common/mutex.c.o
[ 9%] [100%] Building C object library/tools/tune/CMakeFiles/tune.dir/subdim.c.o
Building CXX object CMakeFiles/EasyCL.dir/templates/TemplatedKernel.cpp.o
[ 10%] Building C object library/tools/tune/CMakeFiles/tune.dir/storage_data.c.o
[ 11%] Building C object library/CMakeFiles/clBLAS.dir/common/trace_malloc.c.o
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src/library/tools/tune/subdim.c:48:13: warning:
enumeration value 'TYPE_UNSIGNED_INT' not handled in switch [-Wswitch]
switch (dataType) {
^
[ 11%] [ 11%] Building C object library/tools/tune/CMakeFiles/tune.dir/storage_init.c.o
Building C object library/CMakeFiles/clBLAS.dir/common/gens/dblock_kgen.c.o
[ 13%] [ 13%] Building C object library/tools/tune/CMakeFiles/tune.dir/storage_io.c.o
Building C object library/CMakeFiles/clBLAS.dir/blas/init.c.o
1 warning generated.
[ 13%] Building C object library/CMakeFiles/clBLAS.dir/blas/impl.c.o
[ 14%] Building C object library/CMakeFiles/clBLAS.dir/blas/scimage.c.o
[ 14%] Building C object library/tools/tune/CMakeFiles/tune.dir/dimension.c.o
[ 15%] Building C object library/tools/tune/CMakeFiles/tune.dir///blas/generic/common.c.o
[ 15%] [ 15%] Building C object library/tools/tune/CMakeFiles/tune.dir///blas/generic/blas_funcs.c.o
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src/library/tools/tune/dimension.c:85:13: warning:
enumeration value 'TYPE_UNSIGNED_INT' not handled in switch [-Wswitch]
switch (dt) {
^
Building C object library/CMakeFiles/clBLAS.dir/blas/xgemv.c.o
[ 16%] 1 warning generated.
Building C object library/CMakeFiles/clBLAS.dir/blas/xsymv.c.o
[ 16%] [ 16%] [ 17%] Building C object library/CMakeFiles/clBLAS.dir/blas/xgemm.c.o
Building C object library/CMakeFiles/clBLAS.dir/blas/xtrmm.c.o
Building C object library/CMakeFiles/clBLAS.dir/blas/xtrsm.c.o
/Users/mnemonis/Documents/CodeRessources/cltorch-newclew/clMathLibraries/clBLAS/src/library/blas/xgemm.c:171:5: warning:
implicitly declaring library function 'sprintf' with type 'int (char ,
const char , ...)'
sprintf(tmp, "// micro tile size is 4 x 4 \n");
^
/Users/mnemonis/Documents/Code_Ressources/cltorch-newclew/clMathLibraries/clBLAS/src/library/blas/xgemm.c:171:5: note:
include the header
Error: Build error: Failed building.
Thanks! Hmmm, seems like an undefined symbol problem with the lua libraries
Building CXX object CMakeFiles/EasyCL.dir/templates/TemplatedKernel.cpp.o
...
Undefined symbols for architecture x86_64:
"_luaL_loadstring", referenced from:
LuaTemplater::LuaTemplater() in LuaTemplater.cpp.o
"_luaL_newstate", referenced from:
LuaTemplater::LuaTemplater() in LuaTemplater.cpp.o
"_luaL_openlibs", referenced from:
LuaTemplater::LuaTemplater() in LuaTemplater.cpp.o
"_lua_close", referenced from:
LuaTemplater::~LuaTemplater() in LuaTemplater.cpp.o
LuaTemplater::~LuaTemplater() in LuaTemplater.cpp.o
This is partly becaues I'm trying to fix two problems in the same branch, the other one being https://github.com/hughperkins/cltorch/issues/5 , but on the other hand, without the issue 5 fix, you might get a seg fault after building anyway... so I probably need to figure out how to fix this issue somehow.
Question, if you do:
git clone --recursive https://github.com/hughperkins/EasyCL.git
cd EasyCL
ccmake ..
then press 'c' for configure, set 'BUILD_TESTS' to 'OFF' and 'INTERNAL_LUA_ENGINE' to 'OFF'. and then 'c' for configure, and 'g' for generate, and do:
make
... what happens?
(note: forgot the '--recursive', added it)
(Oh, and you also need to set CMAKE_INSTALL_PREFIX
to some absolute path, in the ccmake)
Hi, I tried using clang to build easycl, which worked ok for me, but there was a warning on luatemplater, which I've fixed now. Do you mind redoing the above EasyCL clone and build, and see what happens?
Oh... have to add -b no-internal-lua-option
to the clone, sorry :-( Should look like:
git clone --recursive https://github.com/hughperkins/EasyCL.git -b no-internal-lua-option
cd EasyCL
ccmake ..
Hi. do you mind trying to bulid the following extremely simple toy lua module please, and let me know wha thappens?
git clone https://github.com/hughperkins/prototyping-lualink.git
cd prototyping-lualink
./run.sh
Hello, I was trying to "set CMAKE_INSTALL_PREFIX to some absolute path"
regarding building the simple toy lua, that's what I am getting;
Exowide:Code_Ressources mnemonis$ git clone https://github.com/hughperkins/prototyping-lualink.git Cloning into 'prototyping-lualink'... remote: Counting objects: 13, done. remote: Compressing objects: 100% (11/11), done. remote: Total 13 (delta 2), reused 9 (delta 1), pack-reused 0 Unpacking objects: 100% (13/13), done. Checking connectivity... done. Exowide:Code_Ressources mnemonis$ cd prototyping-lualink/ Exowide:prototyping-lualink mnemonis$ ./run.sh -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
mylib
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done -- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/prototyping-lualink/build Scanning dependencies of target mylib [100%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o /Users/mnemonis/Documents/Code_Ressources/prototyping-lualink/mylib.cpp:22:3: error: use of undeclared identifier 'luaL_register' luaL_register(L, "mylib", mylib_funcs); ^ 1 error generated. make[2]: * [CMakeFiles/mylib.dir/mylib.cpp.o] Error 1 make[1]: * [CMakeFiles/mylib.dir/all] Error 2 make: *\ [all] Error 2 luajit: test.lua:1: module 'mylib' not found: no field package.preload['mylib'] no file './mylib.lua' no file '/Users/mnemonis/torch/install/share/luajit-2.1.0-alpha/mylib.lua' no file '/usr/local/share/lua/5.1/mylib.lua' no file '/usr/local/share/lua/5.1/mylib/init.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib/init.lua' no file 'build/libmylib.so' stack traceback: [C]: in function 'require' test.lua:1: in main chunk [C]: at 0x0104a4f320
regarding the setting of the absolute path for CMAKE_INSTALL_PREFIX, should I do that in CMakeCache or in CMakeLists? Or is it an argument to the ccmake command?
Thanks. Please ignore my earlier request to build EasyCL. The prototype is sufficient to reproduce the issue. as for how to solve it, I'm not sure, but it's a really simple prototype now, so hopefully if I google a bit, I should find something ...
Basically, the problem to solve is:
use of undeclared identifier 'luaL_register'
luaL_register(L, "mylib", mylib_funcs);
... but without linking to -llua, or anything like that, otherwise we will get a segfault later, when we link with Torch, I think.
actually.. htat might be an include file issue. Can you update the CmaekLists to set the include directories to point to wherever your lua.h is?
will try now
thanks :-)
just to clarify: I have multiples lua.h on my system. Should I point to the one in torch/install/include ?
yes, the one in torch/install/include. If that's in your home directoyr, ie ~/torch/install/include, if you do 'git pull', it might be correct now.
(ok, and just did a new update, to make '.dylib' a possible suffix in the LUA_CPATH, in the run.sh, if ti does acutally build using a valid include path)
I have cloned the repo again and modified the CMakeLists.txt to include the new path (but I could see your had included it already)
I am getting this
Exowide:prototyping-lualink mnemonis$ ./run.sh -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
mylib
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done -- Build files have been written to: /Users/mnemonis/Documents/Code_Ressources/prototyping-lualink/build Scanning dependencies of target mylib [100%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o Linking CXX shared library libmylib.dylib Undefined symbols for architecture x86_64: "_luaL_register", referenced from: _luaopen_mylib in mylib.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: * [libmylib.dylib] Error 1 make[1]: * [CMakeFiles/mylib.dir/all] Error 2 make: *\ [all] Error 2 luajit: test.lua:1: module 'mylib' not found: no field package.preload['mylib'] no file './mylib.lua' no file '/Users/mnemonis/torch/install/share/luajit-2.1.0-alpha/mylib.lua' no file '/usr/local/share/lua/5.1/mylib.lua' no file '/usr/local/share/lua/5.1/mylib/init.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib/init.lua' no file 'build/libmylib.so' no file 'build/libmylib.dylib' stack traceback: [C]: in function 'require' test.lua:1: in main chunk [C]: at 0x010e667320 luajit: test.lua:1: module 'mylib' not found: no field package.preload['mylib'] no file './mylib.lua' no file '/Users/mnemonis/torch/install/share/luajit-2.1.0-alpha/mylib.lua' no file '/usr/local/share/lua/5.1/mylib.lua' no file '/usr/local/share/lua/5.1/mylib/init.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib.lua' no file '/Users/mnemonis/torch/install/share/lua/5.1/mylib/init.lua' no file 'build/libmylib.dylib' no file 'build/libmylib.so' stack traceback: [C]: in function 'require' test.lua:1: in main chunk [C]: at 0x010357c320
Yes, this is the issue we get with the huge main project:
Linking CXX shared library libmylib.dylib
Undefined symbols for architecture x86_64:
"_luaL_register", referenced from:
_luaopen_mylib in mylib.cpp.o
As for how to solve it, I'm not quite sure :-/ Will google a bit..
I wish I could help more!
:-) Thanks! Will dig a bit.
I doubt it is related but just FYI, I have installed opencl for lua (http://colberg.org/lua-opencl/) and it turned out I had a path issue. so in luajit, if I want the require(opencl) command to not yield an error I need to run the following command in bash eval $(luarocks path)
I will be afk for a while now. Thanks again for your help.
I think th eopencl include files are solved, so let's close this issue. Can you move to issue 5 please, for tracking the issue with lua symbols.
As per @Ambext:
"Now it seems the errors is coming from find_package(OpenCl) command in the Cmake of ClBlas. ie
"gives the output in the terminal
"which eventually gives that at the end of the terminal prompt
"My understandind is that it doesn't find OpenCL and therefore can't initialize correctly the needed paths. However this doesn't make a lot of sense to me. Isn't OpenCl by default on any recent OSX? Or are we speaking of another OpenCl library / package / whatever?"