Discussion:
Multiple Workloads in FS mode.......
(too old to reply)
Amanpreet Kaur
2013-07-07 18:08:29 UTC
Permalink
hello...

I
am new to gem5 and also from electronics background,
so can anybody tell me what is the command for running multiple
applications on multi core or multi-processors for X86 FS mode? like if I
have to run 4
benchmarks on 4 cores than what flags I need to set, or what all changes
I have to make in script file please elaborate bcoz this will help me
to understand it clearly.....also how to confirm that it is working
properly? do I have to see simulation time that it should remain same or
if I will run 8 benchmarks on 4 cores than time should be double,what I
am thinking is correct? please tell me the steps because I am
struggling so much(read documentation,gone through all archive mails) it
would be great if anybody can help me at the earliest.......actually I
tried running commands without making any changes in the source code,
but in the statistics file only one CPU is getting active, so how to
assign workloads to other CPU's ?please tell me which all source file I
have to check out.....

thanks in advance..

Amanpreet kaur
M'tech

IIT Delhi
Zheng Wu
2013-07-09 00:53:14 UTC
Permalink
Hi all,

I am also curious to know the answer to this question.

Thanks

On 2013-07-07, at 2:08 PM, Amanpreet Kaur <***@yahoo.com> wrote:

> hello...
>
> I am new to gem5 and also from electronics background, so can anybody tell me what is the command for running multiple applications on multi core or multi-processors for X86 FS mode? like if I have to run 4 benchmarks on 4 cores than what flags I need to set, or what all changes I have to make in script file please elaborate bcoz this will help me to understand it clearly.....also how to confirm that it is working properly? do I have to see simulation time that it should remain same or if I will run 8 benchmarks on 4 cores than time should be double,what I am thinking is correct? please tell me the steps because I am struggling so much(read documentation,gone through all archive mails) it would be great if anybody can help me at the earliest.......actually I tried running commands without making any changes in the source code, but in the statistics file only one CPU is getting active, so how to assign workloads to other CPU's ?please tell me which all source file I have to check out.....
>
> thanks in advance..
>
> Amanpreet kaur
> M'tech
> IIT Delhi
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Mahshid Sedghi
2013-07-09 16:20:20 UTC
Permalink
Hello,

I am also interested in this topic. I'd appreciate if someone can provide
some insight.

Thanks.


On Mon, Jul 8, 2013 at 8:53 PM, Zheng Wu <***@uwaterloo.ca> wrote:

> Hi all,
>
> I am also curious to know the answer to this question.
>
> Thanks
>
> On 2013-07-07, at 2:08 PM, Amanpreet Kaur <***@yahoo.com>
> wrote:
>
> hello...
>
> I am new to gem5 and also from electronics background, so can anybody tell
> me what is the command for running multiple applications on multi core or
> multi-processors for X86 FS mode? like if I have to run 4 benchmarks on 4
> cores than what flags I need to set, or what all changes I have to make in
> script file please elaborate bcoz this will help me to understand it
> clearly.....also how to confirm that it is working properly? do I have to
> see simulation time that it should remain same or if I will run 8
> benchmarks on 4 cores than time should be double,what I am thinking is
> correct? please tell me the steps because I am struggling so much(read
> documentation,gone through all archive mails) it would be great if anybody
> can help me at the earliest.......actually I tried running commands without
> making any changes in the source code, but in the statistics file only one
> CPU is getting active, so how to assign workloads to other CPU's ?please
> tell me which all source file I have to check out.....
>
> thanks in advance..
>
> Amanpreet kaur
> M'tech
> IIT Delhi
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
Mohammadsadegh Sadri
2013-07-10 11:19:41 UTC
Permalink
Hi, I personally think you are not clear with your question.
gem5 runs on only one CPU core. Now if you have a server, or a cluster or a computer in your university which has N CPU cores and you want to use all of them, you can simply run N instances of gem5 and the OS will put each gem5 on a separate core automatically. Then on each instance of running gem5 , execute a different benchmark and capture statistics and ...
don't worry about port numbers, gem5 will automatically detect another instance of gem5 is running. So it increases the port numbers (for VNC and m5term connection) automatically. Just be careful about the m5out folder, in case you are producing a kind log or saving snapshots , they will all go to one m5out folder which is not good. I personally have created multiple physical copies of gem5 with separate m5out folders and run multiple instances of gem5 on our cluster.

But if your question is, you have created a FS gem5 platform which contains N cores (with -n N option when running gem5) and then you want to run one separate benchmark on every of these cores, then again it shouldn't be a problem since the Linux OS running on your gem5 virtual platform handles this for you automatically. (well at least I am pretty sure for gem5.ARM platform it works fine, for the X86 I have never tried)
also have a look here http://stackoverflow.com/questions/3203831/how-to-specify-a-cpu-core-to-run-a-program-in-linux

________________________________
From: gem5-users-***@gem5.org [gem5-users-***@gem5.org] on behalf of Mahshid Sedghi [***@gmail.com]
Sent: Tuesday, July 09, 2013 6:20 PM
To: gem5 users mailing list
Subject: Re: [gem5-users] Multiple Workloads in FS mode.......

Hello,

I am also interested in this topic. I'd appreciate if someone can provide some insight.

Thanks.


On Mon, Jul 8, 2013 at 8:53 PM, Zheng Wu <***@uwaterloo.ca<mailto:***@uwaterloo.ca>> wrote:
Hi all,

I am also curious to know the answer to this question.

Thanks

On 2013-07-07, at 2:08 PM, Amanpreet Kaur <***@yahoo.com<mailto:***@yahoo.com>> wrote:

hello...

I am new to gem5 and also from electronics background, so can anybody tell me what is the command for running multiple applications on multi core or multi-processors for X86 FS mode? like if I have to run 4 benchmarks on 4 cores than what flags I need to set, or what all changes I have to make in script file please elaborate bcoz this will help me to understand it clearly.....also how to confirm that it is working properly? do I have to see simulation time that it should remain same or if I will run 8 benchmarks on 4 cores than time should be double,what I am thinking is correct? please tell me the steps because I am struggling so much(read documentation,gone through all archive mails) it would be great if anybody can help me at the earliest.......actually I tried running commands without
making any changes in the source code, but in the statistics file only one CPU is getting active, so how to assign workloads to other CPU's ?please tell me which all source file I have to ch
eck out.....

thanks in advance..

Amanpreet kaur
M'tech
IIT Delhi
Zheng Wu
2013-07-10 13:58:53 UTC
Permalink
Hi,

I've the most current version of the gem5 dev code ( change set: 9803:86b426640960) and when I try to compile (scons build/X86/gem5.opt), I get the following errors:

build/X86/mem/cache/tags/base.cc: In member function 'virtual void BaseTags::regStats()':
build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member (did you forget the '&' ?)
build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member (did you forget the '&' ?)
scons: *** [build/X86/mem/cache/tags/base.o] Error 1
scons: building terminated because of errors.

Does anyone else have this problem?

Thanks,
Zheng Wu
Zheng Wu
2013-07-10 14:00:36 UTC
Permalink
Sorry Please Ignore this email…I did something stupid...


On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:

> Hi,
>
> I've the most current version of the gem5 dev code ( change set: 9803:86b426640960) and when I try to compile (scons build/X86/gem5.opt), I get the following errors:
>
> build/X86/mem/cache/tags/base.cc: In member function 'virtual void BaseTags::regStats()':
> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member (did you forget the '&' ?)
> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member (did you forget the '&' ?)
> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
> scons: building terminated because of errors.
>
> Does anyone else have this problem?
>
> Thanks,
> Zheng Wu
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Zheng Wu
2013-07-10 14:18:50 UTC
Permalink
Hi,

I am getting the following errors instead now when I compile (scons build/X86/gem5.debug):

build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does not name a type
build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at end of member declaration
build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')' before 'n'
build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of 'operator+=' as non-function
build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at end of member declaration
build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')' before 'n'
build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of 'operator-=' as non-function
build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at end of member declaration
build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')' before 'n'
build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of 'operator+' as non-function
build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at end of member declaration
build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')' before 'n'
build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of 'operator-' as non-function
build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at end of member declaration
build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')' before 'n'
build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does not name a type
build/X86/python/swig/stats_wrap.cc:3111:23: error: 'SWIG_From_ptrdiff_t' declared as an 'inline' variable
build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was not declared in this scope
build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or ';' before '{' token
build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has not been declared
build/X86/python/swig/stats_wrap.cc: In function 'int SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
build/X86/python/swig/stats_wrap.cc:3168:50: error: expected type-specifier before 'ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>' before 'ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '(' before 'ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was not declared in this scope
build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')' before ';' token
build/X86/python/swig/stats_wrap.cc: At global scope:
build/X86/python/swig/stats_wrap.cc:3862:15: error: 'swig::check_index' declared as an 'inline' variable
build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was not declared in this scope
build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note: 'std::ptrdiff_t'
build/X86/python/swig/stats_wrap.cc:3862:35: error: expected primary-expression before 'size'
build/X86/python/swig/stats_wrap.cc:3862:41: error: expected primary-expression before 'bool'
build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list treated as compound expression in initializer [-fpermissive]
build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or ';' before '{' token
build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at end of input
scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
scons: building terminated because of errors.



On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:

> Sorry Please Ignore this email…I did something stupid...
>
>
> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>
>> Hi,
>>
>> I've the most current version of the gem5 dev code ( change set: 9803:86b426640960) and when I try to compile (scons build/X86/gem5.opt), I get the following errors:
>>
>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void BaseTags::regStats()':
>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member (did you forget the '&' ?)
>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member (did you forget the '&' ?)
>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>> scons: building terminated because of errors.
>>
>> Does anyone else have this problem?
>>
>> Thanks,
>> Zheng Wu
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Andreas Hansson
2013-07-10 16:07:57 UTC
Permalink
What version of gem5 and swig are you using?

On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:

>Hi,
>
>I am getting the following errors instead now when I compile (scons
>build/X86/gem5.debug):
>
>build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does not
>name a type
>build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at end
>of member declaration
>build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')' before
>'n'
>build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>'operator+=' as non-function
>build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at end
>of member declaration
>build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')' before
>'n'
>build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>'operator-=' as non-function
>build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at end
>of member declaration
>build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')' before
>'n'
>build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>'operator+' as non-function
>build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at end
>of member declaration
>build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')' before
>'n'
>build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>'operator-' as non-function
>build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at end
>of member declaration
>build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')' before
>'n'
>build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does not
>name a type
>build/X86/python/swig/stats_wrap.cc:3111:23: error: 'SWIG_From_ptrdiff_t'
>declared as an 'inline' variable
>build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was not
>declared in this scope
>build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested alternatives:
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or ';'
>before '{' token
>build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has not
>been declared
>build/X86/python/swig/stats_wrap.cc: In function 'int
>SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>type-specifier before 'ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>' before
>'ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '(' before
>'ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was not
>declared in this scope
>build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested alternatives:
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')' before
>';' token
>build/X86/python/swig/stats_wrap.cc: At global scope:
>build/X86/python/swig/stats_wrap.cc:3862:15: error: 'swig::check_index'
>declared as an 'inline' variable
>build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was not
>declared in this scope
>build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested alternatives:
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>'std::ptrdiff_t'
>build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>primary-expression before 'size'
>build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>primary-expression before 'bool'
>build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>treated as compound expression in initializer [-fpermissive]
>build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or ';'
>before '{' token
>build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at end
>of input
>scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>scons: building terminated because of errors.
>
>
>
>On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>
>> Sorry Please Ignore this emailŠI did something stupid...
>>
>>
>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>
>>> Hi,
>>>
>>> I've the most current version of the gem5 dev code ( change set:
>>>9803:86b426640960) and when I try to compile (scons
>>>build/X86/gem5.opt), I get the following errors:
>>>
>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>BaseTags::regStats()':
>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member
>>>(did you forget the '&' ?)
>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member
>>>(did you forget the '&' ?)
>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>> scons: building terminated because of errors.
>>>
>>> Does anyone else have this problem?
>>>
>>> Thanks,
>>> Zheng Wu
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>_______________________________________________
>gem5-users mailing list
>gem5-***@gem5.org
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Zheng Wu
2013-07-10 16:10:07 UTC
Permalink
Hi Andreas,

I am using the latest version of gem5 dev (change set: 9803:86b426640960) and SWIG 1.3.40.

Thanks

On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com> wrote:

> What version of gem5 and swig are you using?
>
> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>
>> Hi,
>>
>> I am getting the following errors instead now when I compile (scons
>> build/X86/gem5.debug):
>>
>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does not
>> name a type
>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at end
>> of member declaration
>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')' before
>> 'n'
>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>> 'operator+=' as non-function
>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at end
>> of member declaration
>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')' before
>> 'n'
>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>> 'operator-=' as non-function
>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at end
>> of member declaration
>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')' before
>> 'n'
>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>> 'operator+' as non-function
>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at end
>> of member declaration
>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')' before
>> 'n'
>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>> 'operator-' as non-function
>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at end
>> of member declaration
>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')' before
>> 'n'
>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does not
>> name a type
>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'SWIG_From_ptrdiff_t'
>> declared as an 'inline' variable
>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was not
>> declared in this scope
>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested alternatives:
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or ';'
>> before '{' token
>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has not
>> been declared
>> build/X86/python/swig/stats_wrap.cc: In function 'int
>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>> type-specifier before 'ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>' before
>> 'ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '(' before
>> 'ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was not
>> declared in this scope
>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested alternatives:
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')' before
>> ';' token
>> build/X86/python/swig/stats_wrap.cc: At global scope:
>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'swig::check_index'
>> declared as an 'inline' variable
>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was not
>> declared in this scope
>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested alternatives:
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>> 'std::ptrdiff_t'
>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>> primary-expression before 'size'
>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>> primary-expression before 'bool'
>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>> treated as compound expression in initializer [-fpermissive]
>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or ';'
>> before '{' token
>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at end
>> of input
>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>> scons: building terminated because of errors.
>>
>>
>>
>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>
>>> Sorry Please Ignore this emailŠI did something stupid...
>>>
>>>
>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>
>>>> Hi,
>>>>
>>>> I've the most current version of the gem5 dev code ( change set:
>>>> 9803:86b426640960) and when I try to compile (scons
>>>> build/X86/gem5.opt), I get the following errors:
>>>>
>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>> BaseTags::regStats()':
>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member
>>>> (did you forget the '&' ?)
>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member
>>>> (did you forget the '&' ?)
>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>> scons: building terminated because of errors.
>>>>
>>>> Does anyone else have this problem?
>>>>
>>>> Thanks,
>>>> Zheng Wu
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Andreas Hansson
2013-07-10 16:15:29 UTC
Permalink
I suspect it is the combination of an old version of swig and a recent
version of gcc that is causing the issue. Do you have the possibility of
using swig 2.0.4 by any chance?

Andreas

On 10/07/2013 17:10, "Zheng Wu" <***@uwaterloo.ca> wrote:

>Hi Andreas,
>
>I am using the latest version of gem5 dev (change set: 9803:86b426640960)
>and SWIG 1.3.40.
>
>Thanks
>
>On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com>
>wrote:
>
>> What version of gem5 and swig are you using?
>>
>> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>
>>> Hi,
>>>
>>> I am getting the following errors instead now when I compile (scons
>>> build/X86/gem5.debug):
>>>
>>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does
>>>not
>>> name a type
>>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at end
>>> of member declaration
>>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')' before
>>> 'n'
>>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>>> 'operator+=' as non-function
>>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at end
>>> of member declaration
>>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')' before
>>> 'n'
>>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>>> 'operator-=' as non-function
>>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at end
>>> of member declaration
>>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')' before
>>> 'n'
>>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>>> 'operator+' as non-function
>>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at end
>>> of member declaration
>>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')' before
>>> 'n'
>>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>>> 'operator-' as non-function
>>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at end
>>> of member declaration
>>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')' before
>>> 'n'
>>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does not
>>> name a type
>>> build/X86/python/swig/stats_wrap.cc:3111:23: error:
>>>'SWIG_From_ptrdiff_t'
>>> declared as an 'inline' variable
>>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was not
>>> declared in this scope
>>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested
>>>alternatives:
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or ';'
>>> before '{' token
>>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has not
>>> been declared
>>> build/X86/python/swig/stats_wrap.cc: In function 'int
>>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>>> type-specifier before 'ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>' before
>>> 'ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '(' before
>>> 'ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was not
>>> declared in this scope
>>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested
>>>alternatives:
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')' before
>>> ';' token
>>> build/X86/python/swig/stats_wrap.cc: At global scope:
>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'swig::check_index'
>>> declared as an 'inline' variable
>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was not
>>> declared in this scope
>>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested
>>>alternatives:
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>> 'std::ptrdiff_t'
>>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>>> primary-expression before 'size'
>>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>>> primary-expression before 'bool'
>>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>>> treated as compound expression in initializer [-fpermissive]
>>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or ';'
>>> before '{' token
>>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at end
>>> of input
>>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>>> scons: building terminated because of errors.
>>>
>>>
>>>
>>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>
>>>> Sorry Please Ignore this emailŠI did something stupid...
>>>>
>>>>
>>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've the most current version of the gem5 dev code ( change set:
>>>>> 9803:86b426640960) and when I try to compile (scons
>>>>> build/X86/gem5.opt), I get the following errors:
>>>>>
>>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>>> BaseTags::regStats()':
>>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member
>>>>> (did you forget the '&' ?)
>>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member
>>>>> (did you forget the '&' ?)
>>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>>> scons: building terminated because of errors.
>>>>>
>>>>> Does anyone else have this problem?
>>>>>
>>>>> Thanks,
>>>>> Zheng Wu
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> gem5-***@gem5.org
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>>
>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>confidential and may also be privileged. If you are not the intended
>>recipient, please notify the sender immediately and do not disclose the
>>contents to any other person, use it for any purpose, or store or copy
>>the information in any medium. Thank you.
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>_______________________________________________
>gem5-users mailing list
>gem5-***@gem5.org
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Zheng Wu
2013-07-10 17:27:33 UTC
Permalink
Hi,

I've used this version of SWIG for and older version of gem5 (changeset: 9350:ddb946b131c8) and it works fine. It's just for the most current version of gem5.

I could update my SWIG to 2.0.4 but I also want it to be backward compatible with the older version of gem5, would the new version of swig be a problem for older gem5?

Thanks,
Zheng Wu

On 2013-07-10, at 12:15 PM, Andreas Hansson <***@arm.com> wrote:

> I suspect it is the combination of an old version of swig and a recent
> version of gcc that is causing the issue. Do you have the possibility of
> using swig 2.0.4 by any chance?
>
> Andreas
>
> On 10/07/2013 17:10, "Zheng Wu" <***@uwaterloo.ca> wrote:
>
>> Hi Andreas,
>>
>> I am using the latest version of gem5 dev (change set: 9803:86b426640960)
>> and SWIG 1.3.40.
>>
>> Thanks
>>
>> On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com>
>> wrote:
>>
>>> What version of gem5 and swig are you using?
>>>
>>> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am getting the following errors instead now when I compile (scons
>>>> build/X86/gem5.debug):
>>>>
>>>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does
>>>> not
>>>> name a type
>>>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at end
>>>> of member declaration
>>>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')' before
>>>> 'n'
>>>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>>>> 'operator+=' as non-function
>>>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at end
>>>> of member declaration
>>>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')' before
>>>> 'n'
>>>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>>>> 'operator-=' as non-function
>>>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at end
>>>> of member declaration
>>>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')' before
>>>> 'n'
>>>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>>>> 'operator+' as non-function
>>>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at end
>>>> of member declaration
>>>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')' before
>>>> 'n'
>>>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>>>> 'operator-' as non-function
>>>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at end
>>>> of member declaration
>>>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')' before
>>>> 'n'
>>>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does not
>>>> name a type
>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error:
>>>> 'SWIG_From_ptrdiff_t'
>>>> declared as an 'inline' variable
>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was not
>>>> declared in this scope
>>>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested
>>>> alternatives:
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or ';'
>>>> before '{' token
>>>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has not
>>>> been declared
>>>> build/X86/python/swig/stats_wrap.cc: In function 'int
>>>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>>>> type-specifier before 'ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>' before
>>>> 'ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '(' before
>>>> 'ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was not
>>>> declared in this scope
>>>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested
>>>> alternatives:
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')' before
>>>> ';' token
>>>> build/X86/python/swig/stats_wrap.cc: At global scope:
>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'swig::check_index'
>>>> declared as an 'inline' variable
>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was not
>>>> declared in this scope
>>>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested
>>>> alternatives:
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
>>>> 'std::ptrdiff_t'
>>>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>>>> primary-expression before 'size'
>>>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>>>> primary-expression before 'bool'
>>>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>>>> treated as compound expression in initializer [-fpermissive]
>>>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or ';'
>>>> before '{' token
>>>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at end
>>>> of input
>>>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>>>> scons: building terminated because of errors.
>>>>
>>>>
>>>>
>>>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>
>>>>> Sorry Please Ignore this emailŠI did something stupid...
>>>>>
>>>>>
>>>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've the most current version of the gem5 dev code ( change set:
>>>>>> 9803:86b426640960) and when I try to compile (scons
>>>>>> build/X86/gem5.opt), I get the following errors:
>>>>>>
>>>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>>>> BaseTags::regStats()':
>>>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of member
>>>>>> (did you forget the '&' ?)
>>>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of member
>>>>>> (did you forget the '&' ?)
>>>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>>>> scons: building terminated because of errors.
>>>>>>
>>>>>> Does anyone else have this problem?
>>>>>>
>>>>>> Thanks,
>>>>>> Zheng Wu
>>>>>> _______________________________________________
>>>>>> gem5-users mailing list
>>>>>> gem5-***@gem5.org
>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> gem5-***@gem5.org
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>
>>>
>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>> confidential and may also be privileged. If you are not the intended
>>> recipient, please notify the sender immediately and do not disclose the
>>> contents to any other person, use it for any purpose, or store or copy
>>> the information in any medium. Thank you.
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Andreas Hansson
2013-07-10 17:43:11 UTC
Permalink
I just noticed that we solved this for the SimObject but not the stats
wrapper. Could you try adding:

#include <cstddef>
using std::ptrdiff_t;

to src/python/swig/stats.i.

Thanks,

Andreas

On 10/07/2013 18:27, "Zheng Wu" <***@uwaterloo.ca> wrote:

>Hi,
>
>I've used this version of SWIG for and older version of gem5 (changeset:
> 9350:ddb946b131c8) and it works fine. It's just for the most current
>version of gem5.
>
>I could update my SWIG to 2.0.4 but I also want it to be backward
>compatible with the older version of gem5, would the new version of swig
>be a problem for older gem5?
>
>Thanks,
>Zheng Wu
>
>On 2013-07-10, at 12:15 PM, Andreas Hansson <***@arm.com>
>wrote:
>
>> I suspect it is the combination of an old version of swig and a recent
>> version of gcc that is causing the issue. Do you have the possibility of
>> using swig 2.0.4 by any chance?
>>
>> Andreas
>>
>> On 10/07/2013 17:10, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>
>>> Hi Andreas,
>>>
>>> I am using the latest version of gem5 dev (change set:
>>>9803:86b426640960)
>>> and SWIG 1.3.40.
>>>
>>> Thanks
>>>
>>> On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com>
>>> wrote:
>>>
>>>> What version of gem5 and swig are you using?
>>>>
>>>> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am getting the following errors instead now when I compile (scons
>>>>> build/X86/gem5.debug):
>>>>>
>>>>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does
>>>>> not
>>>>> name a type
>>>>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at
>>>>>end
>>>>> of member declaration
>>>>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')'
>>>>>before
>>>>> 'n'
>>>>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>>>>> 'operator+=' as non-function
>>>>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at
>>>>>end
>>>>> of member declaration
>>>>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')'
>>>>>before
>>>>> 'n'
>>>>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>>>>> 'operator-=' as non-function
>>>>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at
>>>>>end
>>>>> of member declaration
>>>>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')'
>>>>>before
>>>>> 'n'
>>>>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>>>>> 'operator+' as non-function
>>>>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at
>>>>>end
>>>>> of member declaration
>>>>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')'
>>>>>before
>>>>> 'n'
>>>>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>>>>> 'operator-' as non-function
>>>>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at
>>>>>end
>>>>> of member declaration
>>>>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')'
>>>>>before
>>>>> 'n'
>>>>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does
>>>>>not
>>>>> name a type
>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error:
>>>>> 'SWIG_From_ptrdiff_t'
>>>>> declared as an 'inline' variable
>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was
>>>>>not
>>>>> declared in this scope
>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested
>>>>> alternatives:
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or
>>>>>';'
>>>>> before '{' token
>>>>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has
>>>>>not
>>>>> been declared
>>>>> build/X86/python/swig/stats_wrap.cc: In function 'int
>>>>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>>>>> type-specifier before 'ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>'
>>>>>before
>>>>> 'ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '('
>>>>>before
>>>>> 'ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was
>>>>>not
>>>>> declared in this scope
>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested
>>>>> alternatives:
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')'
>>>>>before
>>>>> ';' token
>>>>> build/X86/python/swig/stats_wrap.cc: At global scope:
>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error:
>>>>>'swig::check_index'
>>>>> declared as an 'inline' variable
>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was
>>>>>not
>>>>> declared in this scope
>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested
>>>>> alternatives:
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>note:
>>>>> 'std::ptrdiff_t'
>>>>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>>>>> primary-expression before 'size'
>>>>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>>>>> primary-expression before 'bool'
>>>>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>>>>> treated as compound expression in initializer [-fpermissive]
>>>>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or
>>>>>';'
>>>>> before '{' token
>>>>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at
>>>>>end
>>>>> of input
>>>>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>>>>> scons: building terminated because of errors.
>>>>>
>>>>>
>>>>>
>>>>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>
>>>>>> Sorry Please Ignore this emailŠI did something stupid...
>>>>>>
>>>>>>
>>>>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've the most current version of the gem5 dev code ( change set:
>>>>>>> 9803:86b426640960) and when I try to compile (scons
>>>>>>> build/X86/gem5.opt), I get the following errors:
>>>>>>>
>>>>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>>>>> BaseTags::regStats()':
>>>>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of
>>>>>>>member
>>>>>>> (did you forget the '&' ?)
>>>>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of
>>>>>>>member
>>>>>>> (did you forget the '&' ?)
>>>>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>>>>> scons: building terminated because of errors.
>>>>>>>
>>>>>>> Does anyone else have this problem?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Zheng Wu
>>>>>>> _______________________________________________
>>>>>>> gem5-users mailing list
>>>>>>> gem5-***@gem5.org
>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>
>>>>>> _______________________________________________
>>>>>> gem5-users mailing list
>>>>>> gem5-***@gem5.org
>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> gem5-***@gem5.org
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>>
>>>>
>>>> -- IMPORTANT NOTICE: The contents of this email and any attachments
>>>>are
>>>> confidential and may also be privileged. If you are not the intended
>>>> recipient, please notify the sender immediately and do not disclose
>>>>the
>>>> contents to any other person, use it for any purpose, or store or copy
>>>> the information in any medium. Thank you.
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>>
>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>confidential and may also be privileged. If you are not the intended
>>recipient, please notify the sender immediately and do not disclose the
>>contents to any other person, use it for any purpose, or store or copy
>>the information in any medium. Thank you.
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>_______________________________________________
>gem5-users mailing list
>gem5-***@gem5.org
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Zheng Wu
2013-07-10 17:47:21 UTC
Permalink
Hi,

I am not too familiar with how the swig *.i files work, where should I add the changes?

Right at the top before: %module(package="m5.internal") stats ??

Thanks,
Zheng

On 2013-07-10, at 1:43 PM, Andreas Hansson <***@arm.com> wrote:

> I just noticed that we solved this for the SimObject but not the stats
> wrapper. Could you try adding:
>
> #include <cstddef>
> using std::ptrdiff_t;
>
> to src/python/swig/stats.i.
>
> Thanks,
>
> Andreas
>
> On 10/07/2013 18:27, "Zheng Wu" <***@uwaterloo.ca> wrote:
>
>> Hi,
>>
>> I've used this version of SWIG for and older version of gem5 (changeset:
>> 9350:ddb946b131c8) and it works fine. It's just for the most current
>> version of gem5.
>>
>> I could update my SWIG to 2.0.4 but I also want it to be backward
>> compatible with the older version of gem5, would the new version of swig
>> be a problem for older gem5?
>>
>> Thanks,
>> Zheng Wu
>>
>> On 2013-07-10, at 12:15 PM, Andreas Hansson <***@arm.com>
>> wrote:
>>
>>> I suspect it is the combination of an old version of swig and a recent
>>> version of gcc that is causing the issue. Do you have the possibility of
>>> using swig 2.0.4 by any chance?
>>>
>>> Andreas
>>>
>>> On 10/07/2013 17:10, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>
>>>> Hi Andreas,
>>>>
>>>> I am using the latest version of gem5 dev (change set:
>>>> 9803:86b426640960)
>>>> and SWIG 1.3.40.
>>>>
>>>> Thanks
>>>>
>>>> On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com>
>>>> wrote:
>>>>
>>>>> What version of gem5 and swig are you using?
>>>>>
>>>>> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am getting the following errors instead now when I compile (scons
>>>>>> build/X86/gem5.debug):
>>>>>>
>>>>>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does
>>>>>> not
>>>>>> name a type
>>>>>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at
>>>>>> end
>>>>>> of member declaration
>>>>>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')'
>>>>>> before
>>>>>> 'n'
>>>>>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>>>>>> 'operator+=' as non-function
>>>>>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at
>>>>>> end
>>>>>> of member declaration
>>>>>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')'
>>>>>> before
>>>>>> 'n'
>>>>>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>>>>>> 'operator-=' as non-function
>>>>>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at
>>>>>> end
>>>>>> of member declaration
>>>>>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')'
>>>>>> before
>>>>>> 'n'
>>>>>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>>>>>> 'operator+' as non-function
>>>>>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at
>>>>>> end
>>>>>> of member declaration
>>>>>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')'
>>>>>> before
>>>>>> 'n'
>>>>>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>>>>>> 'operator-' as non-function
>>>>>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at
>>>>>> end
>>>>>> of member declaration
>>>>>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')'
>>>>>> before
>>>>>> 'n'
>>>>>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does
>>>>>> not
>>>>>> name a type
>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error:
>>>>>> 'SWIG_From_ptrdiff_t'
>>>>>> declared as an 'inline' variable
>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was
>>>>>> not
>>>>>> declared in this scope
>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested
>>>>>> alternatives:
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or
>>>>>> ';'
>>>>>> before '{' token
>>>>>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has
>>>>>> not
>>>>>> been declared
>>>>>> build/X86/python/swig/stats_wrap.cc: In function 'int
>>>>>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>>>>>> type-specifier before 'ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>'
>>>>>> before
>>>>>> 'ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '('
>>>>>> before
>>>>>> 'ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was
>>>>>> not
>>>>>> declared in this scope
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested
>>>>>> alternatives:
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')'
>>>>>> before
>>>>>> ';' token
>>>>>> build/X86/python/swig/stats_wrap.cc: At global scope:
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error:
>>>>>> 'swig::check_index'
>>>>>> declared as an 'inline' variable
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was
>>>>>> not
>>>>>> declared in this scope
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested
>>>>>> alternatives:
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>> note:
>>>>>> 'std::ptrdiff_t'
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>>>>>> primary-expression before 'size'
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>>>>>> primary-expression before 'bool'
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>>>>>> treated as compound expression in initializer [-fpermissive]
>>>>>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or
>>>>>> ';'
>>>>>> before '{' token
>>>>>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at
>>>>>> end
>>>>>> of input
>>>>>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>>>>>> scons: building terminated because of errors.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>>
>>>>>>> Sorry Please Ignore this emailŠI did something stupid...
>>>>>>>
>>>>>>>
>>>>>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I've the most current version of the gem5 dev code ( change set:
>>>>>>>> 9803:86b426640960) and when I try to compile (scons
>>>>>>>> build/X86/gem5.opt), I get the following errors:
>>>>>>>>
>>>>>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>>>>>> BaseTags::regStats()':
>>>>>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of
>>>>>>>> member
>>>>>>>> (did you forget the '&' ?)
>>>>>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of
>>>>>>>> member
>>>>>>>> (did you forget the '&' ?)
>>>>>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>>>>>> scons: building terminated because of errors.
>>>>>>>>
>>>>>>>> Does anyone else have this problem?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Zheng Wu
>>>>>>>> _______________________________________________
>>>>>>>> gem5-users mailing list
>>>>>>>> gem5-***@gem5.org
>>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gem5-users mailing list
>>>>>>> gem5-***@gem5.org
>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>
>>>>>> _______________________________________________
>>>>>> gem5-users mailing list
>>>>>> gem5-***@gem5.org
>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>
>>>>>
>>>>>
>>>>> -- IMPORTANT NOTICE: The contents of this email and any attachments
>>>>> are
>>>>> confidential and may also be privileged. If you are not the intended
>>>>> recipient, please notify the sender immediately and do not disclose
>>>>> the
>>>>> contents to any other person, use it for any purpose, or store or copy
>>>>> the information in any medium. Thank you.
>>>>>
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> gem5-***@gem5.org
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>
>>>
>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>> confidential and may also be privileged. If you are not the intended
>>> recipient, please notify the sender immediately and do not disclose the
>>> contents to any other person, use it for any purpose, or store or copy
>>> the information in any medium. Thank you.
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Zheng Wu
2013-07-11 16:55:23 UTC
Permalink
Hi,

I've fixed the compilation problem by updating SWIG to version 2.0.4

Thanks

On 2013-07-10, at 1:47 PM, Zheng Wu <***@uwaterloo.ca> wrote:

> Hi,
>
> I am not too familiar with how the swig *.i files work, where should I add the changes?
>
> Right at the top before: %module(package="m5.internal") stats ??
>
> Thanks,
> Zheng
>
> On 2013-07-10, at 1:43 PM, Andreas Hansson <***@arm.com> wrote:
>
>> I just noticed that we solved this for the SimObject but not the stats
>> wrapper. Could you try adding:
>>
>> #include <cstddef>
>> using std::ptrdiff_t;
>>
>> to src/python/swig/stats.i.
>>
>> Thanks,
>>
>> Andreas
>>
>> On 10/07/2013 18:27, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>
>>> Hi,
>>>
>>> I've used this version of SWIG for and older version of gem5 (changeset:
>>> 9350:ddb946b131c8) and it works fine. It's just for the most current
>>> version of gem5.
>>>
>>> I could update my SWIG to 2.0.4 but I also want it to be backward
>>> compatible with the older version of gem5, would the new version of swig
>>> be a problem for older gem5?
>>>
>>> Thanks,
>>> Zheng Wu
>>>
>>> On 2013-07-10, at 12:15 PM, Andreas Hansson <***@arm.com>
>>> wrote:
>>>
>>>> I suspect it is the combination of an old version of swig and a recent
>>>> version of gcc that is causing the issue. Do you have the possibility of
>>>> using swig 2.0.4 by any chance?
>>>>
>>>> Andreas
>>>>
>>>> On 10/07/2013 17:10, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>>
>>>>> Hi Andreas,
>>>>>
>>>>> I am using the latest version of gem5 dev (change set:
>>>>> 9803:86b426640960)
>>>>> and SWIG 1.3.40.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On 2013-07-10, at 12:07 PM, Andreas Hansson <***@arm.com>
>>>>> wrote:
>>>>>
>>>>>> What version of gem5 and swig are you using?
>>>>>>
>>>>>> On 10/07/2013 15:18, "Zheng Wu" <***@uwaterloo.ca> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am getting the following errors instead now when I compile (scons
>>>>>>> build/X86/gem5.debug):
>>>>>>>
>>>>>>> build/X86/python/swig/stats_wrap.cc:2883:13: error: 'ptrdiff_t' does
>>>>>>> not
>>>>>>> name a type
>>>>>>> build/X86/python/swig/stats_wrap.cc:2920:21: error: expected ';' at
>>>>>>> end
>>>>>>> of member declaration
>>>>>>> build/X86/python/swig/stats_wrap.cc:2920:39: error: expected ')'
>>>>>>> before
>>>>>>> 'n'
>>>>>>> build/X86/python/swig/stats_wrap.cc:2935:34: error: declaration of
>>>>>>> 'operator+=' as non-function
>>>>>>> build/X86/python/swig/stats_wrap.cc:2935:30: error: expected ';' at
>>>>>>> end
>>>>>>> of member declaration
>>>>>>> build/X86/python/swig/stats_wrap.cc:2935:44: error: expected ')'
>>>>>>> before
>>>>>>> 'n'
>>>>>>> build/X86/python/swig/stats_wrap.cc:2940:34: error: declaration of
>>>>>>> 'operator-=' as non-function
>>>>>>> build/X86/python/swig/stats_wrap.cc:2940:30: error: expected ';' at
>>>>>>> end
>>>>>>> of member declaration
>>>>>>> build/X86/python/swig/stats_wrap.cc:2940:44: error: expected ')'
>>>>>>> before
>>>>>>> 'n'
>>>>>>> build/X86/python/swig/stats_wrap.cc:2945:33: error: declaration of
>>>>>>> 'operator+' as non-function
>>>>>>> build/X86/python/swig/stats_wrap.cc:2945:30: error: expected ';' at
>>>>>>> end
>>>>>>> of member declaration
>>>>>>> build/X86/python/swig/stats_wrap.cc:2945:43: error: expected ')'
>>>>>>> before
>>>>>>> 'n'
>>>>>>> build/X86/python/swig/stats_wrap.cc:2950:33: error: declaration of
>>>>>>> 'operator-' as non-function
>>>>>>> build/X86/python/swig/stats_wrap.cc:2950:30: error: expected ';' at
>>>>>>> end
>>>>>>> of member declaration
>>>>>>> build/X86/python/swig/stats_wrap.cc:2950:43: error: expected ')'
>>>>>>> before
>>>>>>> 'n'
>>>>>>> build/X86/python/swig/stats_wrap.cc:2955:5: error: 'ptrdiff_t' does
>>>>>>> not
>>>>>>> name a type
>>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error:
>>>>>>> 'SWIG_From_ptrdiff_t'
>>>>>>> declared as an 'inline' variable
>>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: error: 'ptrdiff_t' was
>>>>>>> not
>>>>>>> declared in this scope
>>>>>>> build/X86/python/swig/stats_wrap.cc:3111:23: note: suggested
>>>>>>> alternatives:
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3112:1: error: expected ',' or
>>>>>>> ';'
>>>>>>> before '{' token
>>>>>>> build/X86/python/swig/stats_wrap.cc:3164:39: error: 'ptrdiff_t' has
>>>>>>> not
>>>>>>> been declared
>>>>>>> build/X86/python/swig/stats_wrap.cc: In function 'int
>>>>>>> SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected
>>>>>>> type-specifier before 'ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '>'
>>>>>>> before
>>>>>>> 'ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: expected '('
>>>>>>> before
>>>>>>> 'ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: error: 'ptrdiff_t' was
>>>>>>> not
>>>>>>> declared in this scope
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:50: note: suggested
>>>>>>> alternatives:
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3168:64: error: expected ')'
>>>>>>> before
>>>>>>> ';' token
>>>>>>> build/X86/python/swig/stats_wrap.cc: At global scope:
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error:
>>>>>>> 'swig::check_index'
>>>>>>> declared as an 'inline' variable
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: error: 'ptrdiff_t' was
>>>>>>> not
>>>>>>> declared in this scope
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:15: note: suggested
>>>>>>> alternatives:
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28:
>>>>>>> note:
>>>>>>> 'std::ptrdiff_t'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:35: error: expected
>>>>>>> primary-expression before 'size'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:41: error: expected
>>>>>>> primary-expression before 'bool'
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:60: error: expression list
>>>>>>> treated as compound expression in initializer [-fpermissive]
>>>>>>> build/X86/python/swig/stats_wrap.cc:3862:62: error: expected ',' or
>>>>>>> ';'
>>>>>>> before '{' token
>>>>>>> build/X86/python/swig/stats_wrap.cc:17818:1: error: expected '}' at
>>>>>>> end
>>>>>>> of input
>>>>>>> scons: *** [build/X86/python/swig/stats_wrap.do] Error 1
>>>>>>> scons: building terminated because of errors.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 2013-07-10, at 10:00 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>>>
>>>>>>>> Sorry Please Ignore this emailŠI did something stupid...
>>>>>>>>
>>>>>>>>
>>>>>>>> On 2013-07-10, at 9:58 AM, Zheng Wu <***@uwaterloo.ca> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I've the most current version of the gem5 dev code ( change set:
>>>>>>>>> 9803:86b426640960) and when I try to compile (scons
>>>>>>>>> build/X86/gem5.opt), I get the following errors:
>>>>>>>>>
>>>>>>>>> build/X86/mem/cache/tags/base.cc: In member function 'virtual void
>>>>>>>>> BaseTags::regStats()':
>>>>>>>>> build/X86/mem/cache/tags/base.cc:95:25: error: invalid use of
>>>>>>>>> member
>>>>>>>>> (did you forget the '&' ?)
>>>>>>>>> build/X86/mem/cache/tags/base.cc:100:22: error: invalid use of
>>>>>>>>> member
>>>>>>>>> (did you forget the '&' ?)
>>>>>>>>> scons: *** [build/X86/mem/cache/tags/base.o] Error 1
>>>>>>>>> scons: building terminated because of errors.
>>>>>>>>>
>>>>>>>>> Does anyone else have this problem?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Zheng Wu
>>>>>>>>> _______________________________________________
>>>>>>>>> gem5-users mailing list
>>>>>>>>> gem5-***@gem5.org
>>>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> gem5-users mailing list
>>>>>>>> gem5-***@gem5.org
>>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gem5-users mailing list
>>>>>>> gem5-***@gem5.org
>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- IMPORTANT NOTICE: The contents of this email and any attachments
>>>>>> are
>>>>>> confidential and may also be privileged. If you are not the intended
>>>>>> recipient, please notify the sender immediately and do not disclose
>>>>>> the
>>>>>> contents to any other person, use it for any purpose, or store or copy
>>>>>> the information in any medium. Thank you.
>>>>>>
>>>>>> _______________________________________________
>>>>>> gem5-users mailing list
>>>>>> gem5-***@gem5.org
>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> gem5-***@gem5.org
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>>
>>>>
>>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>>> confidential and may also be privileged. If you are not the intended
>>>> recipient, please notify the sender immediately and do not disclose the
>>>> contents to any other person, use it for any purpose, or store or copy
>>>> the information in any medium. Thank you.
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> gem5-***@gem5.org
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-***@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>>
>> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-***@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Mahshid Sedghi
2013-07-11 01:29:36 UTC
Permalink
Hi Mohammadsadegh,
*
*
I think he is talking about the second scenario, which is in fact
multiprogramming. At least this is what I am trying
to do. I need to run several benchmarks on a CMP, such that each benchmark
runs on one or two cores. It seem
pretty straightforward in SE mode, but since my benchmarks are
multi-threaded, I need to run in FS mode. So,
I am not sure how to do this. So, can you please give some hints about how
to do this?

Thanks.


On Wed, Jul 10, 2013 at 7:19 AM, Mohammadsadegh Sadri <
***@unibo.it> wrote:

> Hi, I personally think you are not clear with your question.
> gem5 runs on only one CPU core. Now if you have a server, or a cluster or
> a computer in your university which has N CPU cores and you want to use all
> of them, you can simply run N instances of gem5 and the OS will put each
> gem5 on a separate core automatically. Then on each instance of running
> gem5 , execute a different benchmark and capture statistics and ...
> don't worry about port numbers, gem5 will automatically detect another
> instance of gem5 is running. So it increases the port numbers (for VNC and
> m5term connection) automatically. Just be careful about the m5out folder,
> in case you are producing a kind log or saving snapshots , they will all go
> to one m5out folder which is not good. I personally have created multiple
> physical copies of gem5 with separate m5out folders and run multiple
> instances of gem5 on our cluster.
>
> But if your question is, you have created a FS gem5 platform which
> contains N cores (with -n N option when running gem5) and then you want to
> run one separate benchmark on every of these cores, then again it shouldn't
> be a problem since the Linux OS running on your gem5 virtual platform
> handles this for you automatically. (well at least I am pretty sure for
> gem5.ARM platform it works fine, for the X86 I have never tried)
> also have a look here
> http://stackoverflow.com/questions/3203831/how-to-specify-a-cpu-core-to-run-a-program-in-linux
>
> ________________________________
> From: gem5-users-***@gem5.org [gem5-users-***@gem5.org] on behalf
> of Mahshid Sedghi [***@gmail.com]
> Sent: Tuesday, July 09, 2013 6:20 PM
> To: gem5 users mailing list
> Subject: Re: [gem5-users] Multiple Workloads in FS mode.......
>
> Hello,
>
> I am also interested in this topic. I'd appreciate if someone can provide
> some insight.
>
> Thanks.
>
>
> On Mon, Jul 8, 2013 at 8:53 PM, Zheng Wu <***@uwaterloo.ca<mailto:
> ***@uwaterloo.ca>> wrote:
> Hi all,
>
> I am also curious to know the answer to this question.
>
> Thanks
>
> On 2013-07-07, at 2:08 PM, Amanpreet Kaur <***@yahoo.com
> <mailto:***@yahoo.com>> wrote:
>
> hello...
>
> I am new to gem5 and also from electronics background, so can anybody tell
> me what is the command for running multiple applications on multi core or
> multi-processors for X86 FS mode? like if I have to run 4 benchmarks on 4
> cores than what flags I need to set, or what all changes I have to make in
> script file please elaborate bcoz this will help me to understand it
> clearly.....also how to confirm that it is working properly? do I have to
> see simulation time that it should remain same or if I will run 8
> benchmarks on 4 cores than time should be double,what I am thinking is
> correct? please tell me the steps because I am struggling so much(read
> documentation,gone through all archive mails) it would be great if anybody
> can help me at the earliest.......actually I tried running commands without
> making any changes in the source code, but in the statistics file only one
> CPU is getting active, so how to assign workloads to other CPU's ?please
> tell me which all source file I have to ch
> eck out.....
>
> thanks in advance..
>
> Amanpreet kaur
> M'tech
> IIT Delhi
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org<mailto:gem5-***@gem5.org>
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org<mailto:gem5-***@gem5.org>
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-***@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
Continue reading on narkive:
Loading...