diff --git a/Documentation/source/site-specific-config.rst b/Documentation/source/site-specific-config.rst index c6363f21..0fd0f840 100644 --- a/Documentation/source/site-specific-config.rst +++ b/Documentation/source/site-specific-config.rst @@ -148,6 +148,18 @@ rsync, ar, ...). tool_box = ToolBox() default_c_compiler = tool_box.get_tool(Category.C_COMPILER) +There is special handling for compilers and linkers: the build +configuration stores the information if an MPI and/or OpenMP build +is requested. So when a default tool is requested by the ToolBox +from the ToolRepository (i.e. when the user has not added specific +compilers or linkers), this information is taken into account, and +only a compiler that will fulfil the requirements is returned. For +example, if you have `gfortran` and `mpif90-gfortran` defined in this +order in the ToolRepository, and request the default compiler for an +MPI build, the `mpif90-gfortran` instance is returned, not `gfortran`. +On the other hand, if no MPI is requested, an MPI-enabled compiler +might be returned, which does not affect the final result, since +an MPI compiler just adds include- and library-paths. TODO ==== diff --git a/source/fab/build_config.py b/source/fab/build_config.py index ca894bff..c98c8d9b 100644 --- a/source/fab/build_config.py +++ b/source/fab/build_config.py @@ -56,9 +56,13 @@ def __init__(self, project_label: str, created from this name, with spaces replaced by underscores. :param tool_box: The ToolBox with all tools to use in the build. :param mpi: whether the project uses MPI or not. This is used to - pick a default compiler (if not explicitly set in the ToolBox), - and controls PSyclone parameters. - :param openmp: whether the project should use OpenMP or not. + pick a default compiler (if none is explicitly set in the + ToolBox), and controls PSyclone parameters. + :param openmp: as with `mpi`, this controls whether the project is + using OpenMP or not. This is used to pick a default compiler + (if none is explicitly set in the ToolBox). The compiler-specific + flag to enable OpenMP will automatically be added when compiling + and linking. :param multiprocessing: An option to disable multiprocessing to aid debugging. :param n_procs: