Skip to content

Commit 0dbef83

Browse files
committed
modifications on the flag use
1 parent 14706c2 commit 0dbef83

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

toolchain/mfc/test/case.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +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 []
138-
139137

140138
if self.params.get("bubbles_lagrange", 'F') == 'T':
141139
input_bubbles_lagrange(self)
@@ -146,7 +144,7 @@ def run(self, targets: List[Union[str, MFCTarget]], gpus: Set[int]) -> subproces
146144

147145
command = [
148146
mfc_script, "run", filepath, "--no-build", *tasks, *case_optimization,
149-
*jobs, "-t", *target_names, *gpus_select, *rdma_mpi_args, *ARG("--")
147+
*jobs, "-t", *target_names, *gpus_select, *ARG("--")
150148
]
151149

152150
return common.system(command, print_cmd=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

toolchain/mfc/test/cases.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from mfc import common
55
from .case import Nt, define_case_d, define_case_f, CaseGeneratorStack, TestCaseBuilder
6+
from ..state import ARG
67

78
def get_bc_mods(bc: int, dimInfo):
89
params = {}
@@ -320,9 +321,10 @@ def alter_3d():
320321
def alter_ppn(dimInfo):
321322
if len(dimInfo[0]) == 3:
322323
cases.append(define_case_d(stack, '2 MPI Ranks', {'m': 29, 'n': 29, 'p': 49}, ppn=2))
324+
cases.append(define_case_d(stack, '2 MPI Ranks -> RDMA MPI', {'m': 29, 'n': 29, 'p': 49, 'rdma_mpi': 'T'}, ppn=2))
323325
else:
324326
cases.append(define_case_d(stack, '2 MPI Ranks', {}, ppn=2))
325-
327+
cases.append(define_case_d(stack, '2 MPI Ranks -> RDMA MPI', {'rdma_mpi': 'T'}, ppn=2))
326328

327329
def alter_ib(dimInfo, six_eqn_model=False):
328330
for slip in [True, False]:

toolchain/mfc/test/test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def __filter(cases_) -> typing.List[TestCase]:
5656
if case.ppn > 1 and not ARG("mpi"):
5757
cases.remove(case)
5858
skipped_cases.append(case)
59-
59+
60+
for case in cases[:]:
61+
if "RDMA MPI" in case.trace and not ARG("rdma_mpi"):
62+
cases.remove(case)
63+
skipped_cases.append(case)
64+
6065
for case in cases[:]:
6166
if ARG("single"):
6267
skip = ['low_Mach', 'Hypoelasticity', 'teno', 'Chemistry', 'Phase Change model 6'
@@ -184,10 +189,7 @@ def _handle_case(case: TestCase, devices: typing.Set[int]):
184189
cons.print(f" [bold magenta]{case.get_uuid()}[/bold magenta] SKIP {case.trace}")
185190
return
186191

187-
if ARG("rdma_mpi"):
188-
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices, rdma_mpi=True)
189-
else:
190-
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices)
192+
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices)
191193
out_filepath = os.path.join(case.get_dirpath(), "out_pre_sim.txt")
192194

193195
common.file_write(out_filepath, cmd.stdout)

0 commit comments

Comments
 (0)