Skip to content

Commit

Permalink
[PEx] parallel: update GitHub CI to run with 3 threads
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-goel committed Aug 29, 2024
1 parent 9a561c7 commit b367d14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private static void runWithTimeout() throws Exception {
break;
}

TimeUnit.SECONDS.sleep(1);
TimeUnit.MILLISECONDS.sleep(100);
PExGlobal.printProgress(false);
}
PExGlobal.printProgress(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public SearchTask waitForNextTask() throws InterruptedException {
}

// no next task but there are running tasks, sleep and retry
TimeUnit.SECONDS.sleep(1);
TimeUnit.MILLISECONDS.sleep(100);
}

return nextTask;
Expand Down Expand Up @@ -447,7 +447,10 @@ public PValue<?> getNextDataChoice(List<PValue<?>> input_choices) {

private void postProcessIteration() {
int maxSchedulesPerTask = PExGlobal.getConfig().getMaxSchedulesPerTask();
if (maxSchedulesPerTask > 0 && searchStrategy.getCurrTaskNumSchedules() >= maxSchedulesPerTask) {
if (PExGlobal.getConfig().getNumThreads() > 1 && searchStrategy.getCurrTaskId() == 0) {
// multi-threaded run, and this is the very first task
isDoneIterating = true;
} else if (maxSchedulesPerTask > 0 && searchStrategy.getCurrTaskNumSchedules() >= maxSchedulesPerTask) {
isDoneIterating = true;
}

Expand Down
2 changes: 1 addition & 1 deletion Src/PRuntimes/PExRuntime/src/test/java/pex/TestPEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TestPEx {
private static String timeout = "30";
private static String schedules = "100";
private static String maxSteps = "10000";
private static String runArgs = "--checker-args :--schedules-per-task:10";
private static String runArgs = "--checker-args :--schedules-per-task:10:--nproc:3";
private static boolean initialized = false;

private static void setRunArgs() {
Expand Down

0 comments on commit b367d14

Please sign in to comment.