Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] [bug/fix] correction of a small bug in conf file parsing
From: Piotr Lesnicki (piotr.lesnicki_at_[hidden])
Date: 2013-05-30 11:30:25


Hi,

The parser of key/value configuration files (like
'openmpi-mca-params.conf') has some small bugs:

- a parsing error occurs when there is no new line at the end of the
   file (and the error shows while reading the next conf file)
- error messages display wrong line numbers
- error messages show nothing meaninful when a new line replaces an
   expected token

I attached a patch of the lex production rules of the keyval
parser to correct this.

# steps to reproduce (all versions):
$ cp $OPAL_PREFIX/etc/openmpi-mca-params.conf .
$ (head -n -1 openmpi-mca-params.conf ; tail -n1 openmpi-mca-params.conf
| tr -d '\n') > params.conf
$ export OMPI_MCA_mca_param_files=$PWD/params.conf
$ mpicc -v
[berlin73:00360] keyval parser: error 1 reading file
/home_nfs/lesnickp/tmp/params.conf at line 160:
   #
[berlin73:00360] keyval parser: error 1 reading file
/home_nfs/lesnickp/local/openmpi-1.6.3/share/openmpi/mpicc-wrapper-data.txt
at line 1:
   # There can be multiple blocks of configuration data, chosen by
[...]

-- 
Piotr LESNICKI