--- myst: substitutions: include: python: "bi_fun_mpi_py.md" cpp: "bi_fun_mpi_cpp.md" --- # Macro "**reoptimizeZoneBiFunMpi.{{extension}}**" ## Objective The objective of the macro is to give another example of a two level parallelism program using MPI paradigm. In the former example MPI function call is implicit using Uranie facilities. In this one, explicit calls to MPI functions is done. It's presented to illustrate the case when the user evaluation fonction is an MPI function. It takes the former example of zoning problem and adapts it. The intermediate level does not use a `TLauncher2` to run all different arrangements, but encodes it. Each Mpi ressources evaluates different possible arrangements keeping its best one, and Mpi reduce these results to the final result. ````{only} py ```{warning} To be run, the code need the mpi4py python module to be installed. This dependancy is not tested when Uranie is installed ``` ```` ## Macro {{uranie}} The low level evaluation function is the same than in previous example and is not shown again. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/reoptimizer/use_cases/" + language + "/reoptimizeZoneBiFunMpi." + extension + "\n" + ":language: " + language + "\n" + "```" }} {{ "```{include} " + include[language] + "\n" + "```" }}