Changes between Version 1 and Version 2 of PlanClassFunc


Ignore:
Timestamp:
Jun 6, 2012, 10:59:55 AM (12 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlanClassFunc

    v1 v2  
    1 = Specifying plan classes in C++ ==
     1= Specifying plan classes in C++ =
    22
    33The scheduler is linked with a function
     
    3737and to link your own '''app_plan()''' function with the scheduler.
    3838The BOINC scheduler comes with a default '''app_plan()''' (in sched/sched_customize.cpp).
     39
     40== Defining GPU plan classes ==
     41
     42To define a new NVIDIA/CUDA plan class, add a new clause
     43to '''app_plan_cuda()''' in sched/sched_customize.cpp.
     44For example, the plan class '''cuda23''' is defined by:
     45
     46{{{
     47    ...
     48    if (!strcmp(plan_class, "cuda23")) {
     49        if (!cuda_check(c, hu,
     50            100,        // minimum compute capability (1.0)
     51            200,        // max compute capability (2.0)
     52            2030,       // min CUDA version (2.3)
     53            19500,      // min display driver version (195.00)
     54            384*MEGA,   // min video RAM
     55            1.,         // # of GPUs used (may be fractional, or an integer > 1)
     56            .01,        // fraction of FLOPS done by the CPU
     57            .21            // estimated GPU efficiency (actual/peak FLOPS)
     58        )) {
     59            return false;
     60        }
     61    }
     62}}}
     63
     64To define a new ATI/CAL plan class, add a new clause
     65to '''app_plan_ati()'''.
     66For example:
     67{{{
     68    if (!strcmp(plan_class, "ati14")) {
     69        if (!ati_check(c, hu,
     70            1004000,    // min display driver version (10.4)
     71            false,      // require libraries named "ati", not "amd"
     72            384*MEGA,   // min video RAM
     73            1.,         // # of GPUs used (may be fractional, or an integer > 1)
     74            .01,        // fraction of FLOPS done by the CPU
     75            .21         // estimated GPU efficiency (actual/peak FLOPS)
     76        )) {
     77            return false;
     78        }
     79    }
     80}}}
     81
     82To define a new OpenCL plan class, add a new clause to
     83'''app_plan_opencl()'''.
     84For example:
     85
     86{{{
     87    if (!strcmp(plan_class, "opencl_nvidia_101")) {
     88        return opencl_check(
     89            c, hu,
     90            101,        // OpenCL version (1.1)
     91            256*MEGA,   // min video RAM
     92            1,          // # of GPUs used
     93            .1,         // fraction of FLOPS done by the CPU
     94            .21         // estimated GPU efficiency (actual/peak FLOPS)
     95        );
     96    }
     97}}}