Skip to content

Commit

Permalink
Update mpirun and fix CI partly (#71)
Browse files Browse the repository at this point in the history
* Updated readme and mpirun options

* Added venv to testreadme workflow

* Forgot to activate venv

* Add venv (might have missed some)

* Updated readme and mpirun options

* Added venv to testreadme workflow

* Forgot to activate venv

* Add venv (might have missed some)
  • Loading branch information
chun9l authored May 17, 2024
1 parent ae02ff8 commit 180bbe2
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-analytic-banana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/analytic-banana/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-analytic-donut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/analytic-donut/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-analytic-funnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/analytic-funnel/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-analytic-gaussian-mixture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/analytic-gaussian-mixture/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-cuqi-ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest numpy cuqipy umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/cuqi-ct/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-deconvolution-1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest numpy cuqipy umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/deconvolution-1d/ && \
python3 test_output.py http://localhost:4243
5 changes: 4 additions & 1 deletion .github/workflows/benchmark-heat-1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest numpy cuqipy umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd benchmarks/heat-1d/ && \
python3 test_output.py http://localhost:4242
5 changes: 4 additions & 1 deletion .github/workflows/model-exahype-tsunami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd models/exahype-tsunami/ && \
python3 test_output.py http://localhost:4242
5 changes: 4 additions & 1 deletion .github/workflows/model-l2-sea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
-
name: Dependencies
run: |
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip && pip3 install pytest umbridge
sudo apt update && DEBIAN_FRONTEND="noninteractive" sudo apt install -y python3-pip python3-venv && \
python3 -m venv venv && . venv/bin/activate && \
pip3 install pytest umbridge
-
name: Validate output
run: |
. venv/bin/activate && \
cd models/l2-sea/ && \
python3 test_output.py http://localhost:4242
2 changes: 1 addition & 1 deletion models/gs2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ApplyHessian | False

Config | Type | Default | Description
---|---|---|---
None | | |
ranks |int |4 |MPI ranks to run the model

## Mount directories
Mount directory | Purpose
Expand Down
4 changes: 2 additions & 2 deletions models/gs2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def __call__(self, parameters, config):
print(line.rstrip()) # FileInput redirects stdout to file

# Run the model
mpirank = config.get("ranks", 32)
os.system(f"mpirun -np {mpirank} /usr/gs2/bin/gs2 {input_file}")
mpirank = config.get("ranks", 4)
os.system(f"mpirun -n {mpirank} /usr/gs2/bin/gs2 {input_file}")

# Read results using Pyrokinetics package and print output
gs2_input = input_file
Expand Down

0 comments on commit 180bbe2

Please sign in to comment.