Skip to content

Commit

Permalink
Fix Timeout Bug and Improve Docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
bbodin committed Mar 12, 2024
1 parent 3ceb6c6 commit 25e9ae7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
26 changes: 18 additions & 8 deletions src/libkiter/algorithms/dse/ThroughputBufferingDSE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,18 +460,28 @@ namespace algorithms {


VERBOSE_INFO("Start waiting for exploration_future.");
if (std::future_status::timeout == exploration_future.wait_for(std::chrono::seconds(params.timeout_sec))) {
VERBOSE_INFO("Timeout, sending a stop signal.");
dse.stop();
VERBOSE_INFO("Wait for stop signal effect.");
exploration_future.wait();
bool timeout_happenend = false;
if (params.timeout_sec > 0) {
// Manage the end with a timeout
if (std::future_status::timeout ==
exploration_future.wait_for(std::chrono::seconds(params.timeout_sec))) {
// The timeout happened, we need to force the end.
timeout_happenend = true;
VERBOSE_INFO("Timeout, sending a stop signal.");
dse.stop();
VERBOSE_INFO("Wait for stop signal effect.");
} else {
VERBOSE_INFO("exploration_future ended by itself, without stop signal.");
}
}

exploration_future.wait();

if (timeout_happenend) {
VERBOSE_INFO("Exploration_future ended, after stop signal.");
VERBOSE_WARNING("Incomplete exploration.");
} else {
VERBOSE_INFO("exploration_future ended by itself, without stop signal.");
}


return dse.getResults();

}
Expand Down
8 changes: 0 additions & 8 deletions tools/docker/DockerFile.f29

This file was deleted.

30 changes: 23 additions & 7 deletions tools/docker/DockerFile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@ FROM ubuntu:noble



################################### PACKAGE INSTALL ##########################
################################### INSTALL DEPS ##########################
RUN apt-get update && apt-get install --no-install-recommends -y git make cmake gcc g++ libboost-all-dev libxml2-dev libglpk-dev glpk-utils && apt-get clean && rm -rf /var/lib/apt/lists/*
################################################################################


################################### PREPARE ##########################
RUN mkdir /kiter/
COPY . /kiter/
WORKDIR /kiter/
RUN make clean
RUN make release -j12
RUN ./Release/bin/kiter -h

COPY ./src /kiter/src
COPY ./benchmarks /kiter/benchmarks
COPY ./modules /kiter/modules
COPY ./tests /kiter/tests
COPY ./tools /kiter/tools
COPY ./CMakeLists.txt /kiter/CMakeLists.txt
COPY ./Makefile /kiter/Makefile

################################### CLEAN ##########################
RUN make clean -C /kiter/
RUN make sdf3_benchmarks -C /kiter/

################################### COMPILE ##########################
RUN make release -j12 -C /kiter/

################################### TEST ##########################
RUN /kiter/Release/bin/kiter -h


WORKDIR /kiter/

0 comments on commit 25e9ae7

Please sign in to comment.