Changes between Version 25 and Version 26 of AppPlan


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AppPlan

    v25 v26  
    1 = Application planning =
     1= Plan classes =
    22
    3 '''Application planning''' is a mechanism that lets the scheduler decide,
     3'''Plan classes''' is a mechanism that lets the scheduler decide,
    44using project-supplied logic:
    55
     
    1313See [AppVersionNew how to specify an app version's plan class].
    1414
    15 The scheduler is linked with a function
    16 {{{
    17 bool app_plan(SCHEDULER_REQUEST &sreq, char* plan_class, HOST_USAGE&);
    18 }}}
    19 The '''sreq''' argument describes the host.
    20 It contains:
    21  * in '''sreq.host''' field, a description of the host's hardware, including:
    22   * In p_vendor and p_model, the processor type
    23   * In p_features, the processor features (e.g., fpu tsc pae nx sse sse2 mmx)
    24   * In m_nbytes, the amount of RAM
    25  * in '''sreq.coprocs''', a list of the hosts's coprocessors.
    26  * in '''core_client_version''', the client's version number in MMmmRR form.
    27 
    28 When called with a particular SCHEDULER_REQUEST and plan class,
    29 the function returns true if the host's resources are sufficient for apps of that class.
    30 If true, it populates the HOST_USAGE structure:
    31 {{{
    32 struct HOST_USAGE {
    33    double ncudas;     // number of NVIDIA GPUs used
    34    double natis;      // number of ATI GPUs used
    35    double gpu_ram;    // max amount of GPU RAM used
    36    double avg_ncpus;  // avg #CPUs used by app (may be fractional)
    37    double max_ncpus;  // max #CPUs used (not currently used for anything)
    38    double projected_flops;
    39       // an estimate of the actual FLOPS.
    40       // used to select versions, so make it higher for the preferred version
    41    double peak_flops;
    42       // the peak FLOPS of the devices to be used
    43    char cmdline[256]; // passed to the app as a cmdline argument;
    44                       // this can be used, e.g. to control the # of threads used
    45 };
    46 }}}
    47 
    4815When deciding whether to send a job to a host,
    4916the scheduler examines all latest-version app_versions for the platform,
     
    5421won't start the app unless that much RAM is available on the allocated GPU.
    5522
    56 You are free to define your own set of plan classes,
    57 and to link your own '''app_plan()''' function with the scheduler.
    58 The BOINC scheduler comes with a default '''app_plan()''' (in sched/sched_customize.cpp).
     23
    5924This defines the following plan classes:
    6025
     
    6429 '''vbox32''':: An app that runs in a 32-bit VirtualBox VM
    6530 '''vbox64''':: An app that runs in a 64-bit VirtualBox VM
     31Each coprocessor application has an associated [wiki:AppPlan plan class]
     32which determines the hardware and software resources that are needed to run the application.
    6633
    67 ... and a number of [AppCoprocessor GPU plan classes].
     34'''NOTE: plan classes for AMD GPUs must contain the substring 'ati';
     35plan classes for NVIDIA GPUs much contain either 'nvidia' or 'cuda' as a substring.'''
     36
     37The following plan classes for NVIDIA are pre-defined:
     38
     39 '''cuda''':: NVIDIA GPU, compute capability 1.0+, driver version 177.00+, 254+ MB RAM.
     40 '''cuda23''':: Requires driver version 190.38+, 384+ MB RAM.
     41 '''cuda_fermi''':: Requires compute capability 2.0+ and CUDA version 3.0+
     42 '''opencl_nvidia_101''':: Requires OpenCL 1.1+ support
     43
     44For ATI the situation is more complex because AMD changed the DLL names from amd* to ati* midstream;
     45applications are linked against a particular name and will fail if it's not present.
     46
     47 '''ati''':: CAL version 1.0.0+, amd* DLLs
     48 '''ati13amd''':: CAL version 1.3+, amd* DLLs
     49 '''ati13ati''':: CAL version 1.3+, ati* DLLs
     50 '''ati14''':: CAL version 1.4+, ati* DLLs
     51 '''opencl_ati_101''':: OpenCL 1.1+
     52
     53You can verify which DLLs your application is linked against by using
     54[http://www.dependencywalker.com/ Dependency Walker] against your application.
     55If your executable contains DLL names prefixed with 'amd' then your plan class
     56will be ati or ati13amd depending on which version of the CAL SDK you are using.
     57If the DLL names are prefixed with 'ati' then use the ati13ati or ati14 plan classes.
     58
     59In all cases (NVIDIA and ATI), the application is assumed to use 1 GPU,
     60and the CPU usage is assumed to be 0.5% the FLOPS of the GPU.
     61If there is a choice, the scheduler will give preference to later classes,
     62i.e. it will pick cuda23 over cuda.
     63
     64Once you have chosen a plan class for your executable,
     65create an [wiki:UpdateVersions app version], specifying its plan class.
     66
    6867
    6968'''Note: plan classes containing the substrings 'nvidia', 'cuda', and 'ati' are reserved