Changes between Initial Version and Version 1 of AppPlan


Ignore:
Timestamp:
Mar 12, 2008, 2:33:21 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppPlan

    v1 v1  
     1= Application planning =
     2
     3'''Application planning''' is a mechanism that lets the scheduler decide,
     4using project-supplied logic,
     5whether an application is able to run on a particular host,
     6and if so what resources it will use and how fast it will run.
     7It works as follows.
     8
     9An app_version record (in the server DB) has a character string field '''plan_class'''.
     10This identifies the range of processing resources that the application
     11requires and is able to use.
     12You can define these however you like,
     13e.g. "cuda_1_1" apps require a CUDA-enabled GPU,
     14"mt32" is a multithreaded app able to use 32 CPUs, etc.
     15
     16The scheduler is linked with a project-supplied function
     17{{{
     18bool app_plan(HOST&, char* plan_class, HOST_USAGE&);
     19}}}
     20The HOST argument describes the host's CPU(s),
     21and includes a field 'coprocs' listing its coprocessors.
     22
     23When called with a particular HOST and plan class,
     24the function returns true if the host's resources are sufficient for apps of that class.
     25If true, it populates the HOST_USAGE structure:
     26{{{
     27struct HOST_USAGE {
     28   COPROCS coprocs;   // coprocessors used by the app (name and count)
     29   double ncpus;      // #CPUs used by app (may be fractional)
     30   double flops;      // estimated FLOPS
     31   char opaque[256];  // passed to the app in init_data.xml
     32};
     33}}}
     34
     35When deciding whether to send a job to a host,
     36the scheduler examines all latest-version app_versions for the platform,
     37calls '''app_plan()''' for each,
     38and selects the one for which flops is greatest.
     39
     40The scheduler reply includes, for each app version, an XML encoding of HOST_USAGE.
     41
     42The client keeps track of coprocessor allocation, i.e. how many instances of each are free.
     43It only runs an app if enough instances are available.
     44
     45The client uses app_version.usage.flops to estimate job completion times.