Changes between Version 10 and Version 11 of AppCoprocessor


Ignore:
Timestamp:
Mar 12, 2008, 4:40:35 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppCoprocessor

    v10 v11  
    1111
    1212The BOINC client probes for coprocessors and reports them in scheduler requests.
    13 The XML looks like:
     13
     14== Deploying a coprocessor app ==
     15
     16BOINC uses the [AppPlan application planning] mechanism to
     17coordinate the scheduling of multi-threaded applications.
     18
     19Suppose you've developed a coprocessor program,
     20that it uses a CUDA GPU and 1 GFLOPS of the CPU.
     21To deploy it:
     22
     23 * Choose a "planning class" name for the program, say "cuda_1.1" (see below).
     24 * Create an [UpdateVersions app version].  Include a file '''app_plan''' containing "cuda_1.1".
     25 * Link the following function into your scheduler:
    1426{{{
    15 <coprocs>
    16    <coproc_cuda>
    17       <count>1</count>
    18       <name>GeForce 8800 GT (1)</name>
    19       <totalGlobalMem>...</totalGlobalMem>
    20       ...
    21    </coproc_cuda>
    22 </coprocs>
     27bool app_plan(HOST& host, char* plan_class, HOST_USAGE& hu) {
     28    if (!strcmp(plan_class, "cuda_1.1")) {
     29        for (i=0; i<host.coprocs.size(); i++) {
     30            COPROC cp = host.coprocs[i];
     31            if (cp.type == COPROC_CUDA) {
     32                COPROC_USAGE cu;
     33                strcpy(cu.name, cp.name);
     34                cu.count = 1;
     35                hu.coprocs.push_back(cu);
     36                double x = 1e9/host.p_fpops;
     37                if (x > 1) x = 1;
     38                hu.ncpus = x;
     39                hu.fpops = 5e11;
     40                return true;
     41            }
     42        }
     43    }
     44    return false;
     45}
    2346}}}
    24 
    25 
    2647== Questions ==
    2748