Interesting, thanks! This is really strange...

What do you get for
 $> c++ --version
and
 $> g++ --version

Is it the same compiler? Also, you can try to incrementally transform the CMake compilation line to the g++ compilation line and see where things break. I don't know how familiar you are with compilers, so this might be quite tricky.

In any case, you can experiment with ViennaCL by using the g++ compilation command. Since ViennaCL is header-only, there isn't anything else that you need to copy around.

Best regards,
Karli




On 11/26/21 10:55, SANDRA CATALAN PALLARES wrote:
Hi,

I just run the two commands you sent me. This is the output:

jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1$ g++ example/tutorial/blas1.cpp -I. -DVIENNACL_WITH_OPENCL -lOpenCL -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
g++-4.8.real: error: example/tutorial/blas1.cpp: No such file or directory
jbelloch@odroid:~/EQU_FILTERING_sandra/ViennaCL-1.7.1$ g++ examples/tutorial/blas1.cpp -I. -DVIENNACL_WITH_OPENCL -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 !!!!

Regards,
Sandra

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

    Thanks! This is the line used by CMake:

    /usr/bin/c++    -I/home/jbelloch/EQU_FILTERING_sandra/ViennaCL-1.7.1
    -I/usr/local/include
    -I/home/jbelloch/EQU_FILTERING_sandra/ViennaCL-1.7.1/libviennacl/include

         -DVIENNACL_WITH_OPENCL -o CMakeFiles/blas1.dir/blas1.cpp.o -c
    
/home/jbelloch/EQU_FILTERING_sandra/ViennaCL-1.7.1/examples/tutorial/blas1.cpp

    As you say, it doesn't yield a proper executable. Just to verify: Does

    $> g++ example/tutorial/blas1.cpp -I. -DVIENNACL_WITH_OPENCL -lOpenCL
    -L/home/jbelloch/EQU_FILTERING_sandra/opencl/lib/
    $> ./a.out

    in the main ViennaCL folder work if you build and execute manually?

    Best regards,
    Karli




    On 11/26/21 10:34, SANDRA CATALAN PALLARES wrote:
     > Hi Karli,
     >
     > No problem. Here is the new output.
     >
     > Regards,
     > Sandra
     >
     > El vie, 26 nov 2021 a las 9:59, 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ó:
     >
     >     Dear Sandra,
     >
     >     sorry for the late reply!
     >
     >     So CMake only relinked the executable. The linker command looks
     >     fine. So
     >     we need to check the compilation as well. Please run
     >        $> make clean
     >        $> make blas1
     >     and re-send the output. This time it should also include the
     >     compilation
     >     command.
     >
     >     Thanks and best regards,
     >     Karli
     >
     >     On 11/25/21 11:09, SANDRA CATALAN PALLARES wrote:
     >      > Hi,
     >      >
     >      > I just wanted to ask you if the output I sent was the
    right one,
     >     meaning
     >      > the installation is correct this time.
     >      >
     >      > Regards,
     >      > Sandra
     >      >
     >      > El vie, 19 nov 2021 a las 14:28, SANDRA CATALAN PALLARES
     >      > (<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>>>>) escribió:
     >      >
     >      >     The output is attached.
     >      >
     >      >     Best regards,
     >      >     Sandra
     >      >
     >      >     El vie, 19 nov 2021 a las 14:03, 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ó:
     >      >
     >      >         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>
     >     <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>>
     >      >         <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>
     >     <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>>>
     >      >          > <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>
     >     <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>>
     >      >         <mailto:viennacl-support@lists.sourceforge.net
    <mailto:viennacl-support@lists.sourceforge.net>
     >     <mailto: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> <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ó:
     >      >          >
     >      >          >     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>>
     >     <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
    <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>>>>>>) 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
     >      >          >      >
     >
     >
     >
     > --
     >
     > *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