gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Problems upgrading to latest version

BN
Beser, Nicholas D.
Sun, Jul 23, 2023 2:00 PM

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
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

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 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
BB
Bobby Bruce
Mon, Jul 24, 2023 6:44 PM

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-leave@gem5.org mailto:gem5-users-leave@gem5.org

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-leave@gem5.org <mailto:gem5-users-leave@gem5.org>
BN
Beser, Nicholas D.
Tue, Jul 25, 2023 12:31 AM

Bobby,

You suggestion (number 3) worked, and I was able to run the compiled gem5.opt by fixing generator=generator. I did have an additional error which I corrected by:

motherboard._pre_instantiate()
m5.instantiate()

I am including the two runs (with error and no error). I have a couple of concerns. I used the docker commands in gem5-bootcamp-env to build a docker container that I used to run gem5. This seems to run in both WSL, and on my stand alone Ubuntu linux system. When I run via the docker I am root, so there may be some issues with root privilege.

I don’t have a problem running version 22 in my class, but I am concerned that I don’t control that repository. I need to make sure that repository will remain stable while I teach with that version. If I have enough time to prepared, I will also see if I can get it running on the jetson orin nano system since we are providing them to our students.

I think I disagree with statement 2. The build was following the example from Marjan Fariborz Cache Systems charts. I was in the gem5 directory (under the gem5-bootcamp-env directory). The argument –j16 indicates use all 16 cores.  I am not sure why the statement:

scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level –j16

Produces the error message:
Error: No non-leaf 'build' dir found on target path. /home/besernd1/gem5-bootcamp-env/gem5/–j16

If I use:
python3 which scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level -j16

Everything works correctly.

Thank-you for your help,

Nick

Prior to the correction this is the error message:

./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
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.0.1
gem5 compiled Jul 24 2023 20:02:58
gem5 started Jul 24 2023 20:15:44
gem5 executing on BESERND1-WL2, pid 11874
command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
Exception:
AbstractBoard's _connect_things function has not been called. This is likely
due to not running a board outside of the gem5 Standard Library Simulator
module. If this is the case, this can be resolved by calling
<AbstractBoard>._pre_instantiate() prior to m5.instantiate().

At:
src/python/gem5/components/boards/abstract_board.py(402): _connect_things_check
src/python/gem5/components/boards/abstract_system_board.py(65): createCCObject
src/python/m5/simulate.py(124): instantiate
materials/using-gem5/04-cache-models/simple_cache_run.py(104): <module>
src/python/m5/main.py(629): main

After the correction I got:

:~/gem5-bootcamp-env$ ./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
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.0.1
gem5 compiled Jul 24 2023 20:02:58
gem5 started Jul 24 2023 20:18:09
gem5 executing on BESERND1-WL2, pid 11886
command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
Beginning simulation!
src/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
src/mem/ruby/system/Sequencer.cc:606: warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files!
Exiting @ tick 250002414 because system.processor.cores1.generator has encountered the exit state and will terminate the simulation.
.

From: Bobby Bruce bbruce@ucdavis.edu
Sent: Monday, July 24, 2023 2:45 PM
To: The gem5 Users mailing list gem5-users@gem5.org; Beser, Nicholas D. Nick.Beser@jhuapl.edu
Subject: [EXT] Re: [gem5-users] Problems upgrading to latest version

APL external email warning: Verify sender bbruce@ucdavis.edumailto:bbruce@ucdavis.edu before clicking links or attachments

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.orgmailto: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.orghttps://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.orgmailto:gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.orgmailto:gem5-users-leave@gem5.org

Bobby, You suggestion (number 3) worked, and I was able to run the compiled gem5.opt by fixing generator=generator. I did have an additional error which I corrected by: motherboard._pre_instantiate() m5.instantiate() I am including the two runs (with error and no error). I have a couple of concerns. I used the docker commands in gem5-bootcamp-env to build a docker container that I used to run gem5. This seems to run in both WSL, and on my stand alone Ubuntu linux system. When I run via the docker I am root, so there may be some issues with root privilege. I don’t have a problem running version 22 in my class, but I am concerned that I don’t control that repository. I need to make sure that repository will remain stable while I teach with that version. If I have enough time to prepared, I will also see if I can get it running on the jetson orin nano system since we are providing them to our students. I think I disagree with statement 2. The build was following the example from Marjan Fariborz Cache Systems charts. I was in the gem5 directory (under the gem5-bootcamp-env directory). The argument –j16 indicates use all 16 cores. I am not sure why the statement: scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level –j16 Produces the error message: Error: No non-leaf 'build' dir found on target path. /home/besernd1/gem5-bootcamp-env/gem5/–j16 If I use: python3 `which scons` build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level -j16 Everything works correctly. Thank-you for your help, Nick Prior to the correction this is the error message: ./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 gem5 is copyrighted software; use the --copyright option for details. gem5 version 23.0.0.1 gem5 compiled Jul 24 2023 20:02:58 gem5 started Jul 24 2023 20:15:44 gem5 executing on BESERND1-WL2, pid 11874 command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. Exception: AbstractBoard's `_connect_things` function has not been called. This is likely due to not running a board outside of the gem5 Standard Library Simulator module. If this is the case, this can be resolved by calling `<AbstractBoard>._pre_instantiate()` prior to `m5.instantiate()`. At: src/python/gem5/components/boards/abstract_board.py(402): _connect_things_check src/python/gem5/components/boards/abstract_system_board.py(65): createCCObject src/python/m5/simulate.py(124): instantiate materials/using-gem5/04-cache-models/simple_cache_run.py(104): <module> src/python/m5/main.py(629): main After the correction I got: :~/gem5-bootcamp-env$ ./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 gem5 is copyrighted software; use the --copyright option for details. gem5 version 23.0.0.1 gem5 compiled Jul 24 2023 20:02:58 gem5 started Jul 24 2023 20:18:09 gem5 executing on BESERND1-WL2, pid 11886 command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated. Beginning simulation! src/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... src/mem/ruby/system/Sequencer.cc:606: warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files! Exiting @ tick 250002414 because system.processor.cores1.generator has encountered the exit state and will terminate the simulation. . From: Bobby Bruce <bbruce@ucdavis.edu> Sent: Monday, July 24, 2023 2:45 PM To: The gem5 Users mailing list <gem5-users@gem5.org>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu> Subject: [EXT] Re: [gem5-users] Problems upgrading to latest version APL external email warning: Verify sender bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu> before clicking links or attachments 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<mailto: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-leave@gem5.org<mailto:gem5-users-leave@gem5.org>
SA
Sandy Atef Abdelmalak
Tue, Jul 25, 2023 6:55 AM

From: Beser, Nicholas D. via gem5-users [mailto:gem5-users@gem5.org]
Sent: Tuesday, July 25, 2023 3:32 AM
To: Bobby Bruce; The gem5 Users mailing list
Cc: Beser, Nicholas D.
Subject: [EXTERNAL EMAIL] - [gem5-users] Re: [EXT] Re: Problems upgrading to latest version

Bobby,

You suggestion (number 3) worked, and I was able to run the compiled gem5.opt by fixing generator=generator. I did have an additional error which I corrected by:

motherboard._pre_instantiate()
m5.instantiate()

I am including the two runs (with error and no error). I have a couple of concerns. I used the docker commands in gem5-bootcamp-env to build a docker container that I used to run gem5. This seems to run in both WSL, and on my stand alone Ubuntu linux system. When I run via the docker I am root, so there may be some issues with root privilege.

I don’t have a problem running version 22 in my class, but I am concerned that I don’t control that repository. I need to make sure that repository will remain stable while I teach with that version. If I have enough time to prepared, I will also see if I can get it running on the jetson orin nano system since we are providing them to our students.

I think I disagree with statement 2. The build was following the example from Marjan Fariborz Cache Systems charts. I was in the gem5 directory (under the gem5-bootcamp-env directory). The argument –j16 indicates use all 16 cores.  I am not sure why the statement:

scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level –j16

Produces the error message:
Error: No non-leaf 'build' dir found on target path. /home/besernd1/gem5-bootcamp-env/gem5/–j16

If I use:
python3 which scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level -j16

Everything works correctly.

Thank-you for your help,

Nick

Prior to the correction this is the error message:

./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
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.0.1
gem5 compiled Jul 24 2023 20:02:58
gem5 started Jul 24 2023 20:15:44
gem5 executing on BESERND1-WL2, pid 11874
command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
Exception:
AbstractBoard's _connect_things function has not been called. This is likely
due to not running a board outside of the gem5 Standard Library Simulator
module. If this is the case, this can be resolved by calling
<AbstractBoard>._pre_instantiate() prior to m5.instantiate().

At:
src/python/gem5/components/boards/abstract_board.py(402): _connect_things_check
src/python/gem5/components/boards/abstract_system_board.py(65): createCCObject
src/python/m5/simulate.py(124): instantiate
materials/using-gem5/04-cache-models/simple_cache_run.py(104): <module>
src/python/m5/main.py(629): main

After the correction I got:

:~/gem5-bootcamp-env$ ./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
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.0.1
gem5 compiled Jul 24 2023 20:02:58
gem5 started Jul 24 2023 20:18:09
gem5 executing on BESERND1-WL2, pid 11886
command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
Beginning simulation!
src/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
src/mem/ruby/system/Sequencer.cc:606: warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files!
Exiting @ tick 250002414 because system.processor.cores1.generator has encountered the exit state and will terminate the simulation.
.

From: Bobby Bruce <bbruce@ucdavis.edumailto:bbruce@ucdavis.edu>
Sent: Monday, July 24, 2023 2:45 PM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>; Beser, Nicholas D. <Nick.Beser@jhuapl.edumailto:Nick.Beser@jhuapl.edu>
Subject: [EXT] Re: [gem5-users] Problems upgrading to latest version

APL external email warning: Verify sender bbruce@ucdavis.edumailto:bbruce@ucdavis.edu before clicking links or attachments

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.orgmailto: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.orghttps://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.orgmailto:gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.orgmailto:gem5-users-leave@gem5.org

From: Beser, Nicholas D. via gem5-users [mailto:gem5-users@gem5.org] Sent: Tuesday, July 25, 2023 3:32 AM To: Bobby Bruce; The gem5 Users mailing list Cc: Beser, Nicholas D. Subject: [EXTERNAL EMAIL] - [gem5-users] Re: [EXT] Re: Problems upgrading to latest version Bobby, You suggestion (number 3) worked, and I was able to run the compiled gem5.opt by fixing generator=generator. I did have an additional error which I corrected by: motherboard._pre_instantiate() m5.instantiate() I am including the two runs (with error and no error). I have a couple of concerns. I used the docker commands in gem5-bootcamp-env to build a docker container that I used to run gem5. This seems to run in both WSL, and on my stand alone Ubuntu linux system. When I run via the docker I am root, so there may be some issues with root privilege. I don’t have a problem running version 22 in my class, but I am concerned that I don’t control that repository. I need to make sure that repository will remain stable while I teach with that version. If I have enough time to prepared, I will also see if I can get it running on the jetson orin nano system since we are providing them to our students. I think I disagree with statement 2. The build was following the example from Marjan Fariborz Cache Systems charts. I was in the gem5 directory (under the gem5-bootcamp-env directory). The argument –j16 indicates use all 16 cores. I am not sure why the statement: scons build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level –j16 Produces the error message: Error: No non-leaf 'build' dir found on target path. /home/besernd1/gem5-bootcamp-env/gem5/–j16 If I use: python3 `which scons` build/NULL_MESI_Two_Level/gem5.opt --default=NULL PROTOCOL=MESI_Two_Level -j16 Everything works correctly. Thank-you for your help, Nick Prior to the correction this is the error message: ./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 gem5 is copyrighted software; use the --copyright option for details. gem5 version 23.0.0.1 gem5 compiled Jul 24 2023 20:02:58 gem5 started Jul 24 2023 20:15:44 gem5 executing on BESERND1-WL2, pid 11874 command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. Exception: AbstractBoard's `_connect_things` function has not been called. This is likely due to not running a board outside of the gem5 Standard Library Simulator module. If this is the case, this can be resolved by calling `<AbstractBoard>._pre_instantiate()` prior to `m5.instantiate()`. At: src/python/gem5/components/boards/abstract_board.py(402): _connect_things_check src/python/gem5/components/boards/abstract_system_board.py(65): createCCObject src/python/m5/simulate.py(124): instantiate materials/using-gem5/04-cache-models/simple_cache_run.py(104): <module> src/python/m5/main.py(629): main After the correction I got: :~/gem5-bootcamp-env$ ./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 gem5 is copyrighted software; use the --copyright option for details. gem5 version 23.0.0.1 gem5 compiled Jul 24 2023 20:02:58 gem5 started Jul 24 2023 20:18:09 gem5 executing on BESERND1-WL2, pid 11886 command line: ./gem5/build/NULL_MESI_Two_Level/gem5.opt materials/using-gem5/04-cache-models/simple_cache_run.py 2 MESITwoLevel 512MB Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated. Beginning simulation! src/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... src/mem/ruby/system/Sequencer.cc:606: warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files! Exiting @ tick 250002414 because system.processor.cores1.generator has encountered the exit state and will terminate the simulation. . From: Bobby Bruce <bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu>> Sent: Monday, July 24, 2023 2:45 PM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu<mailto:Nick.Beser@jhuapl.edu>> Subject: [EXT] Re: [gem5-users] Problems upgrading to latest version APL external email warning: Verify sender bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu> before clicking links or attachments 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<mailto: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-leave@gem5.org<mailto:gem5-users-leave@gem5.org>