diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2baee8dd..5c2a8d16 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -90,7 +90,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) + matrix=$(hpc-dispatch -mcp ./tmp/machines_config.json -mod ./tmp/machines/) echo $matrix echo "matrix={ include : $matrix }" >> $GITHUB_OUTPUT - name: pull_images @@ -131,8 +131,16 @@ jobs: with: name: config-artifacts path: ./tmp/ - - name: Execute benchmarks + - name: Setup machine and env run: ${{matrix.submit_command}} + - name: Execute benchmarks + run: | + source .venv/bin/activate + execute-benchmark \ + -mc ./tmp/machines/${{matrix.machine}} \ + -bc ./tmp/benchmark_config.json \ + -pc ./tmp/plots.json \ + -v - name: Upload reframe report uses: actions/upload-artifact@v4 with: diff --git a/src/feelpp/benchmarking/reframe/config/machineConfigs/discoverer.sh b/src/feelpp/benchmarking/reframe/config/machineConfigs/discoverer.sh index 96b54f9e..c4f82a90 100755 --- a/src/feelpp/benchmarking/reframe/config/machineConfigs/discoverer.sh +++ b/src/feelpp/benchmarking/reframe/config/machineConfigs/discoverer.sh @@ -12,31 +12,8 @@ lfs quota -g $discoverer_project_id /discofs lfs quota -g $discoverer_project_id /disco2fs echo "===============================================" -matrix_config="" -benchmark_config="" -plots_config="" - -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 ;; - -- ) shift; break ;; - * ) break ;; - esac -done - - /opt/software/python/3.9.7/bin/python3 -m venv .venv source .venv/bin/activate - - .venv/bin/python3.9 -m pip install --upgrade pip .venv/bin/python3.9 -m pip install -I -r requirements.txt - -execute-benchmark \ - -mc $matrix_config \ - -bc $benchmark_config \ - -pc $plots_config \ - -v \ No newline at end of file diff --git a/src/feelpp/benchmarking/reframe/config/machineConfigs/gaya.sh b/src/feelpp/benchmarking/reframe/config/machineConfigs/gaya.sh index a0d4f16d..da89d9be 100755 --- a/src/feelpp/benchmarking/reframe/config/machineConfigs/gaya.sh +++ b/src/feelpp/benchmarking/reframe/config/machineConfigs/gaya.sh @@ -1,27 +1,6 @@ #!/bin/bash -l -matrix_config="" -benchmark_config="" -plots_config="" - -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 ;; - -- ) shift; break ;; - * ) break ;; - esac -done - - python3 -m venv .venv source .venv/bin/activate python3 -m pip install --upgrade pip -python3 -m pip install -r requirements.txt - -execute-benchmark \ - -mc $matrix_config \ - -bc $benchmark_config \ - -pc $plots_config \ - -v \ No newline at end of file +python3 -m pip install -r requirements.txt \ No newline at end of file diff --git a/src/feelpp/benchmarking/scripts/hpcSystems.py b/src/feelpp/benchmarking/scripts/hpcSystems.py index 2bfa859e..0020d14e 100644 --- a/src/feelpp/benchmarking/scripts/hpcSystems.py +++ b/src/feelpp/benchmarking/scripts/hpcSystems.py @@ -35,14 +35,10 @@ def writeConfig(self,output_dir,machine_data): with open(self.machine_cfg,"w") as f: json.dump(machine_data,f) - def createSumbitCommand(self, benchmark_config_path, plots_config_path): + def createSumbitCommand(self): 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} " - ]) + self.submit_command = SubmissionCommandFactory.create(self.submit,self.machine) class HpcSystemFactory: @@ -84,8 +80,6 @@ def create(submit,machine,options): def hpcSystemDispatcher_cli(): parser = ArgumentParser() parser.add_argument("--machine_config_path", "-mcp", required=True, type=str, help="path to the machines config json") - 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") args = parser.parse_args() @@ -100,10 +94,7 @@ def hpcSystemDispatcher_cli(): for machine_data in machines: hpc_system = HpcSystemFactory().dispatch(machine_data["machine"]) hpc_system.writeConfig(args.machine_output_dir,machine_data) - hpc_system.createSumbitCommand( - args.benchmark_config_path, - args.plots_config_path - ) + hpc_system.createSumbitCommand() matrix.append(hpc_system.toDict())