open-mpi / ompi

Open MPI main development repository
https://www.open-mpi.org
Other
2.16k stars 859 forks source link

Deprecated MCA variable warning mistakenly quotes config file as source of issue instead of environment #12437

Open lrbison opened 7 months ago

lrbison commented 7 months ago

Background information

What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)

v5.0.2

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

From EFA Installer

Please describe the system on which you are running


Details of the problem

If there is a mca params file such as $prefix/etc/openmpi-mca-params.conf then when user sets deprecated mca parameters on the command line, the help message mistakenly blames the params file, even though the environment should be blamed:

ubuntu@ip-172-31-47-127:/fsx/lrbison$ OMPI_MCA_mca_component_show_load_errors=0 mpirun -n 1 hostname
--------------------------------------------------------------------------
A deprecated MCA variable value was specified in an MCA variable
file.  Deprecated MCA variables should be avoided; they may disappear
in future releases.

  Deprecated variable: mca_component_show_load_errors
  Source file:         /opt/amazon/openmpi5/etc/openmpi-mca-params.conf
  New variable:        mca_base_component_show_load_errors
--------------------------------------------------------------------------
ip-172-31-47-127
ubuntu@ip-172-31-47-127:/fsx/lrbison$ mpirun -n 1 hostname
ip-172-31-47-127
ubuntu@ip-172-31-47-127:/fsx/lrbison$
wenduwan commented 6 months ago

I'm gonna reproduce with source build instead of EFA installer.

wenduwan commented 6 months ago

It hit this line

lrbison commented 6 months ago

I think perhaps the easy solution is sufficient:

A deprecated MCA variable value was specified in an MCA variable
file or in the user's environment or run-time options.  Deprecated
MCA variables should be avoided; they may disappear in future
releases.

?

wenduwan commented 6 months ago

It can simplify things but I guess the separation is intended. There are different hints for param file, cli and env paramters. https://github.com/open-mpi/ompi/blob/1f87690b7d8b9ffce43c6f5dfd8f30efc156a914/opal/mca/base/help-mca-var.txt#L39-L58

So far this looks like a valid bug in the parser somewhere.