Skip to content

mergeConfdb2.py Update, master branch (2022.06.02.)

Made mergeConfdb2.py fail on syntax errors. Instead of swallowing errors coming from the input files, the code will now fail on them. Printing (hopefully) useful information about the failure along the way.

In the example that @ncalace exposed me to, this update make the build from silently (not) failing with:

...
[100%] Built /data/hdd-4tb/projects/Acts-Noemi/build/x86_64-centos7-gcc11-opt/lib/WorkDir.confdb2
mergeConfdb2: Could not use file "/data/hdd-4tb/projects/Acts-Noemi/build/Tracking/Acts/ActsTrkTools/ActsTrkSeedingTool/genConf/ActsTrkSeedingTool.confdb2_part"
[100%] Built target WorkDirConfdb2Merge
[bash][atlas]:build >

to explicitly failing with:

...
[100%] Built /data/hdd-4tb/projects/Acts-Noemi/build/x86_64-centos7-gcc11-opt/lib/WorkDir.confdb2
Traceback (most recent call last):
  File "/data/hdd-4tb/projects/externals/atlasexternals/Build/AtlasCMake/modules/scripts/mergeConfdb2.py", line 76, in <module>
    sys.exit( main() )
  File "/data/hdd-4tb/projects/externals/atlasexternals/Build/AtlasCMake/modules/scripts/mergeConfdb2.py", line 63, in main
    output.update( eval( content ) )
  File "<string>", line 40
    'deltaZMax': ('float', inf.0, '''maximum distance in z between two measurements within one seed [ActsTrk::SeedingTool]'''),
                              ^
SyntaxError: invalid syntax
make[3]: *** [x86_64-centos7-gcc11-opt/lib/WorkDir.confdb2] Error 1
make[3]: *** Deleting file `x86_64-centos7-gcc11-opt/lib/WorkDir.confdb2'
make[2]: *** [CMakeFiles/WorkDirConfdb2Merge.dir/all] Error 2
make[1]: *** [CMakeFiles/WorkDirConfdb2Merge.dir/rule] Error 2
make: *** [WorkDirConfdb2Merge] Error 2
[bash][atlas]:build >

Which right away points at what the underlying problem is. 😉 Though I was surprised myself as well that infinity default values for tool properties can not be used. 🤔 Good to know...

@ncalace, you'll need to remove all instances of std::numeric_limits< float >::infinity() from your branch, as those seem to be the reason for this build failure.

Pinging @wlampl and @fwinkl.

P.S. The default printout from the merge script is not perfect. It would be good if the file being evaluated could be mentioned in the failure message. 🤔 But on first order I thought this would be better than nothing. But if any of you have suggestions on how to make the failure message nicer, I'm all ears.

Merge request reports