Skip to content
Snippets Groups Projects
Commit bc152dc2 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

added additional level of testcases to further reduce number of cases

parent cb161b24
No related branches found
No related tags found
No related merge requests found
...@@ -9,5 +9,8 @@ featurelist = ["P2P", "COLL", "RMA", "TOOL", "other"] ...@@ -9,5 +9,8 @@ featurelist = ["P2P", "COLL", "RMA", "TOOL", "other"]
BASIC_TEST_LEVEL = 1 BASIC_TEST_LEVEL = 1
SUFFICIENT_TEST_LEVEL = 2 SUFFICIENT_TEST_LEVEL = 2
REAL_WORLD_TEST_LEVEL = 3 SUFFICIENT_REAL_WORLD_TEST_LEVEL = 3
FULL_TEST_LEVEL = 4 FULL_REAL_WORLD_TEST_LEVEL = 4
FULL_TEST_LEVEL = 5
REAL_WORLD_FILTERING_LEVELS = [SUFFICIENT_REAL_WORLD_TEST_LEVEL, FULL_REAL_WORLD_TEST_LEVEL]
...@@ -147,7 +147,7 @@ class DtypeMissmatch(ErrorGenerator): ...@@ -147,7 +147,7 @@ class DtypeMissmatch(ErrorGenerator):
important_recvs.append((type, recv_func, comm)) important_recvs.append((type, recv_func, comm))
# filter to only important ones # filter to only important ones
if generate_level == REAL_WORLD_TEST_LEVEL: if generate_level in REAL_WORLD_FILTERING_LEVELS:
important_sends = [(t, f, c) for (t, f, c) in important_sends if important_sends = [(t, f, c) for (t, f, c) in important_sends if
is_combination_important(real_world_score_table, f, is_combination_important(real_world_score_table, f,
datatype=t.lower(), datatype=t.lower(),
...@@ -157,11 +157,27 @@ class DtypeMissmatch(ErrorGenerator): ...@@ -157,11 +157,27 @@ class DtypeMissmatch(ErrorGenerator):
datatype=t.lower(), datatype=t.lower(),
communicator=c)] communicator=c)]
#TODO send type A and recv Type B vs send Type B and recv Type A may lead to unnecessary duplicates
# all possible combinations # all possible combinations
combinations_to_use = [(s, r) for s in important_sends for r in important_recvs if combinations_to_use = [(s, r) for s in important_sends for r in important_recvs if
is_combination_compatible(s, r)] is_combination_compatible(s, r)]
if generate_level == SUFFICIENT_REAL_WORLD_TEST_LEVEL:
# include every important case once
# but not all possible missmatches
combinations_to_use = []
for r in important_recvs:
for s in important_sends:
if is_combination_compatible(s, r):
combinations_to_use.append((s, r))
break
# If there are still s values left, pair them with any r
for s in important_sends:
if all(s != pair[0] for pair in combinations_to_use): # Check if s is already paired
for r in important_recvs:
if is_combination_compatible(s, r):
combinations_to_use.append((s, r))
break
# "re-format" # "re-format"
combinations_to_use = [(t1, t2, s, r, c) for (t1, s, c), (t2, r, _) in combinations_to_use] combinations_to_use = [(t1, t2, s, r, c) for (t1, s, c), (t2, r, _) in combinations_to_use]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment