Skip to content

Commit 6aac583

Browse files
author
Mohammed Said Hamed Humaid Al-Mahrouqi
committed
fixed stuff
1 parent db9d7a0 commit 6aac583

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

docs/documentation/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A test is considered passing when our error tolerances are met in order to maint
1616
- `--percent` (`%`) to specify a percentage of the test suite to select at random and test
1717
- `--max-attempts` (`-m`) the maximum number of attempts to make on a test before considering it failed
1818
- `--no-examples` skips the testing of cases in the examples folder
19-
- `--rdma-mpi` (`-r`) runs additional tests where RDMA MPI is enabled.
19+
- `--rdma-mpi` runs additional tests where RDMA MPI is enabled.
2020

2121
To specify a computer, pass the `-c` flag to `./mfc.sh run` like so:
2222
```shell

toolchain/mfc/args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def add_common_arguments(p, mask = None):
8080
test.add_argument("-a", "--test-all", action="store_true", default=False, help="Run the Post Process Tests too.")
8181
test.add_argument("-%", "--percent", type=int, default=100, help="Percentage of tests to run.")
8282
test.add_argument("-m", "--max-attempts", type=int, default=1, help="Maximum number of attempts to run a test.")
83-
test.add_argument("-r", "--rdma-mpi", action="store_true", default=False, help="Enable RDMA MPI for tests")
83+
test.add_argument( "--rdma-mpi", action="store_true", default=False, help="Run tests with RDMA MPI enabled")
8484
test.add_argument( "--no-build", action="store_true", default=False, help="(Testing) Do not rebuild MFC.")
8585
test.add_argument( "--no-examples", action="store_true", default=False, help="Do not test example cases." )
8686
test.add_argument("--case-optimization", action="store_true", default=False, help="(GPU Optimization) Compile MFC targets with some case parameters hard-coded.")

toolchain/mfc/test/case.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(self, trace: str, mods: dict, ppn: int = None, override_tol: float
124124
self.override_tol = override_tol
125125
super().__init__({**BASE_CFG.copy(), **mods})
126126

127-
def run(self, targets: List[Union[str, MFCTarget]], gpus: Set[int]) -> subprocess.CompletedProcess:
127+
def run(self, targets: List[Union[str, MFCTarget]], gpus: Set[int], rdma_mpi: bool = False) -> subprocess.CompletedProcess:
128128
if gpus is not None and len(gpus) != 0:
129129
gpus_select = ["--gpus"] + [str(_) for _ in gpus]
130130
else:
@@ -134,7 +134,6 @@ def run(self, targets: List[Union[str, MFCTarget]], gpus: Set[int]) -> subproces
134134
tasks = ["-n", str(self.ppn)]
135135
jobs = ["-j", str(ARG("jobs"))] if ARG("case_optimization") else []
136136
case_optimization = ["--case-optimization"] if ARG("case_optimization") else []
137-
rdma_mpi_args = ["--rdma-mpi"] if ARG("rdma_mpi") else []
138137

139138
if self.params.get("bubbles_lagrange", 'F') == 'T':
140139
input_bubbles_lagrange(self)
@@ -145,9 +144,9 @@ def run(self, targets: List[Union[str, MFCTarget]], gpus: Set[int]) -> subproces
145144

146145
command = [
147146
mfc_script, "run", filepath, "--no-build", *tasks, *case_optimization,
148-
*jobs, "-t", *target_names, *gpus_select, *rdma_mpi_args, *ARG("--")
147+
*jobs, "-t", *target_names, *gpus_select, *ARG("--")
149148
]
150-
149+
151150
return common.system(command, print_cmd=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
152151

153152
def get_trace(self) -> str:

toolchain/mfc/test/test.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ def __filter(cases_) -> typing.List[TestCase]:
6969
if any(label in case.trace for label in skip):
7070
cases.remove(case)
7171

72-
for case in cases[:]:
73-
if ARG("rdma_mpi") and case.ppn <= 1:
74-
cases.remove(case)
75-
skipped_cases.append(case)
76-
7772
if ARG("no_examples"):
7873
cases = [case for case in cases if not "Example" in case.trace]
7974

@@ -189,8 +184,7 @@ def _handle_case(case: TestCase, devices: typing.Set[int]):
189184
cons.print(f" [bold magenta]{case.get_uuid()}[/bold magenta] SKIP {case.trace}")
190185
return
191186

192-
if ARG("rdma_mpi"):
193-
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices)
187+
if "RDMA MPI" in case.trace:
194188
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices, rdma_mpi=True)
195189
else:
196190
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices)

0 commit comments

Comments
 (0)