| 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 | | |
| 67 | | ... and a number of [AppCoprocessor GPU plan classes]. |
| | 34 | '''NOTE: plan classes for AMD GPUs must contain the substring 'ati'; |
| | 35 | plan classes for NVIDIA GPUs much contain either 'nvidia' or 'cuda' as a substring.''' |
| | 36 | |
| | 37 | The 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 | |
| | 44 | For ATI the situation is more complex because AMD changed the DLL names from amd* to ati* midstream; |
| | 45 | applications 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 | |
| | 53 | You can verify which DLLs your application is linked against by using |
| | 54 | [http://www.dependencywalker.com/ Dependency Walker] against your application. |
| | 55 | If your executable contains DLL names prefixed with 'amd' then your plan class |
| | 56 | will be ati or ati13amd depending on which version of the CAL SDK you are using. |
| | 57 | If the DLL names are prefixed with 'ati' then use the ati13ati or ati14 plan classes. |
| | 58 | |
| | 59 | In all cases (NVIDIA and ATI), the application is assumed to use 1 GPU, |
| | 60 | and the CPU usage is assumed to be 0.5% the FLOPS of the GPU. |
| | 61 | If there is a choice, the scheduler will give preference to later classes, |
| | 62 | i.e. it will pick cuda23 over cuda. |
| | 63 | |
| | 64 | Once you have chosen a plan class for your executable, |
| | 65 | create an [wiki:UpdateVersions app version], specifying its plan class. |
| | 66 | |