Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] Cannot use OpenCL on CPU

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] Cannot use OpenCL on CPU


Chronologique Discussions 
  • From: Berenger Bramas <berenger.bramas@inria.fr>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] Cannot use OpenCL on CPU
  • Date: Thu, 14 Jan 2016 14:16:16 +0100 (CET)
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hello,
I am using OpenCL on CPU (mainly for development purpose)
StarPU was able to detect my CPU (Intel® Core™ i7-4610M CPU @ 3.00GHz × 4) as an OpenCL device until lately.

The following code is compiled well:
==================================================
#include <starpu.h>
#include <iostream>
#include <vector>
#include <unistd.h>

#ifndef STARPU_USE_OPENCL
#error StarPU must support opencl
#endif

int main(int /*argc*/, char** /*argv*/){
    setenv("STARPU_NCPU","0",1);
    setenv("STARPU_NOPENCL","1",1);
    setenv("STARPU_OPENCL_ONLY_ON_CPUS","1",1);
    setenv("STARPU_OPENCL_ON_CPUS","1",1);
    setenv("STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY","1",1);
    setenv("STARPU_OPENCL_PIPELINE","0",0);

    std::cout << "STARPU_MAJOR_VERSION " << STARPU_MAJOR_VERSION << std::endl;
    std::cout << "STARPU_MINOR_VERSION " << STARPU_MINOR_VERSION << std::endl;
    std::cout << "STARPU_MAXOPENCLDEVS " << STARPU_MAXOPENCLDEVS << std::endl;

    unsigned ret;
    struct starpu_conf conf;
    ret = starpu_conf_init(&conf);
    assert(ret == 0);
    ret = starpu_init(&conf);
    assert(ret == 0);

    starpu_pause();

    std::cout << "starpu_worker_get_count " << starpu_worker_get_count() << std::endl;
    std::cout << "starpu_cpu_worker_get_count " << starpu_cpu_worker_get_count() << std::endl;
    std::cout << "starpu_opencl_worker_get_count " << starpu_opencl_worker_get_count() << std::endl;

    starpu_resume();
    starpu_shutdown();

    return 0;
}
==================================================

But at execution I get:
==================================================

$ ./Tests/Debug/testOpenCLCPU
STARPU_MAJOR_VERSION 1
STARPU_MINOR_VERSION 3
STARPU_MAXOPENCLDEVS 8
[starpu][starpu_initialize] Warning: StarPU was configured with --enable-debug (-O0), and is thus not optimized
[starpu][starpu_initialize] Warning: StarPU was configured with --enable-spinlock-check, which slows down a bit
[starpu][starpu_initialize] Warning: StarPU was configured with --enable-verbose, which slows down a bit
[starpu][starpu_initialize] Warning: StarPU was configured with --with-fxt, which slows down a bit
[starpu][load_bus_latency_file_content] loading latencies from /home/berenger/.starpu/sampling//bus/berenger-HP-ProBook-640-G1.latency
[starpu][load_bus_bandwidth_file_content] loading bandwidth from /home/berenger/.starpu/sampling//bus/berenger-HP-ProBook-640-G1.bandwidth
[starpu][_starpu_init_machine_config] No worker found, aborting ...
==================================================


Thanks for the help.

Bérenger Bramas

HiePACS Project

Tel (05 24 57) 40 76
INRIA BORDEAUX Sud Ouest





Archives gérées par MHonArc 2.6.19+.

Haut de le page