Skip to content

Commit

Permalink
Add memory usage information in the output and adjust average process…
Browse files Browse the repository at this point in the history
… memory

usage to be 10GB
  • Loading branch information
pennyannn committed Dec 14, 2023
1 parent 41b0f65 commit 556dbd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.saw_x86
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG GO_VERSION=1.20.1
ARG GO_ARCHIVE="go${GO_VERSION}.linux-amd64.tar.gz"
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN apt-get install -y wget unzip git cmake clang llvm python3-pip libncurses5 opam libgmp-dev cabal-install
RUN apt-get install -y wget unzip git cmake clang llvm python3-pip libncurses5 opam libgmp-dev cabal-install time

RUN wget "https://dl.google.com/go/${GO_ARCHIVE}" && tar -xvf $GO_ARCHIVE && \
mkdir $GOROOT && mv go/* $GOROOT && rm $GO_ARCHIVE
Expand Down
4 changes: 2 additions & 2 deletions SAW/scripts/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run_process(command):
wd = os.getcwd()
os.chdir(path)
start = time.perf_counter()
result = subprocess.run(command, capture_output = True)
result = subprocess.run(["/usr/bin/time"] + command, capture_output = True)
end = time.perf_counter()
if path:
os.chdir(wd)
Expand All @@ -65,7 +65,7 @@ def create_summary(output, error, exit_code, debug):
def parallel_run (commands, debug):
mem = psutil.virtual_memory().available
# Assuming each process uses 7GB memory
pmem = 7*1024*1024*1024
pmem = 10*1024*1024*1024
pbound = int(mem/pmem)
np = multiprocessing.cpu_count()
pool = multiprocessing.Pool(min(np, pbound))
Expand Down

0 comments on commit 556dbd3

Please sign in to comment.