Changes between Version 4 and Version 5 of AppPlan
- Timestamp:
- Mar 20, 2008, 9:14:43 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AppPlan
v4 v5 18 18 The scheduler is linked with a project-supplied function 19 19 {{{ 20 bool app_plan( HOST&, char* plan_class, HOST_USAGE&);20 bool app_plan(SCHEDULER_REQUEST &sreq, char* plan_class, HOST_USAGE&); 21 21 }}} 22 The HOST argument describes the host's CPU(s), 23 and includes a field 'coprocs' listing its coprocessors. 22 The '''sreq''' argument contains various data: 23 * in '''sreq.host''' field, a description of the host's processors and memory 24 * in '''sreq.global_prefs''' field, a parsed version of the user's global preferences 25 * in '''sreq.coprocs''', a list of its coprocessors. 24 26 25 When called with a particular HOST and plan class, 27 28 When called with a particular SCHEDULER_REQUEST and plan class, 26 29 the function returns true if the host's resources are sufficient for apps of that class. 27 30 If true, it populates the HOST_USAGE structure: … … 29 32 struct HOST_USAGE { 30 33 COPROCS coprocs; // coprocessors used by the app (name and count) 31 double ncpus; // #CPUs used by app (may be fractional) 34 double avg_ncpus; // avg #CPUs used by app (may be fractional) 35 double max_ncpus; // max #CPUs used (relevant if user changes prefs later) 32 36 double flops; // estimated FLOPS 33 char opaque[256]; // passed to the app in init_data.xml 37 char opaque[256]; // passed to the app in init_data.xml; 38 // this can be used to control the # of threads used 34 39 }; 35 40 }}} … … 38 43 the scheduler examines all latest-version app_versions for the platform, 39 44 calls '''app_plan()''' for each, 40 and selects the one for which flops is greatest. 45 and selects the one for which '''flops''' is greatest. 46 The client uses '''flops''' to estimate job completion times. 41 47 42 48 The scheduler reply includes, for each app version, an XML encoding of HOST_USAGE. … … 45 51 It only runs an app if enough instances are available. 46 52 47 The client uses app_version.usage.flops to estimate job completion times.48 53 49 54 == Notes ==