I think there are a few things going on here causing problems.

1. The pre-commit hooks aren't being installed correctly. i think this is due 
to some directory permission error. The '/.cache' directory appears to not have 
the right permissions here. Perhaps this you did something here with sudo? You 
can recreate this error using "/util/pre-commit-install.sh". Either way it 
isn't necessary that these hooks are installed. If this step fails gem5 should 
still work.

2. The "error not "build' dir found on target path": I'm pretty sure you either 
didn't execute the this in the root of the gem5 directory or you made a typo 
when typing the scons command. The "-j16" at the end of that command makes me 
believe there was some kind of error with passing the `-j` flag and specifying 
the build path.

3. The "procesor" argument has been renamed to "generator" for the test board. 
I believe this is easily fixed. All you need to do is change 
https://github.com/gem5bootcamp/gem5-bootcamp-env/blob/1afde18b5c4240736507a68fd2e54351be31f30d/materials/using-gem5/04-cache-models/simple_cache_run.py#L98
 to `generator=generator,`. 

It should be noted that the 2022 gem5 was build with v22.0 of gem5. If you're 
following the Bootcamp we strongly advise using v22.0 of gem5. There have been 
numerous codebase updates over the past year and we can't guarantee all of the 
tutorials will work as intended with the latest version.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616
 
web: https://www.bobbybruce.net

> On Jul 23, 2023, at 7:00 AM, Beser, Nicholas D. via gem5-users 
> <gem5-users@gem5.org> wrote:
> 
> I had been running version 22, and I had also run the bootcamp 2022 example 
> for demonstrating MESI_Two_Level protocol. After I upgraded to version 
> 23.0.0.1, I first noticed that I had trouble compiling the example. After 
> finding a work around, to generate gem5.opt, The program seems to be missing 
> the parameter processor (which was not needed when I ran version 22. I can 
> use some suggestions on how to run this example with the new version (What 
> has changed?
>  
> The example where it worked in version 22, but not in version 23:
>  
> scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL 
> PROTOCOL=MESI_Two_Level –j16
>  
> The program gave me an error: 
>  
> scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL 
> PROTOCOL=MESI_Two_Level –j16
> scons: Reading SConscript files ...
>  
> You're missing the pre-commit/commit-msg hooks. These hook help to ensure your
> code follows gem5's style rules on git commit and your commit messages follow
> our commit message requirements. This script will now install these hooks in
> your .git/hooks/ directory.
> Press enter to continue, or ctrl-c to abort:
> An unexpected error has occurred: PermissionError: [Errno 13] Permission 
> denied: '/.cache'
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/error_handler.py", 
> line 73, in error_handler
>     yield
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/main.py", line 367, 
> in main
>     store = Store()
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/store.py", line 71, 
> in __init__
>     os.makedirs(self.directory, exist_ok=True)
>   File "/usr/lib/python3.8/os.py", line 213, in makedirs
>     makedirs(head, exist_ok=exist_ok)
>   File "/usr/lib/python3.8/os.py", line 223, in makedirs
>     mkdir(name, mode)
> PermissionError: [Errno 13] Permission denied: '/.cache'
>  
> During handling of the above exception, another exception occurred:
>  
> Traceback (most recent call last):
>   File "/usr/local/bin/pre-commit", line 8, in <module>
>     sys.exit(main())
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/main.py", line 433, 
> in main
>     raise AssertionError(
>   File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
>     self.gen.throw(type, value, traceback)
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/error_handler.py", 
> line 81, in error_handler
>     _log_and_exit(msg, ret_code, e, traceback.format_exc())
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/error_handler.py", 
> line 31, in _log_and_exit
>     storedir = Store().directory
>   File "/usr/local/lib/python3.8/dist-packages/pre_commit/store.py", line 71, 
> in __init__
>     os.makedirs(self.directory, exist_ok=True)
>   File "/usr/lib/python3.8/os.py", line 213, in makedirs
>     makedirs(head, exist_ok=exist_ok)
>   File "/usr/lib/python3.8/os.py", line 223, in makedirs
>     mkdir(name, mode)
> PermissionError: [Errno 13] Permission denied: '/.cache'
> It is strongly recommended you install the pre-commit hooks before working 
> with gem5. Do you want to continue compilation (y/n)?
> y
> Error: No non-leaf 'build' dir found on target path. 
> /home/nbeser1/gem5-bootcamp-env/gem5/–j16
>  
> However if I run the following:
>  
> python3 `which scons` build/NULL_MESI_Two_Level/gem5.opt --default=NULL 
> PROTOCOL=MESI_Two_Level -j16
>  
> The program generates gem5.opt
>  
> Unfortunately, I also get the following error when I try to run gem5.opt:
>  
>  
> ./gem5/build/NULL_MESI_Two_Level/gem5.opt 
> materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB
> gem5 Simulator System.  https://www.gem5.org <https://www.gem5.org/>
> gem5 is copyrighted software; use the --copyright option for details.
>  
> gem5 version 23.0.0.1
> gem5 compiled Jul 23 2023 13:29:06
> gem5 started Jul 23 2023 13:34:05
> gem5 executing on d8fae668e22d, pid 42880
> command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt 
> materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB
>  
> TypeError: __init__() got an unexpected keyword argument 'processor'
>  
> At:
>   materials/using-gem5/04-cache-models/simple_cache_run.py(96): <module>
>   src/python/m5/main.py(629): main
>  
>  
>  
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org <mailto:gem5-users@gem5.org>
> To unsubscribe send an email to gem5-users-le...@gem5.org 
> <mailto:gem5-users-le...@gem5.org>
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to