Skip to content

Commit

Permalink
Modify p4studio interactive to use limited parallel jobs (#78)
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
  • Loading branch information
jafingerhut authored Feb 20, 2025
1 parent c5c4e98 commit e01a187
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Build
run: |
./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml
./p4studio/p4studio profile apply --jobs $(nproc) ./p4studio/profiles/testing.yaml
- name: Show build logs
if: success() || failure()
Expand Down
5 changes: 3 additions & 2 deletions p4studio/interactive/interactive_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from config.configuration_manager import current_configuration_manager
from interactive.input_validation import validate_path_to_write, validate_kernel_headers_input, validate_file_to_read
from profile.profile import Profile
from profile.profile_command import execute_plan
from profile.profile_command import execute_plan, calculate_jobs_from_available_cpus_and_memory
from profile.profile_execution_plan import ProfileExecutionPlan
from system.check_system_utils import print_multiple_checks
from system.checks import get_initial_checks
Expand Down Expand Up @@ -166,7 +166,8 @@ def create_default_profile() -> Profile:


def build_sde(context: Context, profile: Profile) -> None:
plan = ProfileExecutionPlan(profile, None, os.cpu_count())
jobs = calculate_jobs_from_available_cpus_and_memory()
plan = ProfileExecutionPlan(profile, None, jobs)
execute_plan(context, plan)


Expand Down

0 comments on commit e01a187

Please sign in to comment.