ddemidov / vexcl

VexCL is a C++ vector expression template library for OpenCL/CUDA/OpenMP
http://vexcl.readthedocs.org
MIT License
701 stars 81 forks source link

Compiling with Qt #24

Closed ivareske closed 11 years ago

ivareske commented 11 years ago

Hi, I am having some toruble compiling a vexcl example with qmake/Qt and MSVC 2010. Could it be possible for you to make an example on the wiki, or to ship vexcl with a working qt project file? I am able to compile the benchmark program using the following porject file in the examples directory, but the program crashes () when I try to run it:

-------------------------------------------------------

TEMPLATE = app TARGET = test INCLUDEPATH += $$quote(C:/Program Files (x86)/AMD APP/include) INCLUDEPATH += ../ INCLUDEPATH += $$quote(C:/Program Files (x86)/boost/boost_1_51)

Input

SOURCES += benchmark.cpp

CONFIG += console

LIBS += -L$$quote(C:/Program Files (x86)/AMD APP/lib/x86) -lOpenCL LIBS += -L$$quote(C:/Program Files (x86)/boost/boost_1_51/lib)

-------------------------------------------------------

It crashes on the following line in benchmark.cpp:

vex::Context ctx( Filter::DoublePrecision && Filter::Env, CL_QUEUE_PROFILING_ENABLE );

I am able to compile and run this benchmark example fine using cmake... By the way, not all examples compiles fine using cmake, it stops at 80%. I`m attaching the error messages I got from cmake compilation at the end of my message here.

Best regards, Ivar

C:\sluggit\vexcl\vexcl/fft/kernels.hpp(101) : error C2001: newline in constant C:\sluggit\vexcl\vexcl/fft/kernels.hpp(102) : error C2059: syntax error : ')' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(102) : error C2001: newline in constant C:\sluggit\vexcl\vexcl/fft/kernels.hpp(103) : error C2059: syntax error : 'else'

C:\sluggit\vexcl\vexcl/fft/kernels.hpp(103) : error C2143: syntax error : missin g ';' before '{' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(103) : error C2447: '{' : missing functio n header (old-style formal list?) C:\sluggit\vexcl\vexcl/fft/kernels.hpp(182) : error C2001: newline in constant C:\sluggit\vexcl\vexcl/fft/kernels.hpp(186) : error C2059: syntax error : ')' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(177) : error C2146: syntax error : missin g ';' before identifier 'radix_kernel' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(177) : error C4430: missing type specifie r - int assumed. Note: C++ does not support default-int C:\sluggit\vexcl\vexcl/fft/kernels.hpp(186) : error C2001: newline in constant C:\sluggit\vexcl\vexcl/fft/kernels.hpp(186) : error C2988: unrecognizable templa te declaration/definition C:\sluggit\vexcl\vexcl/fft/kernels.hpp(186) : error C2059: syntax error : 'strin g' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(191) : error C2988: unrecognizable templa te declaration/definition C:\sluggit\vexcl\vexcl/fft/kernels.hpp(191) : error C2059: syntax error : 'const ant' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(191) : error C2059: syntax error : ')' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(196) : error C2143: syntax error : missin g ';' before '<<' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(197) : error C2988: unrecognizable templa te declaration/definition C:\sluggit\vexcl\vexcl/fft/kernels.hpp(197) : error C2059: syntax error : 'strin g' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(197) : error C2059: syntax error : ')' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(199) : error C2065: 'n' : undeclared iden tifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(199) : error C2065: 'radix' : undeclared identifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2065: 'T' : undeclared iden tifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2065: 'o' : undeclared iden tifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2065: 'invert' : undeclared identifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2065: 'radix' : undeclared identifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2065: 'p' : undeclared iden tifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C4430: missing type specifie r - int assumed. Note: C++ does not support default-int C:\sluggit\vexcl\vexcl/fft/kernels.hpp(200) : error C2365: 'vex::kernel_radix' : redefinition; previous definition was 'function' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(132) : see declaration of 'vex::k ernel_radix' C:\sluggit\vexcl\vexcl/fft/kernels.hpp(202) : error C2065: 'queue' : undeclared identifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(202) : error C2065: 'o' : undeclared iden tifier C:\sluggit\vexcl\vexcl/fft/kernels.hpp(202) : fatal error C1903: unable to recov er from previous error(s); stopping compilation NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop.

ddemidov commented 11 years ago

Hello,

Unfortunately I don't have any experience with qmake/QT, so I can not provide a working example.

Regarding the second issue, it was a while since I tested the code in windows. I'll try to do this tomorrow, when I have access to a windows machine.

Best regards, Denis

neapel commented 11 years ago

I suspect MSVC10 doesn't support raw string literals R"(...with linebreaks...)" — can you try MSVC11?

neapel commented 11 years ago

does e4c6726a33d21e903bb0c61301f715a3c4bbac39 fix it for MSVC10?

ddemidov commented 11 years ago

Ivar,

Could you please test if the latest version is able to compile with cmake/visual studio?

re qmake/Qt issue: Are you able to compile and run some simple OpenCL test (like this) with qmake/Visual Studio?

ddemidov commented 11 years ago

The latest commit is tested on Win64 with Visual Studio 2010

ivareske commented 11 years ago

Hi, thanks for your reply. I am still getting some errors for the utests.cpp file from the latest master (and many warnings):

[ 20%] Built target benchmark [ 40%] Built target devlist [ 60%] Built target exclusive [ 80%] Building CXX object examples/CMakeFiles/utests.dir/utests.cpp.obj utests.cpp C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(119) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(119) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(119) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(119) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(120) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(120) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(120) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/types.hpp(120) : warning C4146: unary minus operator applied to unsigned type, result still unsigned C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(155) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector(const Expr &) const' being compiled with [ real=double, RDC=vex::MIN, T=double, Expr=vex::vector ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(156) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector(const Expr &) const' being compiled with [ real=double, RDC=vex::MAX, T=double, Expr=vex::vector ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(170) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::not_equalto,boost::proto::argsns::list2<vex::vector<double &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<double &>,0>>>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(187) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::not_equalto,boost::proto::argsns::list2<vex::vector<double &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const int &>,0>>>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(217) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::not_equalto,boost::proto::argsns::list2<vex::vector<double &,vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(292) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vectorexpression &) const' being compiled with [ real=double, RDC=vex::MAX, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list2<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::fabs_func,0>>,const vex::vectorexpressionboost::proto::exprns::basicexpr<boost::proto::tagns::tag::minus,boost::proto::argsns_::list2<vex::vector<double &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const double &>,0>>>,2>> &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(308) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector(const Expr &) const' being compiled with [ real=double, RDC=vex::SUM, T=double, Expr=vex::vector ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(692) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vectorexpression &) const' being compiled with [ real=double, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list2<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::sin_func,0>>,const vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(696) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vectorexpression &) const' being compiled with [ real=double, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list2<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::cos_func,0>>,const vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(790) : see reference to function template instantiation 'float vex::Reductor<real,RDC>::operator ()vex::vector(const Expr &) const' being compiled with [ real=float, RDC=vex::MIN, T=float, Expr=vex::vector ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(792) : see reference to function template instantiation 'float vex::Reductor<real,RDC>::operator ()vex::vector(const Expr &) const' being compiled with [ real=float, RDC=vex::MAX, T=float, Expr=vex::vector ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1130) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vectorexpression &) const' being compiled with [ real=double, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list3<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::pow_func,0>>,const vex::vector &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const double &>,0>>>,3> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1147) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list3<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<user_function_greater_body,0>>,const vex::vector &,const vex::vector &>,3> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1149) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::greater,boost::proto::argsns_::list2<vex::vector<double &,vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1150) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::less,boost::proto::argsns_::list2<vex::vector<double &,vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1600) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::greater,boost::proto::argsns_::list2<vex::vector<double &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const int &>,0>>>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1601) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::less,boost::proto::argsns_::list2<vex::vector<double &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const int &>,0>>>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1611) : see reference to function template instantiation 'double vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vectorexpression &) const' being compiled with [ real=double, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list2<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::fabs_func,0>>,const vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1669) : see reference to function template instantiation 'float vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=clfloat, RDC=vex::SUM, Expr=boost::proto::exprns::basicexprboost::proto::tagns::tag::function,boost::proto::argsns_::list3<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<vex::pow_func,0>>,const vex::vectorexpressionboost::proto::exprns::basicexpr<boost::proto::tagns::tag::minus,boost::proto::argsns_::list2<vex::vector<float &,vex::vector &>,2>> &,vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<const float &>,0>>>,3> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1164) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression(const vex::vector_expression &) const' being compiled with [ real=sizet, RDC=vex::SUM, Expr=boost::proto::exprns::basicexpr<boost::proto::tagns::tag::function,boost::proto::argsns_::list2<vex::vectorexpression<boost::proto::exprns::basicexpr<boost::proto::tagns::tag::terminal,boost::proto::argsns_::term<anonymous-namespace'::<lambda34>::()::user_function_times2_body>,0>>,const vex::vector<double> &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(314) : warning C4244: 'initializing' : conversion from 'cl::detail::param_traitscl::detail::cl_device_info,4131::param_type' to 'size_t', possible loss of data C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1165) : see reference to function template instantiation 'unsigned int vex::Reductor<real,RDC>::operator ()vex::vector_expression<Expr>(const vex::vector_expression<Expr> &) const' being compiled with [ real=size_t, RDC=vex::SUM, Expr=boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::function,boost::proto::argsns_::list2<vex::vector_expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<anonymous-namespace'::::()::user_function_times4_body>,0>>,const vex::vector &>,2> ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/reduce.hpp(231) : warning C4101: 'fun' : unreferenced local variable C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/fft/kernels.hpp(148) : warning C4244: 'initializing' : conversion from 'double' to 'const float', possible loss of data C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/fft/kernels.hpp(197) : see reference to function template instantiation 'void vex::fft::kernel_radix(std::ostringstream &,bool,size_t,size_t,size_t)' being compiled with [ T=float ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/fft/plan.hpp(100) : see reference to function template instantiation 'vex::fft::kernel_call vex::fft::radix_kernel(cl::CommandQueue &,size_t,size_t,bool,size_t,size_t,cl::Buffer,cl::Buffer)' being compiled C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/fft/plan.hpp(74) : while compiling class template member function 'vex::fft::plan<T0,T1>::plan(const std::vector<_Ty> &,const std::vector,bool)' with [ T0=cl_float, T1=cl_float, _Ty=cl::CommandQueue ] C:\Users\IVARES~1\DOWNLO~1\VEXCL-~1\vexcl/fft.hpp(224) : see reference to class template instantiation 'vex::fft::plan<T0,T1>' being compiled with [ T0=cl_float, T1=cl_float ] C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(1653) : see reference to class template instantiation 'vex::FFT' being compiled with [ T0=cl_float ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Hash<_Traits> &,const std::_Hash<_Traits> &)' : could not deduce template argument for 'const std::_Hash<_Traits> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xhash(933) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(728) : see reference to function template instantiation 'void std::_Debug_range2<_InIt>(_RanIt,_RanIt,std::_Dbfile_t,std::_Dbline_t,std::random_access_iterator_tag)' being compiled with [ _InIt=vex::vector::iterator_typevex::vector<double,vex::vector::element>, _RanIt=vex::vector::iterator_typevex::vector<double,vex::vector::element> ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\algorithm(202) : see reference to function template instantiation 'void std::_Debug_range<_InIt>(_InIt,_InIt,std::_Dbfile_t,std::_Dbline_t)' being compiled with [ _InIt=vex::vector::iterator_typevex::vector<double,vex::vector::element> ] C:\Users\Ivar Eskerud Smith\Downloads\vexcl-master\examples\utests.cpp(229) : see reference to function template instantiation 'bool std::all_ofvex::vector<T::iterator_type<vector_type,element_type>,anonymous-namespace'::<lambda55>>(_InIt,_InIt,_Pr)' being compiled with [ T=double, vector_type=vex::vector<double>, element_type=vex::vector<double>::element, _InIt=vex::vector<double>::iterator_type<vex::vector<double>,vex::vector<double>::element>, _Pr=anonymous-namespace':: ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Hash<_Traits> &,const std::_Hash<_Traits> &)' : could not deduce template argument for 'const std::_Hash<_Traits> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xhash(933) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stack(166) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stack(166) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::deque<T,A> &,const std::deque<T,A> &)' : could not deduce template argument for 'const std::deque<T,A> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\deque(1725) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::deque<T,A> &,const std::deque<T,A> &)' : could not deduce template argument for 'const std::deque<T,A> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\deque(1725) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\list(1588) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\list(1588) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xtree(1885) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xtree(1885) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::move_iterator<_RanIt> &,const std::move_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::move_iterator<_RanIt> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iterator(371) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::move_iterator<_RanIt> &,const std::move_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::move_iterator<_RanIt> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iterator(371) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Ax> &,const std::vector<_Ty,_Ax> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\vector(1502) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Ax> &,const std::vector<_Ty,_Ax> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\vector(1502) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\memory(2582) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\memory(2582) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem )' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string(243) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem )' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string(243) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const _Elem ,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem ' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string(233) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string(223) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string(223) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(1356) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(1356) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(1179) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(1179) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(318) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'vex::vector::iterator_type<vector_type,element_type>' with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ] C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(318) : see declaration of 'std::operator <' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(719) : error C2676: binary '<' : 'vex::vector::iterator_type<vector_type,element_type>' does not define this operator or a conversion to a type acceptable to the predefined operator with [ T=double, vector_type=vex::vector, element_type=vex::vector::element ]

NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop.

ivareske commented 11 years ago

Regarding compiling with qmake, I am able to compile and run the hello world in OpenCl example. I get as output: Pitcairn 3

Regards, Ivar

ddemidov commented 11 years ago

Are you building in 32bit mode? I tested in 64bit environment. I'll try to test this in 32bits tomorrow.

ivareske commented 11 years ago

Yes, I am using 32 bit. Have not tested 64 bit yet

ddemidov commented 11 years ago

The latest commit should work with cmake/VS on 32bit windows.

ddemidov commented 11 years ago

I was able to compile and run utests with the following project.pro file:

TEMPLATE = app
TARGET = utests
INCLUDEPATH += $$quote(C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/include)
INCLUDEPATH += ../
INCLUDEPATH += $$quote(C:/boost_1_53_0)

# Input
SOURCES += utests.cpp

CONFIG += console

LIBS += -L$$quote(C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.0/lib/Win32) -lOpenCL
LIBS += -L$$quote(C:/boost_1_53_0/stage/lib)

Same file with obvious corrections compiles benchmark.cpp, and the executable does not crash.

I used QT 5.0.1, Boost 1.53.0, Nvidia CUDA Toolkit 5.0 and Visual Studio 2010 on 32bit Windows. I don't have windows machine with AMD GPU, so I can not test that.

Can you try more recent version of Boost if benchmark still crashes on you?

ivareske commented 11 years ago

Hi, all examples run fine now when compiled with cmake, except for utests: utests.exe now runs further than before, but crashes at: Line 1263: Two Stencil convolutions in one expression Line 1399: User-defined stencil operator When I comment out those two tests the rest runs fine.

Regarding compiling with Qt:

I downloaded boost 1.53 and build the libraries from source, but the benchmark.cpp example still compiles fine but crashes when I try to run it (the other tests crashes as well). I am using Qt 4.8.4 precompiled for MSVC 2010, and MSVC 2010 32 bit. I also tried with Qt 5.0.1, but the program still crashes at startup... I have a Radeon HD 7850 GPU.

Regards, Ivar

ddemidov commented 11 years ago

Line 1263: Two Stencil convolutions in one expression

I think @neapel had same problem with boost 1.50. 1.52 worked fine. Did you try it with 1.53?

the program still crashes at startup...

Can you reproduce the bug when CPU is used as a compute device?

ivareske commented 11 years ago

Yes, I tried with boost 1.53 in my previous comment (compiled from source). How do I only use the CPU? The line that seems to cause the crash is the first line in the main function:

vex::Context ctx( Filter::DoublePrecision && Filter::Env, CL_QUEUE_PROFILING_ENABLE );

Strange that it works with cmake and not Qt... Could there be some Qt/boost issues?

ddemidov commented 11 years ago

Hello Ivar,

I have installed amd app v2.8 and was able to reproduce the Qt problem. The solution to it is somewhat strange: the CL/cl.hpp file that is shipped with AMD APP SDK is not working. The one that is included with VexCL (which I got from Khronos site), does work.

To prefer VexCL's copy you need to reorder include paths in qt project file:

INCLUDEPATH += ../
INCLUDEPATH += $$quote(c:/Program Files/AMD APP/include)
INCLUDEPATH += $$quote(C:/boost_1_53_0)

I also had to re-setup the project from scratch for Qt to notice the change.

I could not reproduce the issue with stencil operators.

How do I only use the CPU?

It was indeed impossible for you since the examples crashed inside context creation. But normally the examples are using Filter::Env, so you may define one of supported environment variables to filter available devices:

> set OCL_DEVICE=Intel
> utests.exe
1. Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
...

> set OCL_DEVICE=K20
> utests.exe
1. Tesla K20c
...
ddemidov commented 11 years ago

Ivar,

I was able to reproduce segfault in "Two Stencil convolutions in one expression" test with Boost 1.51 on Linux. 1.52 works without problems.

ivareske commented 11 years ago

Thanks, now everything works! Maybe you should inform AMD that there might be something wrong with their cl.hpp file?

ddemidov commented 11 years ago

Great!

I'll try to make a minimal example a bit later in order to inform AMD.