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

added ability for Generator to filter for MPI version

parent 00ff72f7
Branches
No related tags found
1 merge request!5more work on infrastructure III
......@@ -42,7 +42,7 @@ class GeneratorManager:
return case_name + "-" + str(num).zfill(digits_to_use) + suffix
def generate(self, outpath, filterlist_=None, print_progress_bar=True, overwrite=True, generate_full_set=False,
try_compile=False):
try_compile=False, max_mpi_version=4.0):
filterlist = filterlist_
if filterlist is None:
filterlist = featurelist
......@@ -84,11 +84,14 @@ class GeneratorManager:
case_name = result_error.get_short_descr()
fname = self.get_filename(case_name)
full_name = os.path.join(outpath, fname)
if not float(result_error.get_version()) > float(max_mpi_version):
if not overwrite and os.path.isfile(full_name):
assert False and "File Already exists"
with open(full_name, "w") as text_file:
text_file.write(str(result_error))
++cases_generated
if try_compile:
subprocess.check_call([mpicc, full_name])
......@@ -97,12 +100,13 @@ class GeneratorManager:
# ignore a corect case
pass
++cases_generated
if print_progress_bar:
progress_bar.update(1)
if print_progress_bar:
progress_bar.close()
print("Finished. Generated %i cases" % cases_generated)
pass
def discover_generators(self, path, print_discovery=True, skip_invalid=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment