gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Question about running the hpca-2023 tutorial

BN
Beser, Nicholas D.
Wed, May 31, 2023 1:30 PM

I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser

I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py gem5 Simulator System. https://www.gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.1.0.0 gem5 compiled May 30 2023 13:05:58 gem5 started May 31 2023 09:12:10 gem5 executing on besernd1-vm5, pid 862230 command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) At: ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> build/X86/python/m5/main.py(597): main The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. Thank-you, Nick Beser
TR
Thiago Rodrigues
Thu, Jun 1, 2023 3:13 PM

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I
followed the HPCA(23) video tutorial and even used the available git
codespace.

I removed the "resource" related code lines and used a variable
-> binary = "path_to_the_benchmark" <- to set the benchmark, and another
error occurred: "Attribute_Error: 'str' object has no attribute
'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked
just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> escreveu:

I was reviewing the tutorial with the hope that I could setup something
similar for a class that I am teaching at Johns Hopkins Whiting School of
Engineering. Is there a way of running this locally on my linux system. I
have gem5 installed, and it runs the basic routines described in the
getting started documentation. When I try to run the tutorial I get the
following error:

~/gem5$ build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

gem5 Simulator System.  https://www.gem5.org

gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0

gem5 compiled May 30 2023 13:05:58

gem5 started May 31 2023 09:12:10

gem5 executing on besernd1-vm5, pid 862230

command line: build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from
'gem5.resources.resource' (unknown location)

At:

../gem5-tutorial-codespace/materials/hello-world.py(6): <module>

build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace
does not give precise instructions on integrating any changes required back
into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato

Hello, same problem here. I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file After that I used the get_started scripts (part 1) and the benchmark worked just fine. The new Python API is very friendly but I could not use it. Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users < gem5-users@gem5.org> escreveu: > I was reviewing the tutorial with the hope that I could setup something > similar for a class that I am teaching at Johns Hopkins Whiting School of > Engineering. Is there a way of running this locally on my linux system. I > have gem5 installed, and it runs the basic routines described in the > getting started documentation. When I try to run the tutorial I get the > following error: > > > > ~/gem5$ build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > gem5 Simulator System. https://www.gem5.org > > gem5 is copyrighted software; use the --copyright option for details. > > > > gem5 version 22.1.0.0 > > gem5 compiled May 30 2023 13:05:58 > > gem5 started May 31 2023 09:12:10 > > gem5 executing on besernd1-vm5, pid 862230 > > command line: build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > > > ImportError: cannot import name 'obtain_resource' from > 'gem5.resources.resource' (unknown location) > > > > At: > > ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> > > build/X86/python/m5/main.py(597): main > > > > The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace > does not give precise instructions on integrating any changes required back > into gem5. I was wondering if there was a clearer procedure. > > > > Thank-you, > > > > Nick Beser > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org > -- Me. Thiago R. B. S Soares Professor do Instituto Federal do Piauí - IFPI Campus São Raimundo Nonato
BN
Beser, Nicholas D.
Fri, Jun 2, 2023 7:27 PM

Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

board._pre_instantiate()
m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users gem5-users@gem5.org
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Thiago Rodrigues thiagorbss@gmail.com
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.orgmailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato

Thiago, I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): board._pre_instantiate() m5.instantiate() This was not necessary in later examples fro 02-stdlib. Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. Nick From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org> Sent: Thursday, June 1, 2023 11:13 AM To: The gem5 Users mailing list <gem5-users@gem5.org> Cc: Thiago Rodrigues <thiagorbss@gmail.com> Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org<mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments Hello, same problem here. I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file After that I used the get_started scripts (part 1) and the benchmark worked just fine. The new Python API is very friendly but I could not use it. Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> escreveu: I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py gem5 Simulator System. https://www.gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.1.0.0 gem5 compiled May 30 2023 13:05:58 gem5 started May 31 2023 09:12:10 gem5 executing on besernd1-vm5, pid 862230 command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) At: ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> build/X86/python/m5/main.py(597): main The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. Thank-you, Nick Beser _______________________________________________ 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> -- Me. Thiago R. B. S Soares Professor do Instituto Federal do Piauí - IFPI Campus São Raimundo Nonato
AA
Ayaz Akram
Fri, Jun 2, 2023 10:29 PM

Hi everyone,

The examples from the tutorial repo (
https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for
me with the gem5/gem5-resources versions checked out in that repo. I
basically cloned the entire repo using the --recursive flag. If you are
using a different version of gem5, my guess is that your scripts might need
to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> wrote:

Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run
into some odd issues that I would love to compare notes with someone who
knows the gem5 system. Some of the errors have to do with the directory
organization of the gem5-bootcamp-env code from the github. I am running
into python errors that suggest that the code is not able to find the
python files. As an example when I run:

build/X86/gem5.opt
/home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file
because the python code could not see liCache.py. When I tried to run the
hello-world example, it still does not see the python file. I also have to
explicitly define the path to the customResource file, because it does not
understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add
a line in front of the m5.instantiate():

 board._pre_instantiate()

 m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the
codespaces. I think we need clear instructions on how to do those examples
with the basic gem5 installation.

Nick

From: Thiago Rodrigues via gem5-users gem5-users@gem5.org
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Thiago Rodrigues thiagorbss@gmail.com
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023
tutorial

*APL external email warning: *Verify sender
gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links
or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I
followed the HPCA(23) video tutorial and even used the available git
codespace.

I removed the "resource" related code lines and used a variable
-> binary = "path_to_the_benchmark" <- to set the benchmark, and another
error occurred: "Attribute_Error: 'str' object has no attribute
'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark
worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> escreveu:

I was reviewing the tutorial with the hope that I could setup something
similar for a class that I am teaching at Johns Hopkins Whiting School of
Engineering. Is there a way of running this locally on my linux system. I
have gem5 installed, and it runs the basic routines described in the
getting started documentation. When I try to run the tutorial I get the
following error:

~/gem5$ build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

gem5 Simulator System.  https://www.gem5.org

gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0

gem5 compiled May 30 2023 13:05:58

gem5 started May 31 2023 09:12:10

gem5 executing on besernd1-vm5, pid 862230

command line: build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from
'gem5.resources.resource' (unknown location)

At:

../gem5-tutorial-codespace/materials/hello-world.py(6): <module>

build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace
does not give precise instructions on integrating any changes required back
into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

--

Me. Thiago R. B. S Soares

Professor do Instituto Federal do Piauí - IFPI

Campus São Raimundo Nonato


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi everyone, The examples from the tutorial repo ( https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. -Ayaz On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users < gem5-users@gem5.org> wrote: > Thiago, > > > > I have had better luck working through the gem5 bootcamp 2022. I have run > into some odd issues that I would love to compare notes with someone who > knows the gem5 system. Some of the errors have to do with the directory > organization of the gem5-bootcamp-env code from the github. I am running > into python errors that suggest that the code is not able to find the > python files. As an example when I run: > > > > build/X86/gem5.opt > /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py > > > > I had to make some changes in the unique_cache_hierarchy_complete.py file > because the python code could not see liCache.py. When I tried to run the > hello-world example, it still does not see the python file. I also have to > explicitly define the path to the customResource file, because it does not > understand the abbreviated directory path provided. > > > > I also ran into a problem with some of the earlier examples. I had to add > a line in front of the m5.instantiate(): > > > > board._pre_instantiate() > > m5.instantiate() > > > > This was not necessary in later examples fro 02-stdlib. > > > > Part of the problem has to do with the tutorial and bootcamp using the > codespaces. I think we need clear instructions on how to do those examples > with the basic gem5 installation. > > > > Nick > > *From:* Thiago Rodrigues via gem5-users <gem5-users@gem5.org> > *Sent:* Thursday, June 1, 2023 11:13 AM > *To:* The gem5 Users mailing list <gem5-users@gem5.org> > *Cc:* Thiago Rodrigues <thiagorbss@gmail.com> > *Subject:* [EXT] [gem5-users] Re: Question about running the hpca-2023 > tutorial > > > > *APL external email warning: *Verify sender > gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links > or attachments > > > > Hello, same problem here. > > > > I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I > followed the HPCA(23) video tutorial and even used the available git > codespace. > > > > I removed the "resource" related code lines and used a variable > -> binary = "path_to_the_benchmark" <- to set the benchmark, and another > error occurred: "Attribute_Error: 'str' object has no attribute > 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file > > > > After that I used the get_started scripts (part 1) and the benchmark > worked just fine. > > > > The new Python API is very friendly but I could not use it. > > > > Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users < > gem5-users@gem5.org> escreveu: > > I was reviewing the tutorial with the hope that I could setup something > similar for a class that I am teaching at Johns Hopkins Whiting School of > Engineering. Is there a way of running this locally on my linux system. I > have gem5 installed, and it runs the basic routines described in the > getting started documentation. When I try to run the tutorial I get the > following error: > > > > ~/gem5$ build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > gem5 Simulator System. https://www.gem5.org > > gem5 is copyrighted software; use the --copyright option for details. > > > > gem5 version 22.1.0.0 > > gem5 compiled May 30 2023 13:05:58 > > gem5 started May 31 2023 09:12:10 > > gem5 executing on besernd1-vm5, pid 862230 > > command line: build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > > > ImportError: cannot import name 'obtain_resource' from > 'gem5.resources.resource' (unknown location) > > > > At: > > ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> > > build/X86/python/m5/main.py(597): main > > > > The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace > does not give precise instructions on integrating any changes required back > into gem5. I was wondering if there was a clearer procedure. > > > > Thank-you, > > > > Nick Beser > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org > > > > > -- > > Me. Thiago R. B. S Soares > > Professor do Instituto Federal do Piauí - IFPI > > Campus São Raimundo Nonato > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >
BN
Beser, Nicholas D.
Sat, Jun 3, 2023 1:02 AM

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram yazakram@ucdavis.edu
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Thiago Rodrigues thiagorbss@gmail.com; Beser, Nicholas D. Nick.Beser@jhuapl.edu
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> wrote:
Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

board._pre_instantiate()
m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.orgmailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato


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

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022? I use git to manage my class archive, but I normally keep it very simple. Nick From: Ayaz Akram <yazakram@ucdavis.edu> Sent: Friday, June 2, 2023 6:29 PM To: The gem5 Users mailing list <gem5-users@gem5.org> Cc: Thiago Rodrigues <thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu> Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu> before clicking links or attachments Hi everyone, The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. -Ayaz On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: Thiago, I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): board._pre_instantiate() m5.instantiate() This was not necessary in later examples fro 02-stdlib. Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. Nick From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Sent: Thursday, June 1, 2023 11:13 AM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>> Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org<mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments Hello, same problem here. I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file After that I used the get_started scripts (part 1) and the benchmark worked just fine. The new Python API is very friendly but I could not use it. Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> escreveu: I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py gem5 Simulator System. https://www.gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.1.0.0 gem5 compiled May 30 2023 13:05:58 gem5 started May 31 2023 09:12:10 gem5 executing on besernd1-vm5, pid 862230 command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) At: ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> build/X86/python/m5/main.py(597): main The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. Thank-you, Nick Beser _______________________________________________ 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> -- Me. Thiago R. B. S Soares Professor do Instituto Federal do Piauí - IFPI Campus São Raimundo Nonato _______________________________________________ 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>
BB
Bobby Bruce
Fri, Jun 9, 2023 1:07 AM

Sorry for a very late reply, but for the sake of clarification:

Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API.

There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one.

I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users gem5-users@gem5.org wrote:

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram <yazakram@ucdavis.edu mailto:yazakram@ucdavis.edu>
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.com mailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu mailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org> wrote:
Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

 board._pre_instantiate()
 m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.com mailto:thiagorbss@gmail.com>
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.org https://www.gem5.org/
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato


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_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Sorry for a very late reply, but for the sake of clarification: Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API. There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one. I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly. -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net > On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org> wrote: > > I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace <https://github.com/gem5-hpca-2023/gem5-tutorial-codespace>? Should I have done that with the bootcamp 2022? > > I use git to manage my class archive, but I normally keep it very simple. > > Nick > > From: Ayaz Akram <yazakram@ucdavis.edu <mailto:yazakram@ucdavis.edu>> > Sent: Friday, June 2, 2023 6:29 PM > To: The gem5 Users mailing list <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Cc: Thiago Rodrigues <thiagorbss@gmail.com <mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu <mailto:Nick.Beser@jhuapl.edu>> > Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial > > APL external email warning: Verify sender yazakram@ucdavis.edu <mailto:yazakram@ucdavis.edu> before clicking links or attachments > > > Hi everyone, > > The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace <https://github.com/gem5-hpca-2023/gem5-tutorial-codespace>) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. > > -Ayaz > > > On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> wrote: > Thiago, > > I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: > > build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py > > I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. > > I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): > > board._pre_instantiate() > m5.instantiate() > > This was not necessary in later examples fro 02-stdlib. > > Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. > > Nick > From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Sent: Thursday, June 1, 2023 11:13 AM > To: The gem5 Users mailing list <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Cc: Thiago Rodrigues <thiagorbss@gmail.com <mailto:thiagorbss@gmail.com>> > Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial > > APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org <mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments > > > Hello, same problem here. > > I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. > > I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file > > After that I used the get_started scripts (part 1) and the benchmark worked just fine. > > The new Python API is very friendly but I could not use it. > > Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> escreveu: > I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: > > ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py > gem5 Simulator System. https://www.gem5.org <https://www.gem5.org/> > gem5 is copyrighted software; use the --copyright option for details. > > gem5 version 22.1.0.0 > gem5 compiled May 30 2023 13:05:58 > gem5 started May 31 2023 09:12:10 > gem5 executing on besernd1-vm5, pid 862230 > command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py > > ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) > > At: > ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> > build/X86/python/m5/main.py(597): main > > The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace <https://github.com/gem5-hpca-2023/gem5-tutorial-codespace> does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. > > Thank-you, > > Nick Beser > _______________________________________________ > 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> > > > -- > Me. Thiago R. B. S Soares > Professor do Instituto Federal do Piauí - IFPI > Campus São Raimundo Nonato > _______________________________________________ > 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>_______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org
BN
Beser, Nicholas D.
Fri, Jun 9, 2023 1:08 PM

Bobby,

Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class.

Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet.

I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach).

I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated.

Nick

From: Bobby Bruce bbruce@ucdavis.edu
Sent: Thursday, June 8, 2023 9:07 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Ayaz Akram yazakram@ucdavis.edu; Thiago Rodrigues thiagorbss@gmail.com; Beser, Nicholas D. Nick.Beser@jhuapl.edu
Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial

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

Sorry for a very late reply, but for the sake of clarification:

Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API.

There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one.

I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> wrote:

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram <yazakram@ucdavis.edumailto:yazakram@ucdavis.edu>
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edumailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> wrote:
Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

board._pre_instantiate()
m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.orgmailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.orghttps://www.gem5.org/
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato


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


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, Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class. Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet. I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach). I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated. Nick From: Bobby Bruce <bbruce@ucdavis.edu> Sent: Thursday, June 8, 2023 9:07 PM To: The gem5 Users mailing list <gem5-users@gem5.org> Cc: Ayaz Akram <yazakram@ucdavis.edu>; Thiago Rodrigues <thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu> Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu> before clicking links or attachments Sorry for a very late reply, but for the sake of clarification: Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API. There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one. I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly. -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022? I use git to manage my class archive, but I normally keep it very simple. Nick From: Ayaz Akram <yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu>> Sent: Friday, June 2, 2023 6:29 PM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu<mailto:Nick.Beser@jhuapl.edu>> Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu> before clicking links or attachments Hi everyone, The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. -Ayaz On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: Thiago, I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): board._pre_instantiate() m5.instantiate() This was not necessary in later examples fro 02-stdlib. Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. Nick From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Sent: Thursday, June 1, 2023 11:13 AM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>> Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org<mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments Hello, same problem here. I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file After that I used the get_started scripts (part 1) and the benchmark worked just fine. The new Python API is very friendly but I could not use it. Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> escreveu: I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py gem5 Simulator System. https://www.gem5.org<https://www.gem5.org/> gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.1.0.0 gem5 compiled May 30 2023 13:05:58 gem5 started May 31 2023 09:12:10 gem5 executing on besernd1-vm5, pid 862230 command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) At: ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> build/X86/python/m5/main.py(597): main The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. Thank-you, Nick Beser _______________________________________________ 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> -- Me. Thiago R. B. S Soares Professor do Instituto Federal do Piauí - IFPI Campus São Raimundo Nonato _______________________________________________ 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> _______________________________________________ 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>
BB
Bobby Bruce
Fri, Jun 9, 2023 4:00 PM

Hey Nick,

The GUI work was basically just a prototype. We had ambitions to properly incorporate it into the project but we lacked the resources to do so. It should really be archived until someone wants to revive it. So I’m not surprised it doesn’t work. We don’t recommend using it.

The RELEASE-NOTES.md file, in the root of the gem5 repository (https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md) should highlight all the major changes introduced in gem5 released. API changes should be noted there.

A VM should work fine, but if you want to try something more light-weight, you could use Docker. The Docker image for the container we ran the Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latest http://gcr.io/gem5-test/gem5-tutorial-env:latest. So all you need to do is:

docker pull gcr.io/gem5-test/gem5-tutorial-env:latest <http://gcr.io/gem5-test/gem5-tutorial-env:latest>
docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it gcr.io/gem5-test/gem5-tutorial-env:latest <http://gcr.io/gem5-test/gem5-tutorial-env:latest>
# from here you’re in the docker container and the gem5 repo is mounted to “/gem5”

(The sources for this docker image is in the Bootcamp repo, here: https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker).

Kind regards,
Bobby

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. Nick.Beser@jhuapl.edu wrote:

Bobby,

Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class.

Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet.

I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach).

I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated.

Nick

From: Bobby Bruce <bbruce@ucdavis.edu mailto:bbruce@ucdavis.edu>
Sent: Thursday, June 8, 2023 9:07 PM
To: The gem5 Users mailing list <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Cc: Ayaz Akram <yazakram@ucdavis.edu mailto:yazakram@ucdavis.edu>; Thiago Rodrigues <thiagorbss@gmail.com mailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu mailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial

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

Sorry for a very late reply, but for the sake of clarification:

Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API.

There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one.

I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net https://www.bobbybruce.net/

On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org> wrote:

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram <yazakram@ucdavis.edu mailto:yazakram@ucdavis.edu>
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.com mailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu mailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org> wrote:
Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

 board._pre_instantiate()
 m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list <gem5-users@gem5.org mailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.com mailto:thiagorbss@gmail.com>
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org mailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.org https://www.gem5.org/
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato


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


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

Hey Nick, The GUI work was basically just a prototype. We had ambitions to properly incorporate it into the project but we lacked the resources to do so. It should really be archived until someone wants to revive it. So I’m not surprised it doesn’t work. We don’t recommend using it. The RELEASE-NOTES.md file, in the root of the gem5 repository (https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md) should highlight all the major changes introduced in gem5 released. API changes should be noted there. A VM should work fine, but if you want to try something more light-weight, you could use Docker. The Docker image for the container we ran the Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latest <http://gcr.io/gem5-test/gem5-tutorial-env:latest>. So all you need to do is: ``` docker pull gcr.io/gem5-test/gem5-tutorial-env:latest <http://gcr.io/gem5-test/gem5-tutorial-env:latest> docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it gcr.io/gem5-test/gem5-tutorial-env:latest <http://gcr.io/gem5-test/gem5-tutorial-env:latest> # from here you’re in the docker container and the gem5 repo is mounted to “/gem5” ``` (The sources for this docker image is in the Bootcamp repo, here: https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker). Kind regards, Bobby -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net > On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. <Nick.Beser@jhuapl.edu> wrote: > > Bobby, > > Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class. > > Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet. > > I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach). > > I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated. > > Nick > > From: Bobby Bruce <bbruce@ucdavis.edu <mailto:bbruce@ucdavis.edu>> > Sent: Thursday, June 8, 2023 9:07 PM > To: The gem5 Users mailing list <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Cc: Ayaz Akram <yazakram@ucdavis.edu <mailto:yazakram@ucdavis.edu>>; Thiago Rodrigues <thiagorbss@gmail.com <mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu <mailto:Nick.Beser@jhuapl.edu>> > Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial > > APL external email warning: Verify sender bbruce@ucdavis.edu <mailto:bbruce@ucdavis.edu> before clicking links or attachments > > > Sorry for a very late reply, but for the sake of clarification: > > Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API. > > There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one. > > I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly. > > -- > Dr. Bobby R. Bruce > Room 3050, > Kemper Hall, UC Davis > Davis, > CA, 95616 > > web: https://www.bobbybruce.net <https://www.bobbybruce.net/> > > > On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> wrote: > > I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022? > > I use git to manage my class archive, but I normally keep it very simple. > > Nick > > From: Ayaz Akram <yazakram@ucdavis.edu <mailto:yazakram@ucdavis.edu>> > Sent: Friday, June 2, 2023 6:29 PM > To: The gem5 Users mailing list <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Cc: Thiago Rodrigues <thiagorbss@gmail.com <mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu <mailto:Nick.Beser@jhuapl.edu>> > Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial > > APL external email warning: Verify sender yazakram@ucdavis.edu <mailto:yazakram@ucdavis.edu> before clicking links or attachments > > Hi everyone, > > The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. > > -Ayaz > > > On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> wrote: > Thiago, > > I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: > > build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py > > I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. > > I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): > > board._pre_instantiate() > m5.instantiate() > > This was not necessary in later examples fro 02-stdlib. > > Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. > > Nick > From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Sent: Thursday, June 1, 2023 11:13 AM > To: The gem5 Users mailing list <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> > Cc: Thiago Rodrigues <thiagorbss@gmail.com <mailto:thiagorbss@gmail.com>> > Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial > > APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org <mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments > > Hello, same problem here. > > I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. > > I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file > > After that I used the get_started scripts (part 1) and the benchmark worked just fine. > > The new Python API is very friendly but I could not use it. > > Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org <mailto:gem5-users@gem5.org>> escreveu: > I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: > > ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py > gem5 Simulator System. https://www.gem5.org <https://www.gem5.org/> > gem5 is copyrighted software; use the --copyright option for details. > > gem5 version 22.1.0.0 > gem5 compiled May 30 2023 13:05:58 > gem5 started May 31 2023 09:12:10 > gem5 executing on besernd1-vm5, pid 862230 > command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py > > ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) > > At: > ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> > build/X86/python/m5/main.py(597): main > > The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. > > Thank-you, > > Nick Beser > _______________________________________________ > 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> > > > -- > Me. Thiago R. B. S Soares > Professor do Instituto Federal do Piauí - IFPI > Campus São Raimundo Nonato > _______________________________________________ > 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> > _______________________________________________ > 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.
Fri, Jun 9, 2023 4:05 PM

I will take a look at docker. I need to work up getting gem5 running on the Jetson Nano. I am not sure if docker works on the Nano.

Nick

From: Bobby Bruce bbruce@ucdavis.edu
Sent: Friday, June 9, 2023 12:00 PM
To: Beser, Nicholas D. Nick.Beser@jhuapl.edu
Cc: The gem5 Users mailing list gem5-users@gem5.org; Ayaz Akram yazakram@ucdavis.edu; Thiago Rodrigues thiagorbss@gmail.com
Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial

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

Hey Nick,

The GUI work was basically just a prototype. We had ambitions to properly incorporate it into the project but we lacked the resources to do so. It should really be archived until someone wants to revive it. So I’m not surprised it doesn’t work. We don’t recommend using it.

The RELEASE-NOTES.md file, in the root of the gem5 repository (https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md) should highlight all the major changes introduced in gem5 released. API changes should be noted there.

A VM should work fine, but if you want to try something more light-weight, you could use Docker. The Docker image for the container we ran the Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latesthttp://gcr.io/gem5-test/gem5-tutorial-env:latest. So all you need to do is:

docker pull gcr.io/gem5-test/gem5-tutorial-env:latest<http://gcr.io/gem5-test/gem5-tutorial-env:latest>
docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it gcr.io/gem5-test/gem5-tutorial-env:latest<http://gcr.io/gem5-test/gem5-tutorial-env:latest>
# from here you’re in the docker container and the gem5 repo is mounted to “/gem5”

(The sources for this docker image is in the Bootcamp repo, here: https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker).

Kind regards,
Bobby

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. <Nick.Beser@jhuapl.edumailto:Nick.Beser@jhuapl.edu> wrote:

Bobby,

Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class.

Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet.

I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach).

I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated.

Nick

From: Bobby Bruce <bbruce@ucdavis.edumailto:bbruce@ucdavis.edu>
Sent: Thursday, June 8, 2023 9:07 PM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Ayaz Akram <yazakram@ucdavis.edumailto:yazakram@ucdavis.edu>; Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edumailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial

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

Sorry for a very late reply, but for the sake of clarification:

Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API.

There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one.

I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.nethttps://www.bobbybruce.net/

On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> wrote:

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram <yazakram@ucdavis.edumailto:yazakram@ucdavis.edu>
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edumailto:Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> wrote:
Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run:

build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate():

board._pre_instantiate()
m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation.

Nick
From: Thiago Rodrigues via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list <gem5-users@gem5.orgmailto:gem5-users@gem5.org>
Cc: Thiago Rodrigues <thiagorbss@gmail.commailto:thiagorbss@gmail.com>
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial

APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.orgmailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace.

I removed the "resource" related code lines and used a variable  -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.orgmailto:gem5-users@gem5.org> escreveu:
I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error:

~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py
gem5 Simulator System.  https://www.gem5.orghttps://www.gem5.org/
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled May 30 2023 13:05:58
gem5 started May 31 2023 09:12:10
gem5 executing on besernd1-vm5, pid 862230
command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location)

At:
../gem5-tutorial-codespace/materials/hello-world.py(6): <module>
build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


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

--
Me. Thiago R. B. S Soares
Professor do Instituto Federal do Piauí - IFPI
Campus São Raimundo Nonato


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


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

I will take a look at docker. I need to work up getting gem5 running on the Jetson Nano. I am not sure if docker works on the Nano. Nick From: Bobby Bruce <bbruce@ucdavis.edu> Sent: Friday, June 9, 2023 12:00 PM To: Beser, Nicholas D. <Nick.Beser@jhuapl.edu> Cc: The gem5 Users mailing list <gem5-users@gem5.org>; Ayaz Akram <yazakram@ucdavis.edu>; Thiago Rodrigues <thiagorbss@gmail.com> Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu> before clicking links or attachments Hey Nick, The GUI work was basically just a prototype. We had ambitions to properly incorporate it into the project but we lacked the resources to do so. It should really be archived until someone wants to revive it. So I’m not surprised it doesn’t work. We don’t recommend using it. The RELEASE-NOTES.md file, in the root of the gem5 repository (https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md) should highlight all the major changes introduced in gem5 released. API changes should be noted there. A VM should work fine, but if you want to try something more light-weight, you could use Docker. The Docker image for the container we ran the Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latest<http://gcr.io/gem5-test/gem5-tutorial-env:latest>. So all you need to do is: ``` docker pull gcr.io/gem5-test/gem5-tutorial-env:latest<http://gcr.io/gem5-test/gem5-tutorial-env:latest> docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it gcr.io/gem5-test/gem5-tutorial-env:latest<http://gcr.io/gem5-test/gem5-tutorial-env:latest> # from here you’re in the docker container and the gem5 repo is mounted to “/gem5” ``` (The sources for this docker image is in the Bootcamp repo, here: https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker). Kind regards, Bobby -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. <Nick.Beser@jhuapl.edu<mailto:Nick.Beser@jhuapl.edu>> wrote: Bobby, Thank you for your reply. I am making my way through the Bootcamp 2022 videos and slides. So far everything seems to be working. I had already planned to use visual studio code as a student interface for GPU programming with the Jetson Orin Nano systems, so I will try to use that with the gem5 programming exercises. I have gem5 running on a VM system for my initial checkout, and we try to port it to the Jetson for the class. Is there a change document that describes the API changes? I will take a look at the Obtain resources to make sure my examples are current. I don’t recall seeing anything odd yet. I will have a challenge getting a week of viewgraphs down to two lectures, but my plan is to have a basic tutorial, a lecture on concurrency and coherence. and three discussion forums that will allow the student experiment and generate studies. This is an on line class, and I am integrating gem5 into a basic outline that follows Patterson and Hennessy’s book on Computer Architecture (A quantitative approach). I think the only part of Gem5 that I could not get working was the GUI work. I don’t think it has been updated. Nick From: Bobby Bruce <bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu>> Sent: Thursday, June 8, 2023 9:07 PM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Ayaz Akram <yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu>>; Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu<mailto:Nick.Beser@jhuapl.edu>> Subject: Re: [gem5-users] [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender bbruce@ucdavis.edu<mailto:bbruce@ucdavis.edu> before clicking links or attachments Sorry for a very late reply, but for the sake of clarification: Yes, I believe you should have cloned the bootcamp 2022 recurisively. I think both the issues highlighted in this thread were due to running a newer version of gem5 on top of older config scripts and resources which used the older API. There wasn’t much that went wrong when we used the 2022 Bootcamp repo with a class of 50 last year. There may be bugs but I don’t think anything should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of gem5, and v22.1 was released in December of last year, so be careful. There were quite a few API chances between these released. The “Obtain_resources” change was definitely one. I’m sorry for all the trouble your having with it. If you run into any additional problems please reach out to me directly. -- Dr. Bobby R. Bruce Room 3050, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net<https://www.bobbybruce.net/> On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the correct procedure git clone –recursive https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have done that with the bootcamp 2022? I use git to manage my class archive, but I normally keep it very simple. Nick From: Ayaz Akram <yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu>> Sent: Friday, June 2, 2023 6:29 PM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu<mailto:Nick.Beser@jhuapl.edu>> Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender yazakram@ucdavis.edu<mailto:yazakram@ucdavis.edu> before clicking links or attachments Hi everyone, The examples from the tutorial repo (https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work for me with the gem5/gem5-resources versions checked out in that repo. I basically cloned the entire repo using the --recursive flag. If you are using a different version of gem5, my guess is that your scripts might need to be updated because of changes in the standard library. -Ayaz On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: Thiago, I have had better luck working through the gem5 bootcamp 2022. I have run into some odd issues that I would love to compare notes with someone who knows the gem5 system. Some of the errors have to do with the directory organization of the gem5-bootcamp-env code from the github. I am running into python errors that suggest that the code is not able to find the python files. As an example when I run: build/X86/gem5.opt /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py I had to make some changes in the unique_cache_hierarchy_complete.py file because the python code could not see liCache.py. When I tried to run the hello-world example, it still does not see the python file. I also have to explicitly define the path to the customResource file, because it does not understand the abbreviated directory path provided. I also ran into a problem with some of the earlier examples. I had to add a line in front of the m5.instantiate(): board._pre_instantiate() m5.instantiate() This was not necessary in later examples fro 02-stdlib. Part of the problem has to do with the tutorial and bootcamp using the codespaces. I think we need clear instructions on how to do those examples with the basic gem5 installation. Nick From: Thiago Rodrigues via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Sent: Thursday, June 1, 2023 11:13 AM To: The gem5 Users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Cc: Thiago Rodrigues <thiagorbss@gmail.com<mailto:thiagorbss@gmail.com>> Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023 tutorial APL external email warning: Verify sender gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org<mailto:gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org> before clicking links or attachments Hello, same problem here. I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I followed the HPCA(23) video tutorial and even used the available git codespace. I removed the "resource" related code lines and used a variable -> binary = "path_to_the_benchmark" <- to set the benchmark, and another error occurred: "Attribute_Error: 'str' object has no attribute 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file After that I used the get_started scripts (part 1) and the benchmark worked just fine. The new Python API is very friendly but I could not use it. Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> escreveu: I was reviewing the tutorial with the hope that I could setup something similar for a class that I am teaching at Johns Hopkins Whiting School of Engineering. Is there a way of running this locally on my linux system. I have gem5 installed, and it runs the basic routines described in the getting started documentation. When I try to run the tutorial I get the following error: ~/gem5$ build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py gem5 Simulator System. https://www.gem5.org<https://www.gem5.org/> gem5 is copyrighted software; use the --copyright option for details. gem5 version 22.1.0.0 gem5 compiled May 30 2023 13:05:58 gem5 started May 31 2023 09:12:10 gem5 executing on besernd1-vm5, pid 862230 command line: build/X86/gem5.opt ../gem5-tutorial-codespace/materials/hello-world.py ImportError: cannot import name 'obtain_resource' from 'gem5.resources.resource' (unknown location) At: ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> build/X86/python/m5/main.py(597): main The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace does not give precise instructions on integrating any changes required back into gem5. I was wondering if there was a clearer procedure. Thank-you, Nick Beser _______________________________________________ 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> -- Me. Thiago R. B. S Soares Professor do Instituto Federal do Piauí - IFPI Campus São Raimundo Nonato _______________________________________________ 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> _______________________________________________ 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>
JL
Jason Lowe-Power
Fri, Jun 9, 2023 5:26 PM

Hi Nick,

For teaching you may be able to get some inspiration from my class
assignments. Specifically, assignment 5 is about coherence:
https://jlpteaching.github.io/comparch/modules/gem5/assignment5/

All of the code for my assignments can be found here under different
branches for each assignment:
https://github.com/jlpteaching/gem5-assignment-template

Cheers,
Jason

On Fri, Jun 9, 2023 at 9:08 AM Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> wrote:

I will take a look at docker. I need to work up getting gem5 running on
the Jetson Nano. I am not sure if docker works on the Nano.

Nick

From: Bobby Bruce bbruce@ucdavis.edu
Sent: Friday, June 9, 2023 12:00 PM
To: Beser, Nicholas D. Nick.Beser@jhuapl.edu
Cc: The gem5 Users mailing list gem5-users@gem5.org; Ayaz Akram <
yazakram@ucdavis.edu>; Thiago Rodrigues thiagorbss@gmail.com
Subject: Re: [gem5-users] [EXT] Re: Question about running the
hpca-2023 tutorial

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

Hey Nick,

The GUI work was basically just a prototype. We had ambitions to properly
incorporate it into the project but we lacked the resources to do so. It
should really be archived until someone wants to revive it. So I’m not
surprised it doesn’t work. We don’t recommend using it.

The RELEASE-NOTES.md file, in the root of the gem5 repository (
https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md)
should highlight all the major changes introduced in gem5 released. API
changes should be noted there.

A VM should work fine, but if you want to try something more light-weight,
you could use Docker. The Docker image for the container we ran the
Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latest.
So all you need to do is:


docker pull gcr.io/gem5-test/gem5-tutorial-env:latest

docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it
gcr.io/gem5-test/gem5-tutorial-env:latest

# from here you’re in the docker container and the gem5 repo is mounted to
“/gem5”

(The sources for this docker image is in the Bootcamp repo, here:
https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker).

Kind regards,

Bobby

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. Nick.Beser@jhuapl.edu
wrote:

Bobby,

Thank you for your reply. I am making my way through the Bootcamp 2022
videos and slides. So far everything seems to be working. I had already
planned to use visual studio code as a student interface for GPU
programming with the Jetson Orin Nano systems, so I will try to use that
with the gem5 programming exercises. I have gem5 running on a VM system for
my initial checkout, and we try to port it to the Jetson for the class.

Is there a change document that describes the API changes? I will take a
look at the Obtain resources to make sure my examples are current. I don’t
recall seeing anything odd yet.

I will have a challenge getting a week of viewgraphs down to two lectures,
but my plan is to have a basic tutorial, a lecture on concurrency and
coherence. and three discussion forums that will allow the student
experiment and generate studies. This is an on line class, and I am
integrating gem5 into a basic outline that follows Patterson and Hennessy’s
book on Computer Architecture (A quantitative approach).

I think the only part of Gem5 that I could not get working was the GUI
work. I don’t think it has been updated.

Nick

From: Bobby Bruce bbruce@ucdavis.edu
Sent: Thursday, June 8, 2023 9:07 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Ayaz Akram yazakram@ucdavis.edu; Thiago Rodrigues <
thiagorbss@gmail.com>; Beser, Nicholas D. Nick.Beser@jhuapl.edu
Subject: Re: [gem5-users] [EXT] Re: Question about running the
hpca-2023 tutorial

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

Sorry for a very late reply, but for the sake of clarification:

Yes, I believe you should have cloned the bootcamp 2022 recurisively. I
think both the issues highlighted in this thread were due to running a
newer version of gem5 on top of older config scripts and resources which
used the older API.

There wasn’t much that went wrong when we used the 2022 Bootcamp repo with
a class of 50 last year. There may be bugs but I don’t think anything
should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of
gem5, and v22.1 was released in December of last year, so be careful. There
were quite a few API chances between these released. The “Obtain_resources”
change was definitely one.

I’m sorry for all the trouble your having with it. If you run into any
additional problems please reach out to me directly.

--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net

On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> wrote:

I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the
correct procedure git clone –recursive
https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have
done that with the bootcamp 2022?

I use git to manage my class archive, but I normally keep it very simple.

Nick

From: Ayaz Akram yazakram@ucdavis.edu
Sent: Friday, June 2, 2023 6:29 PM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Thiago Rodrigues thiagorbss@gmail.com; Beser, Nicholas D. <
Nick.Beser@jhuapl.edu>
Subject: Re: [gem5-users] Re: [EXT] Re: Question about running the
hpca-2023 tutorial

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

Hi everyone,

The examples from the tutorial repo (
https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work
for me with the gem5/gem5-resources versions checked out in that repo. I
basically cloned the entire repo using the --recursive flag. If you are
using a different version of gem5, my guess is that your scripts might need
to be updated because of changes in the standard library.

-Ayaz

On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> wrote:

Thiago,

I have had better luck working through the gem5 bootcamp 2022. I have run
into some odd issues that I would love to compare notes with someone who
knows the gem5 system. Some of the errors have to do with the directory
organization of the gem5-bootcamp-env code from the github. I am running
into python errors that suggest that the code is not able to find the
python files. As an example when I run:

build/X86/gem5.opt
/home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py

I had to make some changes in the unique_cache_hierarchy_complete.py file
because the python code could not see liCache.py. When I tried to run the
hello-world example, it still does not see the python file. I also have to
explicitly define the path to the customResource file, because it does not
understand the abbreviated directory path provided.

I also ran into a problem with some of the earlier examples. I had to add
a line in front of the m5.instantiate():

 board._pre_instantiate()

 m5.instantiate()

This was not necessary in later examples fro 02-stdlib.

Part of the problem has to do with the tutorial and bootcamp using the
codespaces. I think we need clear instructions on how to do those examples
with the basic gem5 installation.

Nick

From: Thiago Rodrigues via gem5-users gem5-users@gem5.org
Sent: Thursday, June 1, 2023 11:13 AM
To: The gem5 Users mailing list gem5-users@gem5.org
Cc: Thiago Rodrigues thiagorbss@gmail.com
Subject: [EXT] [gem5-users] Re: Question about running the hpca-2023
tutorial

*APL external email warning: *Verify sender
gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links
or attachments

Hello, same problem here.

I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I
followed the HPCA(23) video tutorial and even used the available git
codespace.

I removed the "resource" related code lines and used a variable
-> binary = "path_to_the_benchmark" <- to set the benchmark, and another
error occurred: "Attribute_Error: 'str' object has no attribute
'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file

After that I used the get_started scripts (part 1) and the benchmark
worked just fine.

The new Python API is very friendly but I could not use it.

Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users <
gem5-users@gem5.org> escreveu:

I was reviewing the tutorial with the hope that I could setup something
similar for a class that I am teaching at Johns Hopkins Whiting School of
Engineering. Is there a way of running this locally on my linux system. I
have gem5 installed, and it runs the basic routines described in the
getting started documentation. When I try to run the tutorial I get the
following error:

~/gem5$ build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

gem5 Simulator System.  https://www.gem5.org

gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0

gem5 compiled May 30 2023 13:05:58

gem5 started May 31 2023 09:12:10

gem5 executing on besernd1-vm5, pid 862230

command line: build/X86/gem5.opt
../gem5-tutorial-codespace/materials/hello-world.py

ImportError: cannot import name 'obtain_resource' from
'gem5.resources.resource' (unknown location)

At:

../gem5-tutorial-codespace/materials/hello-world.py(6): <module>

build/X86/python/m5/main.py(597): main

The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace
does not give precise instructions on integrating any changes required
back into gem5. I was wondering if there was a clearer procedure.

Thank-you,

Nick Beser


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

--

Me. Thiago R. B. S Soares

Professor do Instituto Federal do Piauí - IFPI

Campus São Raimundo Nonato


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi Nick, For teaching you may be able to get some inspiration from my class assignments. Specifically, assignment 5 is about coherence: https://jlpteaching.github.io/comparch/modules/gem5/assignment5/ All of the code for my assignments can be found here under different branches for each assignment: https://github.com/jlpteaching/gem5-assignment-template Cheers, Jason On Fri, Jun 9, 2023 at 9:08 AM Beser, Nicholas D. via gem5-users < gem5-users@gem5.org> wrote: > I will take a look at docker. I need to work up getting gem5 running on > the Jetson Nano. I am not sure if docker works on the Nano. > > > > Nick > > > > *From:* Bobby Bruce <bbruce@ucdavis.edu> > *Sent:* Friday, June 9, 2023 12:00 PM > *To:* Beser, Nicholas D. <Nick.Beser@jhuapl.edu> > *Cc:* The gem5 Users mailing list <gem5-users@gem5.org>; Ayaz Akram < > yazakram@ucdavis.edu>; Thiago Rodrigues <thiagorbss@gmail.com> > *Subject:* Re: [gem5-users] [EXT] Re: Question about running the > hpca-2023 tutorial > > > > *APL external email warning: *Verify sender bbruce@ucdavis.edu before > clicking links or attachments > > > > Hey Nick, > > > > The GUI work was basically just a prototype. We had ambitions to properly > incorporate it into the project but we lacked the resources to do so. It > should really be archived until someone wants to revive it. So I’m not > surprised it doesn’t work. We don’t recommend using it. > > > > The RELEASE-NOTES.md file, in the root of the gem5 repository ( > https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/RELEASE-NOTES.md) > should highlight all the major changes introduced in gem5 released. API > changes should be noted there. > > > > A VM should work fine, but if you want to try something more light-weight, > you could use Docker. The Docker image for the container we ran the > Bootcamp in, via Codespaces, is gcr.io/gem5-test/gem5-tutorial-env:latest. > So all you need to do is: > > > > ``` > > docker pull gcr.io/gem5-test/gem5-tutorial-env:latest > > docker run -u $UID:$GID —volume <gem5 directory>:/gem5 —rm -it > gcr.io/gem5-test/gem5-tutorial-env:latest > > # from here you’re in the docker container and the gem5 repo is mounted to > “/gem5” > > ``` > > > > (The sources for this docker image is in the Bootcamp repo, here: > https://github.com/gem5bootcamp/gem5-bootcamp-env/tree/main/docker). > > > > Kind regards, > > Bobby > > > > -- > Dr. Bobby R. Bruce > Room 3050, > Kemper Hall, UC Davis > Davis, > CA, 95616 > > web: https://www.bobbybruce.net > > > > On Jun 9, 2023, at 6:08 AM, Beser, Nicholas D. <Nick.Beser@jhuapl.edu> > wrote: > > > > Bobby, > > > > Thank you for your reply. I am making my way through the Bootcamp 2022 > videos and slides. So far everything seems to be working. I had already > planned to use visual studio code as a student interface for GPU > programming with the Jetson Orin Nano systems, so I will try to use that > with the gem5 programming exercises. I have gem5 running on a VM system for > my initial checkout, and we try to port it to the Jetson for the class. > > > > Is there a change document that describes the API changes? I will take a > look at the Obtain resources to make sure my examples are current. I don’t > recall seeing anything odd yet. > > > > I will have a challenge getting a week of viewgraphs down to two lectures, > but my plan is to have a basic tutorial, a lecture on concurrency and > coherence. and three discussion forums that will allow the student > experiment and generate studies. This is an on line class, and I am > integrating gem5 into a basic outline that follows Patterson and Hennessy’s > book on Computer Architecture (A quantitative approach). > > > > I think the only part of Gem5 that I could not get working was the GUI > work. I don’t think it has been updated. > > > > Nick > > > > *From:* Bobby Bruce <bbruce@ucdavis.edu> > *Sent:* Thursday, June 8, 2023 9:07 PM > *To:* The gem5 Users mailing list <gem5-users@gem5.org> > *Cc:* Ayaz Akram <yazakram@ucdavis.edu>; Thiago Rodrigues < > thiagorbss@gmail.com>; Beser, Nicholas D. <Nick.Beser@jhuapl.edu> > *Subject:* Re: [gem5-users] [EXT] Re: Question about running the > hpca-2023 tutorial > > > > *APL external email warning: *Verify sender bbruce@ucdavis.edu before > clicking links or attachments > > > > Sorry for a very late reply, but for the sake of clarification: > > > > Yes, I believe you should have cloned the bootcamp 2022 recurisively. I > think both the issues highlighted in this thread were due to running a > newer version of gem5 on top of older config scripts and resources which > used the older API. > > > > There wasn’t much that went wrong when we used the 2022 Bootcamp repo with > a class of 50 last year. There may be bugs but I don’t think anything > should be glaringly broken. I think we did the gem5 Bootcamp with v22.0 of > gem5, and v22.1 was released in December of last year, so be careful. There > were quite a few API chances between these released. The “Obtain_resources” > change was definitely one. > > > > I’m sorry for all the trouble your having with it. If you run into any > additional problems please reach out to me directly. > > > > -- > Dr. Bobby R. Bruce > Room 3050, > Kemper Hall, UC Davis > Davis, > CA, 95616 > > web: https://www.bobbybruce.net > > > > > On Jun 2, 2023, at 6:02 PM, Beser, Nicholas D. via gem5-users < > gem5-users@gem5.org> wrote: > > > > I installed gem5 prior to downloading the gem5-tutorial-codespace. Is the > correct procedure git clone –recursive > https://github.com/gem5-hpca-2023/gem5-tutorial-codespace? Should I have > done that with the bootcamp 2022? > > > > I use git to manage my class archive, but I normally keep it very simple. > > > > Nick > > > > *From:* Ayaz Akram <yazakram@ucdavis.edu> > *Sent:* Friday, June 2, 2023 6:29 PM > *To:* The gem5 Users mailing list <gem5-users@gem5.org> > *Cc:* Thiago Rodrigues <thiagorbss@gmail.com>; Beser, Nicholas D. < > Nick.Beser@jhuapl.edu> > *Subject:* Re: [gem5-users] Re: [EXT] Re: Question about running the > hpca-2023 tutorial > > > > *APL external email warning: *Verify sender yazakram@ucdavis.edu before > clicking links or attachments > > > > Hi everyone, > > > > The examples from the tutorial repo ( > https://github.com/gem5-hpca-2023/gem5-tutorial-codespace) seem to work > for me with the gem5/gem5-resources versions checked out in that repo. I > basically cloned the entire repo using the --recursive flag. If you are > using a different version of gem5, my guess is that your scripts might need > to be updated because of changes in the standard library. > > > > -Ayaz > > > > > > On Fri, Jun 2, 2023 at 12:28 PM Beser, Nicholas D. via gem5-users < > gem5-users@gem5.org> wrote: > > Thiago, > > > > I have had better luck working through the gem5 bootcamp 2022. I have run > into some odd issues that I would love to compare notes with someone who > knows the gem5 system. Some of the errors have to do with the directory > organization of the gem5-bootcamp-env code from the github. I am running > into python errors that suggest that the code is not able to find the > python files. As an example when I run: > > > > build/X86/gem5.opt > /home/besernd1/gem5-bootcamp-env/materials/using-gem5/02-stdlib/complete/hello-world-with-unique-cache.py > > > > I had to make some changes in the unique_cache_hierarchy_complete.py file > because the python code could not see liCache.py. When I tried to run the > hello-world example, it still does not see the python file. I also have to > explicitly define the path to the customResource file, because it does not > understand the abbreviated directory path provided. > > > > I also ran into a problem with some of the earlier examples. I had to add > a line in front of the m5.instantiate(): > > > > board._pre_instantiate() > > m5.instantiate() > > > > This was not necessary in later examples fro 02-stdlib. > > > > Part of the problem has to do with the tutorial and bootcamp using the > codespaces. I think we need clear instructions on how to do those examples > with the basic gem5 installation. > > > > Nick > > *From:* Thiago Rodrigues via gem5-users <gem5-users@gem5.org> > *Sent:* Thursday, June 1, 2023 11:13 AM > *To:* The gem5 Users mailing list <gem5-users@gem5.org> > *Cc:* Thiago Rodrigues <thiagorbss@gmail.com> > *Subject:* [EXT] [gem5-users] Re: Question about running the hpca-2023 > tutorial > > > > *APL external email warning: *Verify sender > gem5-users-bounces+nick.beser=jhuapl.edu@gem5.org before clicking links > or attachments > > > > Hello, same problem here. > > > > I am using the Ubuntu 22.04 LTS and the latest gem5 stable version. I > followed the HPCA(23) video tutorial and even used the available git > codespace. > > > > I removed the "resource" related code lines and used a variable > -> binary = "path_to_the_benchmark" <- to set the benchmark, and another > error occurred: "Attribute_Error: 'str' object has no attribute > 'get_local_path' in the" -> '(86) set_se_binary_workload.py' -< file > > > > After that I used the get_started scripts (part 1) and the benchmark > worked just fine. > > > > The new Python API is very friendly but I could not use it. > > > > Em qua., 31 de mai. de 2023 às 10:31, Beser, Nicholas D. via gem5-users < > gem5-users@gem5.org> escreveu: > > I was reviewing the tutorial with the hope that I could setup something > similar for a class that I am teaching at Johns Hopkins Whiting School of > Engineering. Is there a way of running this locally on my linux system. I > have gem5 installed, and it runs the basic routines described in the > getting started documentation. When I try to run the tutorial I get the > following error: > > > > ~/gem5$ build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > gem5 Simulator System. https://www.gem5.org > > gem5 is copyrighted software; use the --copyright option for details. > > > > gem5 version 22.1.0.0 > > gem5 compiled May 30 2023 13:05:58 > > gem5 started May 31 2023 09:12:10 > > gem5 executing on besernd1-vm5, pid 862230 > > command line: build/X86/gem5.opt > ../gem5-tutorial-codespace/materials/hello-world.py > > > > ImportError: cannot import name 'obtain_resource' from > 'gem5.resources.resource' (unknown location) > > > > At: > > ../gem5-tutorial-codespace/materials/hello-world.py(6): <module> > > build/X86/python/m5/main.py(597): main > > > > The github link: https://github.com/gem5-hpca-2023/gem5-tutorial-codespace > does not give precise instructions on integrating any changes required > back into gem5. I was wondering if there was a clearer procedure. > > > > Thank-you, > > > > Nick Beser > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org > > > > > -- > > Me. Thiago R. B. S Soares > > Professor do Instituto Federal do Piauí - IFPI > > Campus São Raimundo Nonato > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org > > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >