It could be a gcc version issue (it wouldn't be the first time). pow expects its first argument to be a floating point value, and it's not clear which one you want when the first argument is actually an int. If you cast it to particular type of float explicitly, then gcc should be happy. I suggest a double to avoid rounding issues.
http://www.cplusplus.com/reference/clibrary/cmath/pow/ Gabe On 03/22/11 22:45, Tushar Krishna wrote: > Hi all, > I didn't (and still don't) see any errors in networktest.cc when I > built m5 on my own computer for both SE and FS modes before checking > in the patch. > Could it be a gcc version issue? > > The error which the regression tester points to is > > build/ARM_FS/cpu/testers/networktest/networktest.cc:194: error: call > of overloaded 'pow(int, int&)' is ambiguous > > The line which is giving the error is: > int injRange = pow(10, precision); > > precision is an input parameter. > > I just want to raise 10 to an input integer value. Is there any other > way I should use to do this? > > What is the regression test that I should run to reproduce the errors > and warnings? > > Thanks, > Tushar > > > On 3/23/2011 9:49 AM, m5-dev-requ...@m5sim.org wrote: >> Send m5-dev mailing list submissions to >> m5-dev@m5sim.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://m5sim.org/mailman/listinfo/m5-dev >> or, via email, send a message with subject or body 'help' to >> m5-dev-requ...@m5sim.org >> >> You can reach the person managing the list at >> m5-dev-ow...@m5sim.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of m5-dev digest..." >> >> >> Today's Topics: >> >> 1. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression >> quick >> (Gabriel Michael Black) >> 2. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression quick >> (Nilay Vaish) >> 3. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression quick >> (nathan binkert) >> 4. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression quick >> (Nilay Vaish) >> 5. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression quick >> (Gabe Black) >> 6. Re: Cron<m5test@zizzer> /z/m5/regression/do-regression quick >> (Beckmann, Brad) >> 7. Ruby random tester failing with MESI_CMP_directory? >> (Arkaprava Basu) >> 8. Re: Ruby random tester failing with MESI_CMP_directory? (Nilay) >> 9. Re: Ruby random tester failing with MESI_CMP_directory? (Lisa >> Hsu) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Tue, 22 Mar 2011 14:47:42 -0400 >> From: Gabriel Michael Black<gbl...@eecs.umich.edu> >> To: m5-dev@m5sim.org >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID:<20110322144742.201251r4bqtec...@mail.eecs.umich.edu> >> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; >> format="flowed" >> >> The two issues below are copied from ARM_FS, but other targets had the >> same problems. >> >> These errors are making the build fail. >> >> build/ARM_FS/cpu/testers/networktest/networktest.cc: In member >> function 'void NetworkTest::completeRequest(Packet*)': >> build/ARM_FS/cpu/testers/networktest/networktest.cc:160: warning: >> unused variable 'req' >> build/ARM_FS/cpu/testers/networktest/networktest.cc: In member >> function 'void NetworkTest::tick()': >> build/ARM_FS/cpu/testers/networktest/networktest.cc:194: error: call >> of overloaded 'pow(int, int&)' is ambiguous >> >> >> These warnings should probably be cleaned up too, although I don't >> know how long they've been there or how hard that would be. >> >> build/ARM_FS/mem/ruby/system/Sequencer.cc: In member function 'void >> Sequencer::issueRequest(const RubyRequest&)': >> build/ARM_FS/mem/ruby/system/Sequencer.cc:616: warning: 'ctype' may be >> used uninitialized in this function >> build/ARM_FS/mem/ruby/system/Sequencer.cc:653: warning: 'amtype' may >> be used uninitialized in this function >> >> Quoting Cron Daemon<r...@zizzer.eecs.umich.edu>: >> >>> scons: *** [build/ALPHA_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** >>> [build/ALPHA_SE_MOESI_hammer/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** >>> [build/ALPHA_SE_MESI_CMP_directory/cpu/testers/networktest/networktest.fo] >>> >>> Error 1 >>> scons: *** >>> [build/ALPHA_SE_MOESI_CMP_directory/cpu/testers/networktest/networktest.fo] >>> >>> Error 1 >>> scons: *** >>> [build/ALPHA_SE_MOESI_CMP_token/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/ALPHA_FS/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/MIPS_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/POWER_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/SPARC_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/X86_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/X86_FS/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/ARM_SE/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> scons: *** [build/ARM_FS/cpu/testers/networktest/networktest.fo] >>> Error 1 >>> >>> See /z/m5/regression/regress-2011-03-22-03:00:01 for details. >>> >>> _______________________________________________ >>> m5-dev mailing list >>> m5-dev@m5sim.org >>> http://m5sim.org/mailman/listinfo/m5-dev >>> >> >> >> >> ------------------------------ >> >> Message: 2 >> Date: Tue, 22 Mar 2011 14:33:58 -0500 (CDT) >> From: Nilay Vaish<ni...@cs.wisc.edu> >> To: M5 Developer List<m5-dev@m5sim.org> >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID:<pine.lnx.4.64.1103221432390.6...@scamorza.cs.wisc.edu> >> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed >> >> On Tue, 22 Mar 2011, Gabriel Michael Black wrote: >> >>> The two issues below are copied from ARM_FS, but other targets had >>> the same >>> problems. >>> >>> These errors are making the build fail. >>> >>> build/ARM_FS/cpu/testers/networktest/networktest.cc: In member >>> function 'void >>> NetworkTest::completeRequest(Packet*)': >>> build/ARM_FS/cpu/testers/networktest/networktest.cc:160: warning: >>> unused >>> variable 'req' >>> build/ARM_FS/cpu/testers/networktest/networktest.cc: In member >>> function 'void >>> NetworkTest::tick()': >>> build/ARM_FS/cpu/testers/networktest/networktest.cc:194: error: call of >>> overloaded 'pow(int, int&)' is ambiguous >>> >>> >>> These warnings should probably be cleaned up too, although I don't >>> know how >>> long they've been there or how hard that would be. >>> >> The warnings related to networktest.cc got added yesterday. >> >> >> >>> build/ARM_FS/mem/ruby/system/Sequencer.cc: In member function 'void >>> Sequencer::issueRequest(const RubyRequest&)': >>> build/ARM_FS/mem/ruby/system/Sequencer.cc:616: warning: 'ctype' may >>> be used >>> uninitialized in this function >>> build/ARM_FS/mem/ruby/system/Sequencer.cc:653: warning: 'amtype' may >>> be used >>> uninitialized in this function >>> >> These I think have been around for quite a while. >> >> -- >> Nilay >> >> >> ------------------------------ >> >> Message: 3 >> Date: Tue, 22 Mar 2011 12:40:51 -0700 >> From: nathan binkert<n...@binkert.org> >> To: M5 Developer List<m5-dev@m5sim.org> >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID: >> <AANLkTi=chbagxdwivc3e26zjvrondx8y9hr9mbobg...@mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >>> The warnings related to networktest.cc got added yesterday. >> .... >> >>> These I think have been around for quite a while. >> Either way, we should be eliminating warnings. >> >> Nate >> >> >> ------------------------------ >> >> Message: 4 >> Date: Tue, 22 Mar 2011 14:46:42 -0500 (CDT) >> From: Nilay Vaish<ni...@cs.wisc.edu> >> To: m5-dev@m5sim.org >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID:<pine.lnx.4.64.1103221444570.6...@scamorza.cs.wisc.edu> >> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed >> >> On Tue, 22 Mar 2011, nathan binkert wrote: >> >>>> The warnings related to networktest.cc got added yesterday. >> Tushar should take care of the warnings related to networktest.cc. >> >>> .... >>> >>>> These I think have been around for quite a while. >>> Either way, we should be eliminating warnings. >>> >> I will commit a patch to eliminate the Sequencer related warnings. >> >> -- >> Nilay >> >> >> ------------------------------ >> >> Message: 5 >> Date: Tue, 22 Mar 2011 16:03:58 -0400 >> From: Gabe Black<gbl...@eecs.umich.edu> >> To: m5-dev@m5sim.org >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID:<4d8900ae.8000...@eecs.umich.edu> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> You may already be taking care of this, but networktest.cc also had an >> error (ambiguous use of the pow function) that made all the regressions >> fail. That needs to be fixed quickly, regardless of what happens with >> the warnings or who originally worked on the code. Also, code that >> doesn't compile should really never have been committed in the first >> place. It couldn't have been tested since it couldn't have been run. >> >> Gabe >> >> On 03/22/11 15:46, Nilay Vaish wrote: >>> On Tue, 22 Mar 2011, nathan binkert wrote: >>> >>>>> The warnings related to networktest.cc got added yesterday. >>> Tushar should take care of the warnings related to networktest.cc. >>> >>>> .... >>>> >>>>> These I think have been around for quite a while. >>>> Either way, we should be eliminating warnings. >>>> >>> I will commit a patch to eliminate the Sequencer related warnings. >>> >>> -- >>> Nilay >>> _______________________________________________ >>> m5-dev mailing list >>> m5-dev@m5sim.org >>> http://m5sim.org/mailman/listinfo/m5-dev >> >> >> ------------------------------ >> >> Message: 6 >> Date: Tue, 22 Mar 2011 15:23:07 -0500 >> From: "Beckmann, Brad"<brad.beckm...@amd.com> >> To: "'m5-dev@m5sim.org'"<m5-dev@m5sim.org> >> Subject: Re: [m5-dev] Cron<m5test@zizzer> >> /z/m5/regression/do-regression quick >> Message-ID: >> <f7c6fcb105234d4d8025af43d27d3bab27e38...@sausexmbp01.amd.com> >> Content-Type: text/plain; charset="us-ascii" >> >> I sent Tushar an email this morning regarding this, hoping to catch >> him before he went to bed (he's currently in Singapore). >> Unfortunately he hasn't responded. >> >> Hopefully he'll get to this when he wakes up in a few hours. If he >> doesn't, I'll take a look at it tomorrow morning. I don't have time >> to do it today. >> >> Brad >> >> >>> -----Original Message----- >>> From: m5-dev-boun...@m5sim.org [mailto:m5-dev-boun...@m5sim.org] >>> On Behalf Of Gabe Black >>> Sent: Tuesday, March 22, 2011 1:04 PM >>> To: m5-dev@m5sim.org >>> Subject: Re: [m5-dev] Cron<m5test@zizzer> /z/m5/regression/do- >>> regression quick >>> >>> You may already be taking care of this, but networktest.cc also had >>> an error >>> (ambiguous use of the pow function) that made all the regressions >>> fail. That >>> needs to be fixed quickly, regardless of what happens with the >>> warnings or >>> who originally worked on the code. Also, code that doesn't compile >>> should >>> really never have been committed in the first place. It couldn't >>> have been >>> tested since it couldn't have been run. >>> >>> Gabe >>> >>> On 03/22/11 15:46, Nilay Vaish wrote: >>>> On Tue, 22 Mar 2011, nathan binkert wrote: >>>> >>>>>> The warnings related to networktest.cc got added yesterday. >>>> Tushar should take care of the warnings related to networktest.cc. >>>> >>>>> .... >>>>> >>>>>> These I think have been around for quite a while. >>>>> Either way, we should be eliminating warnings. >>>>> >>>> I will commit a patch to eliminate the Sequencer related warnings. >>>> >>>> -- >>>> Nilay >>>> _______________________________________________ >>>> m5-dev mailing list >>>> m5-dev@m5sim.org >>>> http://m5sim.org/mailman/listinfo/m5-dev >>> _______________________________________________ >>> m5-dev mailing list >>> m5-dev@m5sim.org >>> http://m5sim.org/mailman/listinfo/m5-dev >> >> >> >> ------------------------------ >> >> Message: 7 >> Date: Tue, 22 Mar 2011 18:28:30 -0500 >> From: Arkaprava Basu<aba...@wisc.edu> >> To: "'m5-dev@m5sim.org'"<m5-dev@m5sim.org> >> Subject: [m5-dev] Ruby random tester failing with MESI_CMP_directory? >> Message-ID:<4d89309e.7020...@wisc.edu> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi, >> >> I just updated a clean gem5 repo, compiled MESI_CMP_directory and >> tried to run ruby random tester but it immediately failed as follows. >> Can any body reproduce this? >> >> Thanks >> Arka >> >> >> build/X86_SE_MESI_CMP_directory/m5.debug >> configs/example/ruby_random_test.py -l 100000 -n 4 >> M5 Simulator System >> >> Copyright (c) 2001-2008 >> The Regents of The University of Michigan >> All Rights Reserved >> >> >> M5 compiled Mar 22 2011 17:56:26 >> M5 started Mar 22 2011 17:58:16 >> M5 executing on rockstar.cs.wisc.edu >> command line: build/X86_SE_MESI_CMP_directory/m5.debug >> configs/example/ruby_random_test.py -l 100000 -n 4 >> Global frequency set at 1000000000 ticks per second >> info: Entering event queue @ 0. Starting simulation... >> fatal: Invalid transition >> system.dir_cntrl0 time: 1125 addr: [0x400, line 0x400] event: Fetch >> state: M >> @ cycle 1125 >> [doTransitionWorker:build/X86_SE_MESI_CMP_directory/mem/protocol/Directory_Transitions.cc, >> >> line 234] >> Memory Usage: 297516 KBytes >> For more information see: http://www.m5sim.org/fatal/23f196b2 >> >> >> >> ------------------------------ >> >> Message: 8 >> Date: Tue, 22 Mar 2011 20:06:27 -0500 >> From: "Nilay"<ni...@cs.wisc.edu> >> To: "M5 Developer List"<m5-dev@m5sim.org> >> Subject: Re: [m5-dev] Ruby random tester failing with >> MESI_CMP_directory? >> Message-ID: >> <feaff8acc0e78610b366dfa3117e298c.squir...@webmail.cs.wisc.edu> >> Content-Type: text/plain;charset=iso-8859-1 >> >> On Tue, March 22, 2011 6:28 pm, Arkaprava Basu wrote: >>> Hi, >>> >>> I just updated a clean gem5 repo, compiled MESI_CMP_directory and >>> tried to run ruby random tester but it immediately failed as follows. >>> Can any body reproduce this? >>> >>> Thanks >>> Arka >>> >>> >> ALPHA is working fine for 10000 loads with 4 processors. Since your >> testing with ruby random tester, would the processor architecture even >> come in to play? >> >> -- >> Nilay >> >> >> >> ------------------------------ >> >> Message: 9 >> Date: Tue, 22 Mar 2011 18:49:41 -0700 >> From: Lisa Hsu<h...@eecs.umich.edu> >> To: M5 Developer List<m5-dev@m5sim.org> >> Subject: Re: [m5-dev] Ruby random tester failing with >> MESI_CMP_directory? >> Message-ID: >> <AANLkTi=hpfp8qxcxze+0nmcbmvugavqagagy+toxt...@mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Hi Arka, >> >> My repo it not the current tip, but the tip is Nilay's push removing >> CacheMsg, so it's pretty close. I've been running >> X86_SE_MESI_CMP_directory >> with the random tester for maybe 10 or 15 minutes now, and it hasn't >> died. >> Since yours died "immediately", I would assume that I won't be able to >> reproduce. >> >> What's your tip, is it last night's pushes? >> Lisa >> >> On Tue, Mar 22, 2011 at 6:06 PM, Nilay<ni...@cs.wisc.edu> wrote: >> >>> On Tue, March 22, 2011 6:28 pm, Arkaprava Basu wrote: >>>> Hi, >>>> >>>> I just updated a clean gem5 repo, compiled MESI_CMP_directory and >>>> tried to run ruby random tester but it immediately failed as follows. >>>> Can any body reproduce this? >>>> >>>> Thanks >>>> Arka >>>> >>>> >>> ALPHA is working fine for 10000 loads with 4 processors. Since your >>> testing with ruby random tester, would the processor architecture even >>> come in to play? >>> >>> -- >>> Nilay >>> >>> _______________________________________________ >>> m5-dev mailing list >>> m5-dev@m5sim.org >>> http://m5sim.org/mailman/listinfo/m5-dev >>> >>> >> >> ------------------------------ >> >> _______________________________________________ >> m5-dev mailing list >> m5-dev@m5sim.org >> http://m5sim.org/mailman/listinfo/m5-dev >> >> >> End of m5-dev Digest, Vol 47, Issue 74 >> ************************************** > _______________________________________________ > m5-dev mailing list > m5-dev@m5sim.org > http://m5sim.org/mailman/listinfo/m5-dev _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev