An HTML attachment was scrubbed... URL: http://sos.ece.cmu.edu/pipermail/simflex/attachments/20050810/5bf02850/attachment.html From twenisch at ece.cmu.edu Wed Aug 10 18:50:52 2005 From: twenisch at ece.cmu.edu (Thomas Wenisch) List-Post: [email protected] Date: Wed Aug 10 18:50:23 2005 Subject: [Simflex] Questions about SimFlex In-Reply-To: <[email protected]> References: <[email protected]> Message-ID: <[email protected]>
Hello Lu, On Wed, 10 Aug 2005, lu peng wrote: > Hi, there, > > I am new to SimFlex. I'd like to ask you a question. Right now, I am trying > to implement the NUCA with cache block migration scheme in a CMP cache. If I > use > SimFlex, which files/functions should I touch? You will have to make small modifications to the CmpCache component (components/CmpCache), and significant modifications within the Cache (components/Cache) component. In particular, you will need to keep track of the location (in the NUCA sense) of each block on chip, and calculate appropriate access latencies for each block. You will need to track where blocks are by extending the data structure in components/Cache/NewCacheArray.(ch)pp. You will need to update this state as each block is accessed by the various CPUs in your CMP and the block moves around the cache. The code for this will probably go in components/Cache/PiranhaCacheController.hpp. Every message the CMP cache controller sees gets routed through PiranhaCacheControllerImpl::performOperation(), so that is probably the place you should start looking at. Access latencies for hits are returned by the calcDelay() method in components/Cache/CacheController.hpp. In a NUCA cache, this method will be considerably more complicated, and will return variable latency depending on where the block and where the requesting CPU are. As you can tell, the cache code is fairly complicated (because it supports all sorts of crazy multiprocessor interactions). I suggest you start by adding copious amount of debug output to the existing code (either with DBG_ statements or just using std::cout ) to get a feel for how control flows through the cache code. You can turn on the existing debug statements by issuing the command "flexus.set-debug iface" before starting the simulation (with "run") in Simics. > > Another question: does SimFlex have a detailed tutorial or documents showing > its main structure? Such a document is not available yet, but we are planning on writing one very soon (it is on my TO-DO list). Hopefully, an introductory document will be available sometime next week. An announcement will be sent to the mailing list when it becomes available. Regards, -Tom Wenisch Computer Architecture Lab Carnegie Mellon University > > Thanks a lot, > Lu > > > From mrinal at ece.umn.edu Thu Aug 11 21:29:00 2005 From: mrinal at ece.umn.edu (Mrinal Nath) List-Post: [email protected] Date: Thu Aug 11 21:29:17 2005 Subject: [Simflex] Problem running Simics after 'make install' In-Reply-To: <pine.lnx.4.53l-ece.cmu.edu.0508071330560.25...@dalmore.ece.cmu.edu> References: <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508051503460.6...@dalmore.ece.cmu.edu> <[email protected]> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508071330560.25...@dalmore.ece.cmu.edu> Message-ID: <[email protected]> Hi Tom, Sorry for the delayed reply. Thanks for letting me know that my CMPFlex setup is working. (Atleast till the step in the 'getting started guide' where the './interactive SIMULATOR_NAME' is issued.) Just for the record, I am using Ubuntu Linux 5.04, with binutils version 2.15-5ubuntu2.2 and glibc (libc6) version 2.3.2.ds1-20ubuntu13. Now the next problem that I am facing is when trying to run 'stat-manager'. As explained in the getting-started-guide, I tried to use the 'list-measurements' command, but I got an error: ########## /project/zhai-project01/mrinal/flexus/stat-manager/stat-manager: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory ########## This problem might be because the particular shared directory is not in the path. I tried adding the location of libstdc++.so.6 to the path, but still I got the same error. Now I am going to try out the other things like CMPFlex.ooo, etc to see if they work. I'll keep everyone posted of what works and what doesn't Thanks - Mrinal Thomas Wenisch wrote: >Hi Mrinal, > >On Sat, 6 Aug 2005, Mrinal Nath wrote: > > > >>Hi Tom, >>The latest thing that I tried out is as follows: >> >>I changed the 'libstdc++.so.5' file to the one that SimFlex actually >>uses (copies when 'make install' is run) and rebuilt Flexus. >> >> > >OK, so this is the libstdc++ that comes from your GCC 3.4.4 build. This >library (or a newer version of libstdc++) is what Flexus expects. > > > >>Then I tried running the test application, and it does seem to run >>successfully even beyond the "interactive CMPFlex" command. I am pasting >>the output below, so that you can take a look at it ans see if >>everything is OK. >> >> >> > ><snip some output> > > > >>141 <breakpoint_tracker.cpp:382> {2538758}- End of parallel phase >>breakpoint reached. >>142 <flexus.cpp:569> {2538758}- Terminating simulation. Timestamp: >>2005-Aug-06 00:20:36 >>143 <flexus.cpp:570> {2538758}- Saving final stats_db. >>Simulation terminated by flexus. >>terminate called after throwing an instance of >>'Flexus::Core::FlexusException' >> what(): Terminating >>(*** Simics ***) Simics getting shaky, switching to 'safe' mode. >>(*** Simics ***) Simics (main thread) received an abort signal, probably >>an assertion. >><Simics is running in 'safe' mode> >>simics> >>############### >> >> > >This is actually the correct output. The "FlexusException" is thrown by >the terminate handler in the MagicBreak component to kill the simulation. >This exception is never caught, so it propagates up to the C++ startup >code, which calls abort(), which looks to Simics like a segfault. This >error will happen every time you use the MagicBreak component to terminate >simulations. I have not had the time to clean this up, since it has no >detrimental effects, except the ugly error messages. > >The output from the simulation will be saved in stats_db.out despite the >error. > >As far as Simics not working when launched by itself (with start-simics), >the issue may be that some, but not all, of the shared libraries that make >up Simics use C++ code. Only C++ code will have ABI issues when linking. >When you launch Flexus, it runs the Sparc version of simics with the >-stall option. It is possible that this particular target does not have >C++ code. Try launching Simics (by itself) as follows to see if it works: > ./simics -stall > >You should also try CMPFlex.OoO to make sure it works. It runs Simics >with -ma instead of -stall, which probably loads yet another set of Simics >components. > >As for Ubuntu Linux, I have not heard of it before. We use SuSE, and we >haven't really tested extensively with anything else. A lot of people are >having trouble with Fedora Core (which I guess is fairly popular). We are >trying to find a general solution that will make these linking issues go >away regardless of what flavor of Linux you happen to use. > > > >>Thanks, and sorry for the barrage of mails ! :-) >> >> > >No problem, happy to help. Let me know if you run into more problems or >have questions. > >Regards, >-Tom Wenisch > > > From twenisch at ece.cmu.edu Thu Aug 11 23:42:07 2005 From: twenisch at ece.cmu.edu (Thomas Wenisch) List-Post: [email protected] Date: Thu Aug 11 23:42:04 2005 Subject: [Simflex] Problem running Simics after 'make install' In-Reply-To: <[email protected]> References: <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508051503460.6...@dalmore.ece.cmu.edu> <[email protected]> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508071330560.25...@dalmore.ece.cmu.edu> <[email protected]> Message-ID: <pine.lnx.4.53l-ece.cmu.edu.0508112336340.8...@dalmore.ece.cmu.edu> Hi Mrinal, You should be able to fix the stat-manager loading error by adding the GCC 3.4.4 libraries paths to the *front* of your LD_LIBRARY_PATH environment variable. For example, if gcc-3.4.4 is installed in /home/gcc-3.4.4: (for bash) export LD_LIBRARY_PATH=/home/gcc-3.4.4/lib:$LD_LIBRARY_PATH Then, if you issue the command: ldd stat-manager you should get output similar to: libz.so.1 => /lib/libz.so.1 (0x4001c000) libstdc++.so.6 => /home/gcc-3.4.4/lib/libstdc++.so.6 (0x4002b000) libm.so.6 => /lib/libm.so.6 (0x40100000) libgcc_s.so.1 => /home/gcc-3.4.4/lib/libgcc_s.so.1 (0x40123000) libc.so.6 => /lib/libc.so.6 (0x4012b000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Precise version numbers and locations may vary. If ldd can resolve all the libraries, then stat-manager should work. Thanks for suffering through all these setup pains. Hopefully we will be able to incorporate your experiences into our documentation. Regards, -Tom Wenisch Computer Architecture Lab Carnegie Mellon University On Thu, 11 Aug 2005, Mrinal Nath wrote: > Hi Tom, > Sorry for the delayed reply. Thanks for letting me know that my CMPFlex > setup is working. (Atleast till the step in the 'getting started guide' > where the './interactive SIMULATOR_NAME' is issued.) > > Just for the record, I am using Ubuntu Linux 5.04, with binutils version > 2.15-5ubuntu2.2 and glibc (libc6) version 2.3.2.ds1-20ubuntu13. > > Now the next problem that I am facing is when trying to run > 'stat-manager'. As explained in the getting-started-guide, I tried to > use the 'list-measurements' command, but I got an error: > > ########## > /project/zhai-project01/mrinal/flexus/stat-manager/stat-manager: error > while loading shared libraries: libstdc++.so.6: cannot open shared > object file: No such file or directory > ########## > > This problem might be because the particular shared directory is not in > the path. I tried adding the location of libstdc++.so.6 to the path, but > still I got the same error. > > > > Now I am going to try out the other things like CMPFlex.ooo, etc to see > if they work. I'll keep everyone posted of what works and what doesn't > > Thanks > - Mrinal > > > Thomas Wenisch wrote: > > >Hi Mrinal, > > > >On Sat, 6 Aug 2005, Mrinal Nath wrote: > > > > > > > >>Hi Tom, > >>The latest thing that I tried out is as follows: > >> > >>I changed the 'libstdc++.so.5' file to the one that SimFlex actually > >>uses (copies when 'make install' is run) and rebuilt Flexus. > >> > >> > > > >OK, so this is the libstdc++ that comes from your GCC 3.4.4 build. This > >library (or a newer version of libstdc++) is what Flexus expects. > > > > > > > >>Then I tried running the test application, and it does seem to run > >>successfully even beyond the "interactive CMPFlex" command. I am pasting > >>the output below, so that you can take a look at it ans see if > >>everything is OK. > >> > >> > >> > > > ><snip some output> > > > > > > > >>141 <breakpoint_tracker.cpp:382> {2538758}- End of parallel phase > >>breakpoint reached. > >>142 <flexus.cpp:569> {2538758}- Terminating simulation. Timestamp: > >>2005-Aug-06 00:20:36 > >>143 <flexus.cpp:570> {2538758}- Saving final stats_db. > >>Simulation terminated by flexus. > >>terminate called after throwing an instance of > >>'Flexus::Core::FlexusException' > >> what(): Terminating > >>(*** Simics ***) Simics getting shaky, switching to 'safe' mode. > >>(*** Simics ***) Simics (main thread) received an abort signal, probably > >>an assertion. > >><Simics is running in 'safe' mode> > >>simics> > >>############### > >> > >> > > > >This is actually the correct output. The "FlexusException" is thrown by > >the terminate handler in the MagicBreak component to kill the simulation. > >This exception is never caught, so it propagates up to the C++ startup > >code, which calls abort(), which looks to Simics like a segfault. This > >error will happen every time you use the MagicBreak component to terminate > >simulations. I have not had the time to clean this up, since it has no > >detrimental effects, except the ugly error messages. > > > >The output from the simulation will be saved in stats_db.out despite the > >error. > > > >As far as Simics not working when launched by itself (with start-simics), > >the issue may be that some, but not all, of the shared libraries that make > >up Simics use C++ code. Only C++ code will have ABI issues when linking. > >When you launch Flexus, it runs the Sparc version of simics with the > >-stall option. It is possible that this particular target does not have > >C++ code. Try launching Simics (by itself) as follows to see if it works: > > ./simics -stall > > > >You should also try CMPFlex.OoO to make sure it works. It runs Simics > >with -ma instead of -stall, which probably loads yet another set of Simics > >components. > > > >As for Ubuntu Linux, I have not heard of it before. We use SuSE, and we > >haven't really tested extensively with anything else. A lot of people are > >having trouble with Fedora Core (which I guess is fairly popular). We are > >trying to find a general solution that will make these linking issues go > >away regardless of what flavor of Linux you happen to use. > > > > > > > >>Thanks, and sorry for the barrage of mails ! :-) > >> > >> > > > >No problem, happy to help. Let me know if you run into more problems or > >have questions. > > > >Regards, > >-Tom Wenisch > > > > > > > _______________________________________________ > SimFlex mailing list > [email protected] > https://sos.ece.cmu.edu/mailman/listinfo/simflex > SimFlex web page: http://www.ece.cmu.edu/~simflex > From penglu01 at hotmail.com Mon Aug 15 17:54:12 2005 From: penglu01 at hotmail.com (lu peng) List-Post: [email protected] Date: Mon Aug 15 17:54:31 2005 Subject: [Simflex] Questions about SimFlex In-Reply-To: <[email protected]> Message-ID: <[email protected]> An HTML attachment was scrubbed... URL: http://sos.ece.cmu.edu/pipermail/simflex/attachments/20050815/baf48976/attachment.html From twenisch at ece.cmu.edu Mon Aug 15 18:02:37 2005 From: twenisch at ece.cmu.edu (Thomas Wenisch) List-Post: [email protected] Date: Mon Aug 15 18:02:10 2005 Subject: [Simflex] Questions about SimFlex In-Reply-To: <[email protected]> References: <[email protected]> Message-ID: <pine.lnx.4.53l-ece.cmu.edu.0508151758370.17...@dalmore.ece.cmu.edu> Hi Lu, For simics to find CMPFlex, the library file (FLEXUS_ROOT/simulators/CMPFlex/libflexus_CMPFlex_v9_iface_gcc.so) must be placed in the Simics library directory (simics/x86-linux/lib). Once you put the library in that directory and launch simics, it should appear in the list of available Simics extensions (list-modules and load-modult). Our "interactive" script (in flexus-test-app/interactive) shows examples of how to use symbolic links and temporary directories to do the copying in an elegant way. I suggest you take a look at that for ideas on how to automate your experimental process. Regards, -Tom Wenisch Computer Architecture Lab Carnegie Mellon University On Mon, 15 Aug 2005, lu peng wrote: > > Hi, Thomas , > > Thanks for your message. I already build SimFlex with Simics 2.2.14. I > already have some checkpoints. How can I run it with SimFlex? I did make the > module of > CMPFlex. But seems it's not linked with Simics yet because I can't find it by > list-module in Simics. Can I just use 'load-module' to start the CMPFlex > module? > > Thanks, > > Lu > > > From mrinal at ece.umn.edu Mon Aug 15 21:57:25 2005 From: mrinal at ece.umn.edu (Mrinal Nath) List-Post: [email protected] Date: Mon Aug 15 21:57:39 2005 Subject: [Simflex] Problem running Simics after 'make install' In-Reply-To: <pine.lnx.4.53l-ece.cmu.edu.0508112336340.8...@dalmore.ece.cmu.edu> References: <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508051503460.6...@dalmore.ece.cmu.edu> <[email protected]> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508071330560.25...@dalmore.ece.cmu.edu> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508112336340.8...@dalmore.ece.cmu.edu> Message-ID: <[email protected]> Hi Tom, Thanks for the solution. It solved the problem and I was able to run stat-manager. As a note for others: I am using tcsh shell (not bash), so instead of export, I had to use the setenv command. Now I have a question regarding CMPFlex.OoO. I successfully built CMPFlex.OoO using 'make CMPFlex.OoO' command in FLEXUS_ROOT directory. To test CMPFlex.Ooo, I followed the instructions in the getting started manual. (According to the manual, the checkpointing procedure is the same for a given application, so I can use the checkpoints that were created when I tried to test CMPFlex. Am I correct?) Then for simulation, I used the command "./interactive -ma CMPFlex.OoO". (Is this correct?) The in-order simulation using CMPFlex hardly takes 5-6 minutes on my machine. But the OOO simulation using CMPFlex.OoO has been running for the past 10 hours or so and yet, it has not progressed (In the "system console" window, we can see the thread and iteration that is currently going on.) My "system console" gave initialization messages for all 8 threads, and then it is stuck at "Thread 2 iteration 0" for the past 10 hours. However in the terminal where I started Simics using "./interactive CMPFlex.OoO", Flexus is printing some messages (from different components) which indicate that time is indeed progressing. Is it that the OoO simulation really runs so slowly? Or have I missed out something due to which the simulation is not really running? Thanks - Mrinal Thomas Wenisch wrote: >Hi Mrinal, > >You should be able to fix the stat-manager loading error by adding the GCC >3.4.4 libraries paths to the *front* of your LD_LIBRARY_PATH environment >variable. For example, if gcc-3.4.4 is installed in /home/gcc-3.4.4: > >(for bash) >export LD_LIBRARY_PATH=/home/gcc-3.4.4/lib:$LD_LIBRARY_PATH > >Then, if you issue the command: > ldd stat-manager > >you should get output similar to: > libz.so.1 => /lib/libz.so.1 (0x4001c000) > libstdc++.so.6 => /home/gcc-3.4.4/lib/libstdc++.so.6 (0x4002b000) > libm.so.6 => /lib/libm.so.6 (0x40100000) > libgcc_s.so.1 => /home/gcc-3.4.4/lib/libgcc_s.so.1 (0x40123000) > libc.so.6 => /lib/libc.so.6 (0x4012b000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > >Precise version numbers and locations may vary. If ldd can resolve all >the libraries, then stat-manager should work. > >Thanks for suffering through all these setup pains. Hopefully we will be >able to incorporate your experiences into our documentation. > >Regards, >-Tom Wenisch >Computer Architecture Lab >Carnegie Mellon University > From penglu01 at hotmail.com Thu Aug 18 19:10:08 2005 From: penglu01 at hotmail.com (lu peng) List-Post: [email protected] Date: Thu Aug 18 19:10:21 2005 Subject: [Simflex] Flexus test error In-Reply-To: <pine.lnx.4.53l-ece.cmu.edu.0508151758370.17...@dalmore.ece.cmu.edu> Message-ID: <[email protected]> An HTML attachment was scrubbed... URL: http://sos.ece.cmu.edu/pipermail/simflex/attachments/20050818/8a31eccb/attachment.html From twenisch at ece.cmu.edu Thu Aug 18 22:55:26 2005 From: twenisch at ece.cmu.edu (Thomas Wenisch) List-Post: [email protected] Date: Thu Aug 18 22:54:48 2005 Subject: [Simflex] Problem running Simics after 'make install' In-Reply-To: <[email protected]> References: <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508051503460.6...@dalmore.ece.cmu.edu> <[email protected]> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508071330560.25...@dalmore.ece.cmu.edu> <[email protected]> <pine.lnx.4.53l-ece.cmu.edu.0508112336340.8...@dalmore.ece.cmu.edu> <[email protected]> Message-ID: <pine.lnx.4.53l-ece.cmu.edu.0508182240000.25...@dalmore.ece.cmu.edu> Hi Mrinal, Sorry for the delay in reply. On Mon, 15 Aug 2005, Mrinal Nath wrote: > Hi Tom, > Now I have a question regarding CMPFlex.OoO. I successfully built > CMPFlex.OoO using 'make CMPFlex.OoO' command in FLEXUS_ROOT directory. > To test CMPFlex.Ooo, I followed the instructions in the getting started > manual. (According to the manual, the checkpointing procedure is the > same for a given application, so I can use the checkpoints that were > created when I tried to test CMPFlex. Am I correct?) You are correct, the same checkpoints can be used for all simulation modes. Note that the procedure in the manual describes how to create Simics checkpoints. When you start a Flexus simulation from Simics, the simulation state is cold (all caches empty, etc.) Flexus also has the capability of writing out checkpoints with warm state (i.e., caches, branch predictor are saved, along with Simics state). In general, we use the in-order simulator to create warm checkpoints for out-of-order simulation. None of this is documented yet, but if you play around with the "flexus.*" commands in Simics or take a look in core/flexus.cpp, you can probably figure out whats going on. > > Then for simulation, I used the command "./interactive -ma CMPFlex.OoO". > (Is this correct?) This is correct. The -ma flag must be passed to Simics to run it in MAI mode. Flexus will complain loudly if you try to run with the wrong mode. > > The in-order simulation using CMPFlex hardly takes 5-6 minutes on my > machine. But the OOO simulation using CMPFlex.OoO has been running for > the past 10 hours or so and yet, it has not progressed (In the "system > console" window, we can see the thread and iteration that is currently > going on.) My "system console" gave initialization messages for all 8 > threads, and then it is stuck at "Thread 2 iteration 0" for the past 10 > hours. However in the terminal where I started Simics using > "./interactive CMPFlex.OoO", Flexus is printing some messages (from > different components) which indicate that time is indeed progressing. > > Is it that the OoO simulation really runs so slowly? Or have I missed > out something due to which the simulation is not really running? > Hmm, in general, for MP simulation, the in-order flexus simulator is already so slow that out-of-order simulation is not far behind (within an order of magnitude). 6 minutes to 10 hours strikes me as an abnormally large slowdown. It is possible that output on the "system console" can take a long time to appear, because the OS code behind printf system calls is slow operation, and may have to wait around to grab locks. However, the number of instructions to complete the test app should be pretty much the same in in-order and out-of-order simulation. You should see the "reached iteration whatever" messages at about the same instruction counts, and the whole app should take the same number of instructions to complete. Try taking a look at instruction counts in the two modes (available in the stats database, via "flexus.print-measurement all" while Simics is running; or directly from Simics using its built in instruction counters, e.g. cpu0.print-statistics). Nikos, Is everything I said about the test app correct? Do you have any comments to add? As an aside, we have done work to improve simulation speed (by nearly 2 orders of magnitude) for in-order trace-based (no timing feedback into functional simulation) simulation, which enables rapid creation of warm-state checkpoints. We will present our checkpoint-based measurement methodology at our MICRO tutorial. Regards, -Tom Wenisch Computer Architecture Lab Carnegie Mellon University > Thanks > - Mrinal > From liutao at ict.ac.cn Thu Aug 18 22:21:34 2005 From: liutao at ict.ac.cn (Liu,Tao) List-Post: [email protected] Date: Thu Aug 18 22:55:49 2005 Subject: [Simflex] Does Simflex support pthread library? Message-ID: <[email protected]> Hi, Does the Simflex support pthread library? If not, does it provide alternative APIs? Thanks! Tao Liu
