From 26561223419ffa4c50bf07a3486201f80e9c8214 Mon Sep 17 00:00:00 2001 From: Tim Jammer <tim.jammer@tu-darmstadt.de> Date: Thu, 2 May 2024 13:02:28 +0200 Subject: [PATCH] update rma cases to work with infrastructure --- scripts/errors/rma/EpochLifeCycle.py | 3 ++- scripts/errors/rma/GlobalConcurrency.py | 2 ++ scripts/errors/rma/InvalidBuffer.py | 3 ++- scripts/errors/rma/InvalidDataType.py | 3 ++- scripts/errors/rma/InvalidRank.py | 3 ++- scripts/errors/rma/InvalidWin.py | 5 +++-- scripts/errors/rma/LocalConcurrency.py | 2 ++ 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/errors/rma/EpochLifeCycle.py b/scripts/errors/rma/EpochLifeCycle.py index 789913e7b..8b390c557 100644 --- a/scripts/errors/rma/EpochLifeCycle.py +++ b/scripts/errors/rma/EpochLifeCycle.py @@ -1,4 +1,5 @@ #! /usr/bin/python3 +from __future__ import annotations from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator @@ -18,7 +19,7 @@ class EpochLifeCycleRMA(ErrorGenerator): def get_feature(self): return ["RMA"] - def generate(self, generate_level): + def generate(self, generate_level, real_world_score_table): for sync_mode in ["fence", "winlockall", "winlock"]: for rma_func in ["mpi_get", "mpi_put", "mpi_accumulate"]: # epoch is not closed diff --git a/scripts/errors/rma/GlobalConcurrency.py b/scripts/errors/rma/GlobalConcurrency.py index dd4a39f7e..94d48d470 100644 --- a/scripts/errors/rma/GlobalConcurrency.py +++ b/scripts/errors/rma/GlobalConcurrency.py @@ -1,4 +1,6 @@ #! /usr/bin/python3 +from __future__ import annotations + from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator diff --git a/scripts/errors/rma/InvalidBuffer.py b/scripts/errors/rma/InvalidBuffer.py index 77ff11dae..c97a25315 100644 --- a/scripts/errors/rma/InvalidBuffer.py +++ b/scripts/errors/rma/InvalidBuffer.py @@ -1,4 +1,5 @@ #! /usr/bin/python3 +from __future__ import annotations from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator @@ -16,7 +17,7 @@ class InvalidBufferErrorRMA(ErrorGenerator): def get_feature(self): return ["RMA"] - def generate(self, generate_level): + def generate(self, generate_level, real_world_score_table): rma_funcs = ["mpi_get", "mpi_rget", "mpi_put", "mpi_rput", "mpi_accumulate", "mpi_raccumulate", "mpi_get_accumulate", "mpi_rget_accumulate", "mpi_fetch_and_op", "mpi_compare_and_swap"] diff --git a/scripts/errors/rma/InvalidDataType.py b/scripts/errors/rma/InvalidDataType.py index 7d53f364b..d8496e755 100644 --- a/scripts/errors/rma/InvalidDataType.py +++ b/scripts/errors/rma/InvalidDataType.py @@ -1,4 +1,5 @@ #! /usr/bin/python3 +from __future__ import annotations from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator @@ -15,7 +16,7 @@ class InvalidDatatypeErrorRMA(ErrorGenerator): def get_feature(self): return ["RMA"] - def generate(self, generate_level): + def generate(self, generate_level, real_world_score_table): rma_funcs = [] if generate_level <= BASIC_TEST_LEVEL: rma_funcs = ["mpi_get", "mpi_put", "mpi_accumulate"] diff --git a/scripts/errors/rma/InvalidRank.py b/scripts/errors/rma/InvalidRank.py index 4ffe6e10d..6890552be 100644 --- a/scripts/errors/rma/InvalidRank.py +++ b/scripts/errors/rma/InvalidRank.py @@ -1,4 +1,5 @@ #! /usr/bin/python3 +from __future__ import annotations from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator @@ -17,7 +18,7 @@ class InvalidRankErrorRMA(ErrorGenerator): def get_feature(self): return ["RMA"] - def generate(self, generate_level): + def generate(self, generate_level, real_world_score_table): rma_funcs = [] if generate_level <= BASIC_TEST_LEVEL: rma_funcs = ["mpi_get", "mpi_put", "mpi_accumulate"] diff --git a/scripts/errors/rma/InvalidWin.py b/scripts/errors/rma/InvalidWin.py index d7a725f42..b520ca0cc 100644 --- a/scripts/errors/rma/InvalidWin.py +++ b/scripts/errors/rma/InvalidWin.py @@ -1,4 +1,5 @@ #! /usr/bin/python3 +from __future__ import annotations from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator @@ -17,7 +18,7 @@ class InvalidWinErrorRMA(ErrorGenerator): def get_feature(self): return ["RMA"] - def generate(self, generate_level): + def generate(self, generate_level, real_world_score_table): tm = get_rma_template() tm.remove_instruction("RMA_WIN_ALLOC") # remove window allocation # opening epoch on non-initialized window is the actual error @@ -28,7 +29,7 @@ class InvalidWinErrorRMA(ErrorGenerator): # free window too early tm = get_rma_template() - win_free_early = Instruction(f"MPI_Win_free(&{CorrectParameterFactory().get("win")});") + win_free_early = Instruction(f"MPI_Win_free(&{CorrectParameterFactory().get('win')});") win_free_early.set_has_error() tm.insert_instruction(new_instruction=win_free_early, before_instruction="STARTRMAEPOCH") diff --git a/scripts/errors/rma/LocalConcurrency.py b/scripts/errors/rma/LocalConcurrency.py index 606a7c9fb..4ba1bf025 100644 --- a/scripts/errors/rma/LocalConcurrency.py +++ b/scripts/errors/rma/LocalConcurrency.py @@ -1,4 +1,6 @@ #! /usr/bin/python3 +from __future__ import annotations + from scripts.Infrastructure.Variables import * from scripts.Infrastructure.ErrorGenerator import ErrorGenerator -- GitLab