Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client: add sporadic app feature #5385

Merged
merged 16 commits into from
Oct 6, 2023
Merged

Client: add sporadic app feature #5385

merged 16 commits into from
Oct 6, 2023

Conversation

davidpanderson
Copy link
Contributor

See https://github.com/BOINC/boinc/wiki/Sporadic-Applications
Fixes #5358

This should have no effect if no sporadic apps are present.

Passes basic tests using a simple sporadic app.
Additional testing/debugging will be needed when/if there are real sporadic apps.

- call sporadic init and poll functions
- add sporadic_debug log flag
- finish sporadic test app (samples/sporadic/sporadic.cpp)
- sporadic jobs are always run (like NCI)
- projects can now have a mix of regular, non CPU intensive, and sporadic apps.
    This mix can change over time.
    Because of this, there is longer a project-wide NCI flag.
    Projects have to tag individual apps as NCI.
    I don't think this affects any current projects.
- fix potential timing problem in client/app comm
    by introducing 2.5 sec 'ignore_until' period
- API: fix bug in parsing hearbeats
- Add member functions of RESULT, ACTIVE_TASK etc.
    so you can get APP attributes like cpu_intensive, sporadic etc.
    without traversing pointers
- --app_test feature: put init_data.xml in  slots/app_test,
    otherwise app will run in standalone mode
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
@AenBleidd
Copy link
Member

@davidpanderson, currently the build is broken for Windows because of the new file added.
Let's handle this offline (will write an email to you with the explanations what should be fixed).
I'll put this PR to draft right now to prevent it from being merged and to not block the current master branch.

@AenBleidd AenBleidd marked this pull request as draft October 4, 2023 11:19
Copy link
Contributor

@CharlieFenton CharlieFenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is far outside my area of expertise so I don't feel I can review it other than to say that it builds without warnings or errors on my Mac.

@davidpanderson
Copy link
Contributor Author

davidpanderson commented Oct 4, 2023 via email

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #5385 (52daa40) into master (44295c1) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5385      +/-   ##
============================================
- Coverage     10.87%   10.86%   -0.01%     
  Complexity     1068     1068              
============================================
  Files           279      279              
  Lines         36061    36073      +12     
  Branches       8335     8339       +4     
============================================
  Hits           3920     3920              
- Misses        31747    31759      +12     
  Partials        394      394              
Files Coverage Δ
api/boinc_api.h 0.00% <ø> (ø)
lib/app_ipc.h 0.00% <ø> (ø)
lib/cc_config.h 0.00% <ø> (ø)
lib/common_defs.h 0.00% <ø> (ø)
lib/cc_config.cpp 0.00% <0.00%> (ø)
api/boinc_api.cpp 0.00% <0.00%> (ø)

@AenBleidd
Copy link
Member

I have added this new app to the Windows MSVC project.
However, some additional changes are required to build this new app for linux and Android on our CI.
I'll handle this during next two days.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
@CharlieFenton
Copy link
Contributor

Add sporadic sample app to the linux and android CI pipelines

My understanding is that this is not actually a sample / example but a test application. It is unclear how it is to be used. Perhaps @davidpanderson can clarify this.

@AenBleidd
Copy link
Member

@CharlieFenton, I got a different impression. But I might be wrong here, of course

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
@AenBleidd
Copy link
Member

@CharlieFenton, we have most of our samples built on the CI for MacOS.
Do we need to build sporadic sample all as well?

@CharlieFenton
Copy link
Contributor

The first line of samples/sporadic/sporadic.cpp is
// test sporadic app

@davidpanderson
Copy link
Contributor Author

The apps in samples/ have various purposes.
Some are for direct use by projects (wrapper, vboxwrapper).
Others are templates for projects (nvcuda).
Others are for testing the API (sleeper, worker, sporadic)

@CharlieFenton
Copy link
Contributor

Wouldn't it be more appropriate for the test apps to be in the tests directory rather than samples?

@AenBleidd
Copy link
Member

'Tests' directory usually contains unit/integration/module tests.
And not really a test applications.
I'd personally keep them as-is in the samples folder.

@CharlieFenton
Copy link
Contributor

CharlieFenton commented Oct 6, 2023

@CharlieFenton, we have most of our samples built on the CI for MacOS.
Do we need to build sporadic sample all as well?

On the Mac we build the example_app (uppercase, uppercase graphics & slideshow), VBoxWrapper, wrapper, OpenCLApp, and the zip apps, all of which are samples or for direct use by projects. SInce it is a test app, I don't think this is in the same category.

I don't understand how samples/sporadic is to be used, if it is needed on more than one platform or even if it is needed on a regular basis after the sporadic apps functionality has been debugged.

I really don't want to spend time getting it to build on the Mac unless there is a compelling reason to do so.

@davidpanderson
Copy link
Contributor Author

We won't need it on the Mac. Linux and Win is enough to debug API stuff.

@AenBleidd
Copy link
Member

if it is needed on a regular basis after the sporadic apps functionality has been debugged.

I believe, it's always good to have the code available somewhere in case you need later require to test some additional functionality or to debug existing one because of some issue or corner case found.

Then I'll proceed with this PR and merge it since it's done.

@AenBleidd AenBleidd marked this pull request as ready for review October 6, 2023 08:43
@AenBleidd
Copy link
Member

@davidpanderson, @CharlieFenton, thank you for working on this important topic!

@AenBleidd AenBleidd merged commit 71e5fd0 into master Oct 6, 2023
48 of 49 checks passed
@AenBleidd AenBleidd deleted the dpa_sporadic branch October 6, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

support sporadic apps
3 participants