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

Initial import of specfem workload plugin #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions old/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class objectview(object):
def __init__(self, d):
self.__dict__ = d

def set_artifacts_dir():
global ARTIFACTS_DIR

if sys.stdout.isatty():
base_dir = Path("/tmp") / ("ci-artifacts_" + datetime.datetime.today().strftime("%Y%m%d"))
base_dir.mkdir(exist_ok=True)
current_length = len(list(base_dir.glob("*__*")))
ARTIFACTS_DIR = base_dir / f"{current_length:03d}__benchmarking__run_specfem"
ARTIFACTS_DIR.mkdir(exist_ok=True)
else:
ARTIFACTS_DIR = Path(os.getcwd())

print(f"Saving artifacts files into {ARTIFACTS_DIR}")

global ARTIFACTS_SRC
ARTIFACTS_SRC = ARTIFACTS_DIR / "src"
ARTIFACTS_SRC.mkdir(exist_ok=True)

def prepare_settings():
settings = {}
for arg in sys.argv[1:]:
k, _, v = arg.partition("=")
settings[k] = v

return settings
64 changes: 64 additions & 0 deletions old/matrix_view/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from ui.table_stats import TableStats

import plugins.adaptive.matrix_view
from plugins.adaptive.matrix_view import parse_data, all_records, get_record

from . import perf

def rewrite_properties(params_dict):
if "mpi-slots" not in params_dict:
params_dict["mpi-slots"] = "999"

NB_CORE_ON_MACHINES = 8

machines = int(int(params_dict["processes"]) / int(params_dict["mpi-slots"]))
if machines * int(params_dict["mpi-slots"]) != int(params_dict["processes"]):
machines += 1
params_dict["machines"] = str(machines)

if "network" in params_dict:
network = params_dict["network"]
del params_dict["network"]
if network != "default":
params_dict["platform"] += f"_{network}"
else:
if params_dict["platform"] == "openshift" and network == "default":
params_dict["platform"] = "openshift_sdn"

if params_dict["platform"] == "podman":
params_dict["platform"] = "baremetal_podman"

del params_dict["processes"]

if "gpu" in params_dict:
if params_dict['gpu'].isdigit():
params_dict["gpu"] = f":{int(params_dict['gpu']):02d}"
else:
params_dict['gpu'] = ":"+params_dict['gpu']

del params_dict['driver']

if "relyOnSharedFS" not in params_dict:
params_dict["relyOnSharedFS"] = "False"

params_dict["run"] = str(params_dict.get("run", 0))+"."
params_dict["@run"] = params_dict["run"]
del params_dict["run"]

params_dict["relyOnSharedFS"] = params_dict["relyOnSharedFS"].lower()


return params_dict

plugins.adaptive.matrix_view.rewrite_properties = rewrite_properties

def register():
TableStats.Average("total_time", "Total time", "?.timing",
"timing.total_time", ".0f", "in seconds, lower is better")


perf.Plot(mode="specfem", what="time")
perf.Plot(mode="specfem", what="speedup")
perf.Plot(mode="specfem", what="efficiency")
perf.Plot(mode="specfem", what="time_comparison")
perf.Plot(mode="specfem", what="strong_scaling")
Loading