Hi, Tomas

 

I have a simple question. How can I add the magic breakpoints into the
applications? And where should I add these breakpoints?

 

Thanks!

 

Lei

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://sos.ece.cmu.edu/pipermail/simflex/attachments/20060408/45c7f4e8/attachment.html
From jinlei at cs.pitt.edu  Mon Apr 10 23:00:17 2006
From: jinlei at cs.pitt.edu (Jin Lei)
List-Post: [email protected]
Date: Mon Apr 10 23:00:38 2006
Subject: [Simflex] A question about checkpoint
Message-ID: <[email protected]>

Hello, tomas,

 

I modified OCEAN source code. It creates a checkpoint at very beginning of
the program. Then when I tried to run the simulation, it gave me the
following error. The system was crashed. 

 

I tried the manually create checkpoint and run the simulation. The same
problem exists. What causes this problem? Is there anything wrong with the
checkpoint?

 

By the way, is it possible use turbo-smarts with flexus to create
checkpoints automatically and accelerate simulation? Is there any manual? I
felt a little difficult to use flexus since practical instruction is too
limited except the "getting started".

 

Lei

 

bash-2.04$ ./interactive CMPFlex

Starting interactive run of flexus_test with CMPFlex in
/afs/cs.pitt.edu/usr0/jinlei/projects/SimFlex/flexus/flexus-test-app/runs/ji
nlei-CMPFlex-10Apr06-224828

Launching job

Initializing Flexus::Debugger...Opening debug output file: debug.out

DEBUG added target debug-comp

DEBUG added target debug-feeder

DEBUG added target debug-noncomp

Opening debug output file: stats.out

DEBUG added target stats

DEBUG added target assertions

Successfully parsed debug configurations from debug.cfg

done

(*** Simics ***) Simics getting shaky, switching to 'safe' mode.

Simics (main thread) received a segmentation fault. Will try to recuperate.

Warning: Interrupt key pressed more than once.

         Pressing it again will force Simics back to the command prompt.

         This may corrupt the running simulation.

         Try waiting for Simics to stop first.

USER INTERRUPT: Interrupt key pressed multiple times.

Returning to prompt.

simics> USER INTERRUPT: Interrupt key pressed multiple times.

Returning to prompt.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://sos.ece.cmu.edu/pipermail/simflex/attachments/20060410/b113d07d/attachment.html
From mrinal at ece.umn.edu  Tue Apr 11 16:30:54 2006
From: mrinal at ece.umn.edu (Mrinal Nath)
List-Post: [email protected]
Date: Tue Apr 11 16:31:04 2006
Subject: [Simflex] Error compiling stat-manager
Message-ID: <[email protected]>

Hi,
I tried to compile stat-manager according to the directions in the 
getting started guide, but some header files are not found

###############
mri...@beryllium (/project/zhai-project01/mrinal/flexus_2.0) % make 
stat-manager
In file included from ../core/simics/control_api.hpp:41,
                  from ../core/debug/action.cpp:54:
../core/simics/api_wrappers.hpp:46:49: simics/types_api.h: No such file 
or directory
../core/simics/api_wrappers.hpp:47:57: simics/configuration_api.h: No 
such file or directory
In file included from ../core/simics/control_api.hpp:41,
                  from ../core/debug/action.cpp:54:
../core/simics/api_wrappers.hpp:53: error: expected constructor, 
destructor, or type conversion before '*' token
../core/simics/api_wrappers.hpp:53: error: expected `,' or `;' before 
'*' token
../core/simics/api_wrappers.hpp:56: error: `conf_class_t' is not a 
member of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:57: error: `class_struct' was not 
declared in this scope
../core/simics/api_wrappers.hpp:57: error: expected primary-expression 
before "const"
../core/simics/api_wrappers.hpp:58: error: `get_attr_t' is not a member 
of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:59: error: `lang_void' is not a member 
of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:60: error: `get_attr_data' was not 
declared in this scope
../core/simics/api_wrappers.hpp:60: error: `set_attr_t' is not a member 
of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:61: error: `lang_void' is not a member 
of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:62: error: `set_attr_data' was not 
declared in this scope
../core/simics/api_wrappers.hpp:62: error: `attr_attr_t' is not a member 
of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:63: error: expected primary-expression 
before "const"
../core/simics/api_wrappers.hpp:64: error: initializer expression list 
treated as compound expression
../core/simics/api_wrappers.hpp:66: error: variable or field 
`SIM_object_constructor' declared void
../core/simics/api_wrappers.hpp:66: error: `conf_object_t' is not a 
member of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:66: error: `conf_obj' was not declared 
in this scope
../core/simics/api_wrappers.hpp:66: error: `parse_object_t' is not a 
member of `Flexus::Simics::API'
../core/simics/api_wrappers.hpp:66: error: `parse_obj' was not declared 
in this scope
../core/simics/api_wrappers.hpp:66: error: initializer expression list 
treated as compound expression
../core/simics/api_wrappers.hpp:68: error: expected constructor, 
destructor, or type conversion before '*' token
../core/simics/api_wrappers.hpp:68: error: expected `,' or `;' before 
'*' token
In file included from ../core/debug/action.cpp:54:
../core/simics/control_api.hpp:49:47: simics/event_api.h: No such file 
or directory
make[1]: *** [../core/debug/action.stats_o] Error 1
make: *** [stat-manager] Error 2
#################

The problem is that in the file:
core/targets/v9.hpp:64:#define FLEXUS_SIMICS_API_HEADER(HEADER) 
<simics/HEADER>

But in core/simics directory, there are no ".h" files, there are only 
".hpp" files.

The ".h" files are in [simics]/x86-linux/obj/include/simics.
Are we supposed to include these files instead?

Thanks
- Mrinal
From twenisch at ece.cmu.edu  Wed Apr 12 14:11:11 2006
From: twenisch at ece.cmu.edu (Thomas Wenisch)
List-Post: [email protected]
Date: Wed Apr 12 14:11:16 2006
Subject: [Simflex] A question about checkpoint
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Hi Lei,

On Mon, 10 Apr 2006, Jin Lei wrote:

> Hello, tomas,
>
>
>
> I modified OCEAN source code. It creates a checkpoint at very beginning of
> the program. Then when I tried to run the simulation, it gave me the
> following error. The system was crashed.

Do you get any errors when running from your checkpoint without Flexus?

>
>
> I tried the manually create checkpoint and run the simulation. The same
> problem exists. What causes this problem? Is there anything wrong with the
> checkpoint?
>

What do you mean by manually run?  Are you issuing the commands to load 
the checkpoint, Flexues, etc. by hand?  If so, what commands are you 
issuing.

> bash-2.04$ ./interactive CMPFlex
>
> Starting interactive run of flexus_test with CMPFlex in
> /afs/cs.pitt.edu/usr0/jinlei/projects/SimFlex/flexus/flexus-test-app/runs/ji
> nlei-CMPFlex-10Apr06-224828
>
> Launching job
>
> Initializing Flexus::Debugger...Opening debug output file: debug.out
<snip>
> Successfully parsed debug configurations from debug.cfg
> done
> (*** Simics ***) Simics getting shaky, switching to 'safe' mode.
> Simics (main thread) received a segmentation fault. Will try to recuperate.

Simics reports this error any time there is a seg-fault in Simics or 
Flexus.  If you haven't modified Flexus at all, the most likely cause of a 
seg-fault while Flexus is loading is a shared library mismatch between 
Flexus and Simics.  Have you followed the steps in the installation guide 
to install the GCC 3.x shared libraries into your Simics distribution?


>
>
> By the way, is it possible use turbo-smarts with flexus to create
> checkpoints automatically and accelerate simulation? Is there any manual? I
> felt a little difficult to use flexus since practical instruction is too
> limited except the "getting started".
>

Flexus does support fast checkpoint ("flex-point") creation with the 
TraceFlex and TraceCMPFlex simulators.  You can experiment with this by 
running these simulators and trying the flexus.load-state and 
flexus.save-state commands.  To automate checkpoint creation, you will 
have to study the MagicBreak component - it provides a variety of ways of 
stopping the simulation at certain events and writing checkpoints.

At the moment, the getting started guide and the tutorial slides are the 
only available documentation.


Regards,
-Tom Wenisch
Computer Architecture Lab
Carnegie Mellon University
From twenisch at ece.cmu.edu  Wed Apr 12 14:15:36 2006
From: twenisch at ece.cmu.edu (Thomas Wenisch)
List-Post: [email protected]
Date: Wed Apr 12 14:15:41 2006
Subject: [Simflex] Magic breakpoints
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Hi Jin,

On Sat, 8 Apr 2006, Jin Lei wrote:

> Hi, Tomas
>
>
>
> I have a simple question. How can I add the magic breakpoints into the
> applications? And where should I add these breakpoints?
>

Simics includes header files that contain macros for magic breakpoints. 
Magic breakpoints are documented in the Simics Unix User's Guide section 
11.1.7.  You can also take a look at Flexus' simprint.h header file, which 
uses magic breakpoints to communicate from your simulated binary to the 
MagicBreak component in Flexus.

You can place magic breakpoints anywhere you want to be able to stop the 
simulation.  For example, we typically place them at the start of an 
iteration in scientific applications, or right at the end of benchmark 
execution.

Regards,
-Tom Wenisch

>
>
> Thanks!
>
>
>
> Lei
>
>
From twenisch at ece.cmu.edu  Wed Apr 12 14:30:23 2006
From: twenisch at ece.cmu.edu (Thomas Wenisch)
List-Post: [email protected]
Date: Wed Apr 12 14:30:36 2006
Subject: [Simflex] Error compiling stat-manager
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Hi Mrinal,

On Tue, 11 Apr 2006, Mrinal Nath wrote:

> Hi,
> I tried to compile stat-manager according to the directions in the getting 
> started guide, but some header files are not found
>
> ###############
> mri...@beryllium (/project/zhai-project01/mrinal/flexus_2.0) % make 
> stat-manager
> In file included from ../core/simics/control_api.hpp:41,
>                 from ../core/debug/action.cpp:54:
> ../core/simics/api_wrappers.hpp:46:49: simics/types_api.h: No such file or 
> directory

<snip errors>

> The problem is that in the file:
> core/targets/v9.hpp:64:#define FLEXUS_SIMICS_API_HEADER(HEADER) 
> <simics/HEADER>
>
> But in core/simics directory, there are no ".h" files, there are only ".hpp" 
> files.
>
> The ".h" files are in [simics]/x86-linux/obj/include/simics.
> Are we supposed to include these files instead?

The simics/*.h header files are distributed with Simics.  Stat-manager is 
not compiling because of a bug in stat-manager/Makefile - Apparently I 
accidentally hard-coded a path to the Simics makefiles, which is not 
correct for your system.  As a result, the compiler can't find the files.

In stat-manager/Makefile, change the following (lines 48-49):

%.stats_o: %.cpp
         $(GCC) $(GCC_OPTFLAGS) $(GCC_LANGFLAGS)  $(INCLUDES) -isystem 
/home/simics-2.2.12/x86-linux/obj/include -DSELECTED_DEBUG=dev 
-DTARGET_PLATFORM=v9 -I.. -c $^ -o $@

to:

%.stats_o: %.cpp
         $(GCC) $(GCC_OPTFLAGS) $(GCC_LANGFLAGS)  $(INCLUDES) -isystem 
$(SIMICS_INCLUDE) -DSELECTED_DEBUG=dev 
-DTARGET_PLATFORM=v9 -I.. -c $^ -o $@

This change will make the stat-manager makefile pick up the location of 
Simics from makefile.defs, as it is supposed to.

Thanks for the bug report.

Regards,
-Tom Wenisch
Computer Architecture Lab
Carnegie Mellon University

Reply via email to