original:
Info about resource usage (GPU usage, #cpus) is stored in APP_VERSION.
When we need this info for a RESULT, we look at rp->avp
new:
For BUDA apps, the info about the actual app (not the docker wrapper)
comes with the workunit, not the app version.
So create a new structure, RESOURCE_USAGE.
APP_VERSION has one, WORKUNIT has one.
So does RESULT; when we create the result we copy the struct
either from the app version or (for BUDA jobs) the workunit.
Then the code can just reference rp->resource_usage.
Nice. This enables BUDA/GPU functionality with almost no additional complexity.
Add code to parse resource usage items in <workunit>
Note: info about missing GPUs (or GPUS without needed libraries)
is also stored in RESOURCE_USAGE.
but not tested.
- Add code to SPORADIC_RESOURCES to check and reserve coprocs
- Subtract sporadic resources before scheduling regular jobs
- Move SPORADIC_RESOURCES to coproc_sched.h, making it visible to other code
- Change 'have_sporadic' to 'have_sporadic_app'; we use the word
'sporadic' for network connections too