{"id":20215466,"url":"https://github.com/kitwaremedical/slicerparalleltest","last_synced_at":"2025-10-28T20:33:08.021Z","repository":{"id":53755852,"uuid":"333127990","full_name":"KitwareMedical/SlicerParallelTest","owner":"KitwareMedical","description":"Testing code for running two Slicer CLIs in parallel and illustrates issue described here: https://discourse.slicer.org/t/running-a-module-in-parallel/12641/11","archived":false,"fork":false,"pushed_at":"2021-03-15T22:36:09.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-02-24T07:06:51.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KitwareMedical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-26T15:29:00.000Z","updated_at":"2021-03-15T22:36:09.000Z","dependencies_parsed_at":"2022-09-15T12:30:28.354Z","dependency_job_id":null,"html_url":"https://github.com/KitwareMedical/SlicerParallelTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FSlicerParallelTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FSlicerParallelTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FSlicerParallelTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2FSlicerParallelTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KitwareMedical","download_url":"https://codeload.github.com/KitwareMedical/SlicerParallelTest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241652964,"owners_count":19997578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:22:27.028Z","updated_at":"2025-10-28T20:33:07.918Z","avatar_url":"https://github.com/KitwareMedical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\nTesting code for running two CLIs in parallel\n\nDemonstrates discussion here: https://discourse.slicer.org/t/running-a-module-in-parallel/12641/11\n\nDesigned to be used with the GUI, since Slicer holds the text output until the CLI completes.\n\nThe `ParallelTestDriver` module attempts to run two instances of either a CPP or a scripted CLI at the same time.\n\n## Problem\n\nWe would like it to run them in parallel.\n\nCurrently the reported started times indicate the module are executed one after an other.\n\n* Scripted CLIs in parallel\n\n  ```\n  ...\n  Starting Scripted CLI One at 17:54:07\n  ...\n  Ending Scripted CLI One at 17:54:17\n  ...\n  Starting Scripted CLI Two at 17:54:17\n  ...\n  Ending Scripted CLI Two at 17:54:27\n  ```\n\n* Cpp CLIs in parallel\n\n  ```\n  ...\n  Starting Cpp CLI One at 18:00:05\n  ...\n  Ending Cpp CLI One at 18:00:15\n  ...\n  Starting Cpp CLI Two at 18:00:15\n  ...\n  Ending Cpp CLI Two at 18:00:25\n  ...\n  ```\n\n## Usage\n\n```\nSlicerWithParallelTest --python-code \"slicer.util.selectModule('ParallelTestDriver')\"\n```\n\n### Output\n\n* Scripted CLIs in parallel\n\n  ```\n  Scheduling processing with scipted CLIs started\n  Starting Scripted CLI One\n  Starting Scripted CLI Two\n  Scheduling processing with scipted CLIs completed\n  Scheduling processing with scipted CLIs started\n  Starting Scripted CLI One\n  Starting Scripted CLI Two\n  Scheduling processing with scipted CLIs completed\n\n  Found CommandLine Module, target is  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py\n  ModuleType: CommandLineModule\n  ParallelTestCLI command line:\n\n  /home/jcfr/Projects/Slicer-Release/python-install/bin/python /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py --numberOfSteps 10 Scripted CLI One \n\n  ParallelTestCLI standard output:\n\n  command: ['/home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py', '--numberOfSteps', '10', 'Scripted CLI One']\n  Starting main function Scripted CLI One with numberOfSteps 10\n\n  Starting Scripted CLI One at 17:54:07\n  Step 0 of Scripted CLI One\n  Step 1 of Scripted CLI One\n  Step 2 of Scripted CLI One\n  Step 3 of Scripted CLI One\n  Step 4 of Scripted CLI One\n  Step 5 of Scripted CLI One\n  Step 6 of Scripted CLI One\n  Step 7 of Scripted CLI One\n  Step 8 of Scripted CLI One\n  Step 9 of Scripted CLI One\n  Ending Scripted CLI One at 17:54:17\n\n  Ending main function: Scripted CLI One\n\n  ParallelTestCLI completed without errors\n\n  Found CommandLine Module, target is  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py\n  ModuleType: CommandLineModule\n  ParallelTestCLI command line:\n\n  /home/jcfr/Projects/Slicer-Release/python-install/bin/python /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py --numberOfSteps 10 Scripted CLI Two \n\n  ParallelTestCLI standard output:\n\n  command: ['/home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCLI.py', '--numberOfSteps', '10', 'Scripted CLI Two']\n  Starting main function Scripted CLI Two with numberOfSteps 10\n\n  Starting Scripted CLI Two at 17:54:17\n  Step 0 of Scripted CLI Two\n  Step 1 of Scripted CLI Two\n  Step 2 of Scripted CLI Two\n  Step 3 of Scripted CLI Two\n  Step 4 of Scripted CLI Two\n  Step 5 of Scripted CLI Two\n  Step 6 of Scripted CLI Two\n  Step 7 of Scripted CLI Two\n  Step 8 of Scripted CLI Two\n  Step 9 of Scripted CLI Two\n  Ending Scripted CLI Two at 17:54:27\n\n  Ending main function: Scripted CLI Two\n  ParallelTestCLI completed without errors\n  ```\n\n\n* Cpp CLIs in parallel\n\n  ```\n  Scheduling processing with Cpp CLIs started\n  Starting Cpp CLI One\n  Starting Cpp CLI Two\n  Scheduling processing with Cpp CLIs completed\n  Scheduling processing with Cpp CLIs started\n  Starting Cpp CLI One\n  Starting Cpp CLI Two\n  Scheduling processing with Cpp CLIs completed\n\n  Found CommandLine Module, target is  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCppCLI\n  ModuleType: CommandLineModule\n  ParallelTestCLI command line:\n\n  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCppCLI --numberOfSteps 10 Cpp CLI One\n\n  ParallelTestCLI standard output:\n\n  Starting Cpp CLI One at 18:00:05\n  Step 0 of Cpp CLI One\n  Step 1 of Cpp CLI One\n  Step 2 of Cpp CLI One\n  Step 3 of Cpp CLI One\n  Step 4 of Cpp CLI One\n  Step 5 of Cpp CLI One\n  Step 6 of Cpp CLI One\n  Step 7 of Cpp CLI One\n  Step 8 of Cpp CLI One\n  Step 9 of Cpp CLI One\n  Ending Cpp CLI One at 18:00:15\n\n  ParallelTestCLI completed without errors\n\n  Found CommandLine Module, target is  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCppCLI\n  ModuleType: CommandLineModule\n  ParallelTestCLI command line:\n\n  /home/jcfr/Projects/SlicerParallelTest-build/lib/Slicer-4.13/cli-modules/ParallelTestCppCLI --numberOfSteps 10 Cpp CLI Two\n\n  ParallelTestCLI standard output:\n\n  Starting Cpp CLI Two at 18:00:15\n  Step 0 of Cpp CLI Two\n  Step 1 of Cpp CLI Two\n  Step 2 of Cpp CLI Two\n  Step 3 of Cpp CLI Two\n  Step 4 of Cpp CLI Two\n  Step 5 of Cpp CLI Two\n  Step 6 of Cpp CLI Two\n  Step 7 of Cpp CLI Two\n  Step 8 of Cpp CLI Two\n  Step 9 of Cpp CLI Two\n  Ending Cpp CLI Two at 18:00:25\n\n  ParallelTestCLI completed without errors\n  ```\n\n## Modules\n\n* `ParallelTestCLI`: Scripted CLI\n* `ParallelTestCppCLI`: Cpp CLI\n* `ParallelTestDriver`: Scripted loadable module for running `Scripted CLIs in parallel` or `Cpp CLIs in parallel`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fslicerparalleltest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitwaremedical%2Fslicerparalleltest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fslicerparalleltest/lists"}