Skip to content

Commit

Permalink
stop using move_results #117 [ci-skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierCladellas committed Dec 5, 2024
1 parent 4f13a49 commit 659eb99
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
name: Set HPC systems matrix
run: |
source .venv/bin/activate
matrix=$(hpc-dispatch -mcp ./tmp/machines_config.json -mod ./tmp/machines/ -bcp ./tmp/benchmark_config.json -pcp ./tmp/plots.json -mv ./tmp/results)
matrix=$(hpc-dispatch -mcp ./tmp/machines_config.json -mod ./tmp/machines/ -bcp ./tmp/benchmark_config.json -pcp ./tmp/plots.json)
echo $matrix
echo "matrix={ include : $matrix }" >> $GITHUB_OUTPUT
- name: pull_images
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{matrix.machine}}
path: ./tmp/results/
path: ${{matrix.reports_path}}

results:
runs-on: self-ubuntu-22.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ export MODULEPATH=/opt/software/modulefiles
matrix_config=""
benchmark_config=""
plots_config=""
move_results=""

while true; do
case "$1" in
--matrix-config ) matrix_config="$2"; shift 2 ;;
--benchmark-config ) benchmark_config="$2"; shift 2 ;;
--plots-config ) plots_config="$2"; shift 2 ;;
--move-results ) move_results="$2"; shift 2 ;;
-- ) shift; break ;;
* ) break ;;
esac
Expand All @@ -35,15 +33,10 @@ source .venv/bin/activate


.venv/bin/python3.9 -m pip install --upgrade pip

echo "Python executable: $(which python3.9)"
echo "Pip executable: $(which pip)"

.venv/bin/python3.9 -m pip install -I -r requirements.txt

execute-benchmark \
-mc $matrix_config \
-bc $benchmark_config \
-pc $plots_config \
--move-results $move_results \
-v
3 changes: 0 additions & 3 deletions src/feelpp/benchmarking/reframe/config/machineConfigs/gaya.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
matrix_config=""
benchmark_config=""
plots_config=""
move_results=""

while true; do
case "$1" in
--matrix-config ) matrix_config="$2"; shift 2 ;;
--benchmark-config ) benchmark_config="$2"; shift 2 ;;
--plots-config ) plots_config="$2"; shift 2 ;;
--move-results ) move_results="$2"; shift 2 ;;
-- ) shift; break ;;
* ) break ;;
esac
Expand All @@ -33,5 +31,4 @@ execute-benchmark \
-mc $matrix_config \
-bc $benchmark_config \
-pc $plots_config \
--move-results $move_results \
-v
10 changes: 4 additions & 6 deletions src/feelpp/benchmarking/scripts/hpcSystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ def toDict(self):

def writeConfig(self,output_dir,machine_data):
self.machine_cfg = os.path.join(output_dir,f"{self.machine}.json")
self.reports_path = os.path.expandvars(machine_data["reports_base_dir"])
with open(self.machine_cfg,"w") as f:
json.dump(machine_data,f)

def createSumbitCommand(self, benchmark_config_path, plots_config_path, move_results):
def createSumbitCommand(self, benchmark_config_path, plots_config_path):
assert hasattr(self,"machine_cfg") and self.machine_cfg, "machine config path has not been set"

self.submit_command = SubmissionCommandFactory.create(self.submit,self.machine,[
f"--matrix-config {self.machine_cfg} ",
f"--benchmark-config {benchmark_config_path} ",
f"--plots-config {plots_config_path} ",
f"--move-results {move_results}"
f"--plots-config {plots_config_path} "
])


Expand Down Expand Up @@ -87,7 +87,6 @@ def hpcSystemDispatcher_cli():
parser.add_argument("--benchmark_config_path", "-bcp", required=True, type=str, help="path to the benchmark config json")
parser.add_argument("--plots_config_path", "-pcp", required=True, type=str, help="path to the plots config json")
parser.add_argument("--machine_output_dir", "-mod", required=True, type=str, help="path to folder where individual machine configs should be stored")
parser.add_argument("--move_results", "-mv", required=True, type=str, help="path to move the results to")
args = parser.parse_args()

if not os.path.exists(args.machine_output_dir):
Expand All @@ -103,8 +102,7 @@ def hpcSystemDispatcher_cli():
hpc_system.writeConfig(args.machine_output_dir,machine_data)
hpc_system.createSumbitCommand(
args.benchmark_config_path,
args.plots_config_path,
args.move_results
args.plots_config_path
)
matrix.append(hpc_system.toDict())

Expand Down

0 comments on commit 659eb99

Please sign in to comment.