Excessive Warnings/Messages for optional module dependencies
The current CMake system dunemodules.lib
script prints a "scary" warning if an optional dependency is not found. As an example, installing dumux
with only the Dune core modules (which is a perfectly functioning setup) gives right at the beginning of dunecontrol
:
See warnings
WARNING: could not find module 'dune-uggrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-uggrid' is suggested by dune-grid
Skipping 'dune-uggrid'!
WARNING: could not find module 'dune-alugrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-alugrid' is suggested by dumux
Skipping 'dune-alugrid'!
WARNING: could not find module 'dune-foamgrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-foamgrid' is suggested by dumux
Skipping 'dune-foamgrid'!
WARNING: could not find module 'dune-uggrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-uggrid' is suggested by dumux
Skipping 'dune-uggrid'!
WARNING: could not find module 'dune-functions',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-functions' is suggested by dumux
Skipping 'dune-functions'!
WARNING: could not find module 'opm-common',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'opm-common' is suggested by dumux
Skipping 'opm-common'!
WARNING: could not find module 'opm-grid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'opm-grid' is suggested by dumux
Skipping 'opm-grid'!
WARNING: could not find module 'dune-subgrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-subgrid' is suggested by dumux
Skipping 'dune-subgrid'!
WARNING: could not find module 'dune-spgrid',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-spgrid' is suggested by dumux
Skipping 'dune-spgrid'!
WARNING: could not find module 'dune-mmesh',
module is also unknown to pkg-config.
Maybe you need to adjust PKG_CONFIG_PATH!
'dune-mmesh' is suggested by dumux
Skipping 'dune-mmesh'!
^ Edit: The above messages have been fixed in !1018 (merged). The following issues remain:
The following happened many times already: A new user installs a user module (for example dumux
). They see these warnings. They think they did something wrong. They start installing all optional dependencies. These optional dependencies often have other optional dependencies, so they end up installing 20 modules. Some of these are even outdated and they end up with a broken installation.
I personally agree with these users that this all-caps warning is definitely over the top and optional is not even mentioned there. I think from a user perspective something like
-- Optional dependency 'dune-uggrid' not found. Installing 'dune-uggrid' is optional.
Installing 'dune-uggrid' will enable the use of unstructured (parallel) grids with multiple geometry types.
For more information, visit https://dune-project.org/modules/dune-uggrid/.
The detailed message would of course require that such a help message and a documentation website is registered for a given module. As a first step
-- Optional dependency 'dune-uggrid' not found. Installing 'dune-uggrid' is optional.
would already be much nicer and may not create the same panic state of having done something wrong as the current message.
The same goes for CMake feature tests. If no module-specific feature tests have been found there is loads of scary messages that report on not having found some cmake script in that module and all the places where it searched. Not having module-specific feature tests is completely harmless and very common for user modules, so I don't think there should be any message about this.
Dune dependencies Below is an example of excessive output in a user module configure step. This recursively lists all the required and suggested Dune module dependencies. This output seems to be useful in case there is some version mismatch. In particular, also notice the scary output for opm-common although this package is completely optional (and not even used/supported by the user module, just a suggestion from an upstream package).
Dependencies for dumux-glymphatics: dumux (>= 3.5);dune-common (>= 2.8);dune-foamgrid (>= 2.8);dune-alugrid (>= 2.8);dune-subgrid (>= 2.8)
-- Dependencies for dumux: dune-common (>=2.8);dune-grid (>=2.8);dune-localfunctions (>=2.8);dune-istl (>=2.8)
-- Suggestions for dumux: dune-alugrid (>=2.8);dune-foamgrid (>=2.8);dune-uggrid (>=2.8);dune-functions (>=2.8);opm-common;opm-grid;dune-subgrid (>=2.8);dune-spgrid (>=2.8);dune-mmesh (>=1.2)
-- Dependencies for dune-foamgrid: dune-common (>= 2.8);dune-geometry (>= 2.8);dune-grid (>= 2.8)
-- Dependencies for dune-alugrid: dune-grid (>= 2.9)
-- Dependencies for dune-subgrid: dune-common;dune-geometry;dune-grid
-- Suggestions for dune-subgrid: dune-alugrid;dune-uggrid
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-localfunctions: dune-geometry (>= 2.9)
-- Dependencies for dune-istl: dune-common (>= 2.9)
-- Dependencies for dune-alugrid: dune-grid (>= 2.9)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-alugrid: dune-grid (>= 2.9)
-- Dependencies for dune-foamgrid: dune-common (>= 2.8);dune-geometry (>= 2.8);dune-grid (>= 2.8)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-functions: dune-localfunctions (>= 2.9);dune-grid (>= 2.9);dune-istl (>= 2.9);dune-typetree (>= 2.9)
-- Could NOT find opm-common (missing: opm-common_DIR)
-- No full CMake package configuration support available. Falling back to pkg-config.
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'opm-common '
-- No package 'opm-common' found
-- Could NOT find opm-grid (missing: opm-grid_DIR)
-- No full CMake package configuration support available. Falling back to pkg-config.
-- Checking for module 'opm-grid '
-- No package 'opm-grid' found
-- Dependencies for dune-subgrid: dune-common;dune-geometry;dune-grid
-- Suggestions for dune-subgrid: dune-alugrid;dune-uggrid
-- Dependencies for dune-spgrid: dune-grid (>= 2.9)
-- Could NOT find dune-mmesh (missing: dune-mmesh_DIR)
-- No full CMake package configuration support available. Falling back to pkg-config.
-- Checking for module 'dune-mmesh>=1.2'
-- No package 'dune-mmesh' found
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-alugrid: dune-grid (>= 2.9)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-localfunctions: dune-geometry (>= 2.9)
-- Dependencies for dune-istl: dune-common (>= 2.9)
-- Dependencies for dune-typetree: dune-common (>= 2.9)
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-geometry: dune-common (>= 2.9)
-- Dependencies for dune-grid: dune-geometry (>= 2.9)
-- Suggestions for dune-grid: dune-uggrid (>=2.9)
-- Dependencies for dune-uggrid: dune-common (>= 2.9)
-- Dependencies for dune-geometry: dune-common (>= 2.9)
Alberta example Lots of output from an optional package. Again, this a transitive suggestion from an upstream module (why do I need to be informed in the downstream configure step?).
-- Checking for module 'alberta-grid_1d>=3.0'
-- No package 'alberta-grid_1d' found
-- Checking for module 'alberta-grid_2d>=3.0'
-- No package 'alberta-grid_2d' found
-- Checking for module 'alberta-grid_3d>=3.0'
-- No package 'alberta-grid_3d' found
-- Could NOT find Alberta (set PKG_CONFIG_PATH to include the location of the alberta-grid_[n]d.pc files) (missing: ALBERTA_GRID_PREFIX) (Required is at least version "3.0")
-- Not enabling torture-tests
I'm thankful. But yes, alugrid is special...
Packages not found
Could NOT find ParMETIS (missing: PARMETIS_LIBRARY PARMETIS_INCLUDE_DIR)
appears four times in the mentioned user module above. That makes me want to install it. Yet it's not used in the user module at all. Isn't it enough to provide this message in the summary of optional packages not found?