Gmx grompp error: seg fault (core dumped), very long list of annealing points

GROMACS version: 2019.4
GROMACS modification: No
Hi, I am trying to run a simulation, with a long list of annealing times and temperature. The list contains 10001 (*2, because two tc groups) points for both time a temperature. With GROMACS 2019.4 version, I faced an error: segmentation fault (core dumped) for command “grompp”. With GROMACS 5.1.4, the error is:
Fatal error:
An input file contains a line longer than 4095 characters, while the buffer passed to fgets2 has size 4095. The line starts with: ‘annealing_time’.
In my .mdp file the line starting with ‘annealing_time…’ contains approx 2 lakh characters (including spaces). How can I resolve this issue? One option is to do simulation using multiple short .mdp files, but that would require approx 500 .mdp files.