Another fix for nevents check for MG
Description of bug
- nevents check in MG was comparing an int with a float resulting in a wrong behaviour
- the error message printed in this case was confusing since I forgot to change the prinout when I fixed this in !443 (merged)
Changes introduced
- convert everything to int when checking nevents for MG
- fix mistake in printout
Tests
Using the output from this pipeline: https://gitlab.cern.ch/atlas-physics/pmg/mcjoboptions/-/jobs/8411228
Before fix
ERROR: Increase nevents to be generated in MG from 110 to 11000
The bug here is that
- it should have succeeded since we need 110 events
- it prints out 11000 (1.1nEventsPerJob) instead of 110 (1.1nEventsRequested) (where the latter is actually used in the check that triggers the error)
After fix
The above test succeeds.
Also if I change
20:18:36 Py:MadGraphUtils INFO "nevents" = 110.0
to
20:18:36 Py:MadGraphUtils INFO "nevents" = 100.0
in the log it prints out
ERROR: Increase nevents to be generated in MG from 100 to 110
so it seems to be correct now.
Issues resolved
Closes #
Edited by Spyros Argyropoulos