Ok, so now we really need to actual compiler call from CMake. In build/:

$> cmake .. -DCMAKE_VERBOSE_MAKEFILE=On
$> make blas1
(send output)

Thanks and best regards,
Karli


On 11/19/21 13:59, SANDRA CATALAN PALLARES wrote:
Hi,

The example that you mention is not in the new examples folder. However, I tried with blas1 and it does not work:

jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1/build$ examples/tutorial/blas1 terminate called after throwing an instance of 'viennacl::ocl::unknown_error'   what():  ViennaCL: FATAL ERROR: ViennaCL encountered an unknown OpenCL error. Most likely your OpenCL SDK or driver is not installed properly. In some cases, this error is due to an invalid global work size or several kernel compilation errors. If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net <mailto:viennacl-support@lists.sourceforge.net> and supply at least the following information:
  * Operating System
  * Which OpenCL implementation (AMD, NVIDIA, etc.)
  * ViennaCL version
Many thanks in advance!
Aborted

Best regards,
Sandra

El vie, 19 nov 2021 a las 13:27, Karl Rupp (<r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>>) escribió:

    Can you try to build in a subfolder? Maybe there's some issue with the
    build inside the project folder. Also, it would be good to start with a
    fresh ViennaCL folder just to rule out any side-effects.

    $> cd /path/to/ViennaCL
    $> mkdir build
    $> cd build
    $> cmake ..
    -DOPENCL_LIBRARY=/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/libOpenCL.so
    $> make

    ENABLE_OPENCL is set by default. We can skip ublas for this.
    Then run via

    $> examples/tutorial/blas1-opencl

    inside the build folder. Does this work?

    Best regards,
    Karli



    On 11/19/21 13:04, SANDRA CATALAN PALLARES wrote:
     > And this is the output of the cmake:
     >
     > /home/jbelloch/EQU_FILTERING_sandra/cmake-3.10.0/bin/cmake
    ENABLE_OPENCL
     > -DOPENCLROOT=/home/jbelloch/EQU_FILTERING_sandra/opencl
     >
    -DOPENCL_LIBRARY=/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/libOpenCL.so

     > ENABLE_UBLAS . -DCMAKE_CXX_FLAGS="-DVIENNACL_DEBUG_ALL"
     > -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
     > -- The C compiler identification is GNU 4.8.2
     > -- The CXX compiler identification is GNU 4.8.2
     > -- Check for working C compiler: /usr/bin/cc
     > -- Check for working C compiler: /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: /usr/bin/c++
     > -- Check for working CXX compiler: /usr/bin/c++ -- works
     > -- Detecting CXX compiler ABI info
     > -- Detecting CXX compiler ABI info - done
     > -- Detecting CXX compile features
     > -- Detecting CXX compile features - done
     > -- Boost version: 1.54.0
     > -- Looking for pthread.h
     > -- Looking for pthread.h - found
     > -- Looking for pthread_create
     > -- Looking for pthread_create - not found
     > -- Looking for pthread_create in pthreads
     > -- Looking for pthread_create in pthreads - not found
     > -- Looking for pthread_create in pthread
     > -- Looking for pthread_create in pthread - found
     > -- Found Threads: TRUE
     > -- Boost version: 1.54.0
     > -- Found the following Boost libraries:
     > --   chrono
     > --   date_time
     > --   serialization
     > --   system
     > --   thread
     > --   atomic
     > -- Found OPENCL:
    /home/jbelloch/EQU_FILTERING_sandra/opencl/lib/libOpenCL.so
     > -- Configuring done
     > -- Generating done
     > CMake Warning:
     >    Manually-specified variables were not used by the project:
     >
     >      OPENCLROOT
     >
     >
     > -- Build files have been written to:
     > /home/jbelloch/EQU_FILTERING_sandra/ViennaCL-1.7.1
     >
     > El vie, 19 nov 2021 a las 10:36, SANDRA CATALAN PALLARES
     > (<scata...@ucm.es <mailto:scata...@ucm.es>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>>) escribió:
     >
     >     This is the last compilation command I used
     >
     >     jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1$
     >     //home/jbelloch/EQU_FILTERING_sandra/cmake-3.10.0/bin/cmake
     >     ENABLE_OPENCL
     >     -DOPENCLROOT=/home/jbelloch/EQU_FILTERING_sandra/opencl
>  -DOPENCL_LIBRARY=/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/libOpenCL.so
     >     ENABLE_UBLAS . -DCMAKE_CXX_FLAGS="-DVIENNACL_DEBUG_ALL"/
     >     /
     >     /
     >     Best regards,
     >     Sandra
     >
     >     El vie, 19 nov 2021 a las 10:00, Karl Rupp
    (<r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>
     >     <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>) escribió:
     >
     >         Okay, so CMake must be doing something odd in the build
    stage.
     >         Can you please send a compilation command when building with
     >         CMake? You
     >         may have to set CMAKE_VERBOSE_MAKEFILE to 'On'.
     >
     >         Best regards,
     >         Karli
     >
     >
     >
     >
     >         On 11/19/21 09:12, SANDRA CATALAN PALLARES wrote:
     >          > It works!
     >          >
     >          > jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1$ g++
     >          > examples/tutorial/blas1.cpp -I. -lOpenCL
     >          > -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
     >          > jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1$
    ./a.out
     >          > Copying a few scalars...
     >          > Manipulating a few scalars...
     >          > operator +=
     >          > operator *=
     >          > operator -=
     >          > operator /=
     >          > operator +
     >          > multiple operators
     >          > mixed operations
     >          > CPU scalar s3: 42
     >          > GPU scalar vcl_s3: 42
     >          > !!!! TUTORIAL COMPLETED SUCCESSFULLY !!!!
     >          >
     >          > Best regards,
     >          > Sandra
     >          >
     >          > El vie, 19 nov 2021 a las 8:49, Karl Rupp
     >         (<r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>
    <mailto:r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>>
     >          > <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>>) escribió:
     >          >
     >          >     Indeed!
     >          >
     >          >     Line 58 causes the error:
     >          >
     >
    
https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp
    
<https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp>
>  <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp>>
     >          >
>  <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp> <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp <https://github.com/viennacl/viennacl-dev/blob/master/viennacl/ocl/platform.hpp>>>
     >          >
     >          >     However, these lines are *exactly* the same as in the
     >         minimal example;
     >          >     but the minimal example succeeds. Also, this is
    the very
     >         first call to
     >          >     OpenCL, so there can't be any prior undetected errors.
     >          >
     >          >     What happens if you compile manually? In the main
     >         ViennaCL folder:
     >          >        $> g++ example/tutorial/blas1.cpp -I. -lOpenCL
     >          >     -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
     >          >
     >          >     and then
     >          >        $> ./a.out
     >          >
     >          >     Best regards,
     >          >     Karli
     >          >
     >          >     On 11/19/21 08:37, SANDRA CATALAN PALLARES wrote:
     >          >      > The mistery continues:
     >          >      >
     >          >      > jbelloch@odroid:~/EQU_FILTERING_sandra/test_opencl$
     >         ./a.out
     >          >      > # Platforms found: 1
     >          >      > 0
     >          >      >
     >          >      > Best regards,
     >          >      > Sandra
     >          >      >
     >          >      > El vie, 19 nov 2021 a las 8:33, Karl Rupp
     >         (<r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>
    <mailto:r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>>
     >          >     <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at> <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>
     >          >      > <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>> <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>>>)
     >          >     escribió:
     >          >      >
     >          >      >
     >          >      >     Good morning,
     >          >      >
     >          >      >     oh - now I'm puzzled. :-/
     >          >      >
     >          >      >     Can you please add a
     >          >      >        std::cout << err << std::endl;
     >          >      >     after
     >          >      >        std::cout << "# Platforms found: " <<
     >         num_platforms <<
     >          >     std::endl;
     >          >      >
     >          >      >     Which value do you get? Maybe clGetPlatformIDs
     >         returns a nonzero
     >          >      >     error code?
     >          >      >
     >          >      >     Best regards,
     >          >      >     Karli
     >          >      >
     >          >      >     On 11/19/21 08:29, SANDRA CATALAN PALLARES
    wrote:
     >          >      >      > Hi,
     >          >      >      >
     >          >      >      > The example is working :)
     >          >      >      >
     >          >      >      >
     >         jbelloch@odroid:~/EQU_FILTERING_sandra/test_opencl$ g++
     >          >     test.cpp
     >          >      >      > -lOpenCL
     >         -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
     >          >      >      >
     >           jbelloch@odroid:~/EQU_FILTERING_sandra/test_opencl$ ./a.out
     >          >      >      > # Platforms found: 1
     >          >      >      >
     >          >      >      > Cheers,
     >          >      >      > Sandra
     >          >      >      >
     >          >      >      > El jue, 18 nov 2021 a las 19:48, Karl Rupp
     >          >      >     (<r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>> <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>
     >          >     <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>> <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>>
     >          >      >      > <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>>
     >          >     <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>> <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at <mailto:r...@iue.tuwien.ac.at>>
     >          >     <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>
     >         <mailto:r...@iue.tuwien.ac.at
    <mailto:r...@iue.tuwien.ac.at>>>>>>)
     >          >      >     escribió:
     >          >      >      >
     >          >      >      >     thanks! This indicates that there is no
     >         OpenCL platform
     >          >      >     detected on
     >          >      >      >     your
     >          >      >      >     system. Basically this is the simplest
     >         query of all.
     >          >      >      >
     >          >      >      >     Can you try to compile and run the
     >         following minimal
     >          >     example?
     >          >      >      >
     >          >      >      >
     >          >      >      >     #include <iostream>
     >          >      >      >     #include <string>
     >          >      >      >     #include <vector>
     >          >      >      >     #include <cmath>
     >          >      >      >     #include <stdexcept>
     >          >      >      >
     >          >      >      >     #ifdef __APPLE__
     >          >      >      >     #include <OpenCL/cl.h>
     >          >      >      >     #else
     >          >      >      >     #include <CL/cl.h>
     >          >      >      >     #endif
     >          >      >      >
     >          >      >      >     int main()
     >          >      >      >     {
     >          >      >      >         cl_uint num_platforms;
     >          >      >      >         cl_platform_id platform_ids[42];
     >          >      >      >         cl_int err = clGetPlatformIDs(42,
     >         platform_ids,
     >          >      >     &num_platforms);
     >          >      >      >         std::cout << "# Platforms found:
    " <<
     >         num_platforms <<
     >          >      >     std::endl;
     >          >      >      >
     >          >      >      >         return 0;
     >          >      >      >     }
     >          >      >      >
     >          >      >      >
     >          >      >      >
     >          >      >      >        $> g++ test.cpp -lOpenCL
     >          >      >      >
     >           -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
     >          >      >      >
     >          >      >      >     should produce the executable a.out.
     >          >      >      >
     >          >      >      >     It should return at least one platform.
     >          >      >      >
     >          >      >      >     Thanks and best regards,
     >          >      >      >     Karli
     >          >      >      >
     >          >      >      >
     >          >      >      >
     >          >      >      >
     >          >      >      >
     >          >      >
     >          >      >
     >          >      >
     >          >      > --
     >          >      >
     >          >      > *Sandra Catalán Pallarés*
     >          >      > SecciónDept. Arquitectura de Computadores y
    Automática
     >          >      > Facultad de Ciencias Físicas - Desp. 223
     >          >      > Universidad Complutense de Madrid
     >          >      > 28040 - Madrid (Spain)
     >          >      > (+34) 91 394 *4394 - *scata...@ucm.es
    <mailto:scata...@ucm.es>
     >         <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>
     >         <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>>
     >          >     <mailto:scata...@ucm.es <mailto:scata...@ucm.es>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>
     >         <mailto:scata...@ucm.es <mailto:scata...@ucm.es>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>>>
     >          >
     >          >
     >          >
     >          > --
     >          >
     >          > *Sandra Catalán Pallarés*
     >          > SecciónDept. Arquitectura de Computadores y Automática
     >          > Facultad de Ciencias Físicas - Desp. 223
     >          > Universidad Complutense de Madrid
     >          > 28040 - Madrid (Spain)
     >          > (+34) 91 394 *4394 - *scata...@ucm.es
    <mailto:scata...@ucm.es>
     >         <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>
     >         <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>>
     >
     >
     >
     >     --
     >
     >     *Sandra Catalán Pallarés*
     >     SecciónDept. Arquitectura de Computadores y Automática
     >     Facultad de Ciencias Físicas - Desp. 223
     >     Universidad Complutense de Madrid
     >     28040 - Madrid (Spain)
     >     (+34) 91 394 *4394 - *scata...@ucm.es
    <mailto:scata...@ucm.es> <mailto:scata...@ucm.es
    <mailto:scata...@ucm.es>>
     >
     >
     >
     > --
     >
     > *Sandra Catalán Pallarés*
     > SecciónDept. Arquitectura de Computadores y Automática
     > Facultad de Ciencias Físicas - Desp. 223
     > Universidad Complutense de Madrid
     > 28040 - Madrid (Spain)
     > (+34) 91 394 *4394 - *scata...@ucm.es <mailto:scata...@ucm.es>
    <mailto:scata...@ucm.es <mailto:scata...@ucm.es>>



--

*Sandra Catalán Pallarés*
SecciónDept. Arquitectura de Computadores y Automática
Facultad de Ciencias Físicas - Desp. 223
Universidad Complutense de Madrid
28040 - Madrid (Spain)
(+34) 91 394 *4394 - *scata...@ucm.es <mailto:scata...@ucm.es>


_______________________________________________
ViennaCL-support mailing list
ViennaCL-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-support

Reply via email to