Skip to content
Snippets Groups Projects
Commit 6a1e7cc9 authored by Marcel Koch's avatar Marcel Koch
Browse files

adds option for fake mpi

parent f83a804e
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ class CodegenGlobalOptionsArray(ImmutableRecord): ...@@ -59,6 +59,7 @@ class CodegenGlobalOptionsArray(ImmutableRecord):
use_likwid = CodegenOption(default=False, helpstr="Use likwid instead of own performance measurements.") use_likwid = CodegenOption(default=False, helpstr="Use likwid instead of own performance measurements.")
use_sde = CodegenOption(default=False, helpstr="Use sde instead of own performance measurements.") use_sde = CodegenOption(default=False, helpstr="Use sde instead of own performance measurements.")
autotune_google_benchmark = CodegenOption(default=False, helpstr="Use google-benchmark library for autotuning (when autotuning is activated).") autotune_google_benchmark = CodegenOption(default=False, helpstr="Use google-benchmark library for autotuning (when autotuning is activated).")
with_mpi = CodegenOption(default=True, helpstr="The module was configured with mpi")
# Arguments that are mainly to be set by logic depending on other options # Arguments that are mainly to be set by logic depending on other options
max_vector_width = CodegenOption(default=256, helpstr=None) max_vector_width = CodegenOption(default=256, helpstr=None)
......
...@@ -212,7 +212,10 @@ def name_initree(): ...@@ -212,7 +212,10 @@ def name_initree():
@preamble(section="init") @preamble(section="init")
def define_mpihelper(name): def define_mpihelper(name):
include_file("dune/common/parallel/mpihelper.hh", filetag="driver") include_file("dune/common/parallel/mpihelper.hh", filetag="driver")
return "Dune::MPIHelper& {} = Dune::MPIHelper::instance(argc, argv);".format(name) if get_option("with_mpi"):
return "Dune::MPIHelper& {} = Dune::MPIHelper::instance(argc, argv);".format(name)
else:
return "Dune::FakeMPIHelper& {} = Dune::FakeMPIHelper::instance(argc, argv);".format(name)
def name_mpihelper(): def name_mpihelper():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment