Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add memory usage information and adjust average memory used per process #132

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading