There is simply not enough usable information here to be able to help you. We cannot read minds or what is on remote computers. For example, I have no idea what those two files you mention actually contain, and what particular LAMMPS version you are running on which platform and how compiled.
Please see this post for some guidelines for posting to the forum.
In lammps/src/GRANULAR/fix_granular_mdr.cpp at develop · lammps/lammps codeline 186/187 there could be a solution, when i understand the error correctly, but i have no idea what this all means because I am new to all of this and never programmed before. All of the downloads and links to the script was given me by my professor, who did not get a solution by now for my problem, because he can run this without complications.
I checked the commit history and found the following bugfix commit:
commit 39f69d8a853cb289fa768844cb9aabc4d246fdb5
Author: Axel Kohlmeyer <[email protected]>
Date: Tue Jul 7 03:28:43 2026 -0400
fix granular/mdr: get the granular neighbor history fix from the pair style
Pair style granular registers its neighbor history fix under an id with
the pair style instance number appended (since the addition of pair
style surf/granular in c18c911ea7), so the hardcoded lookup of
"NEIGH_HISTORY_GRANULAR" in FixGranularMDR::setup_pre_force() always
failed and any input using fix granular/mdr aborted at setup with
"Cannot find fix storing granular history". Take the fix pointer from
the pair style through a new get_fix_history() accessor instead,
following the existing get_size_history() idiom. Verified with a
shortened version of examples/granular/in.tableting.200.