I am toying with the idea of no longer supporting our standalone simulator program, but to build the program within tsim_l1l2 (the integrated simulator). This option has been available for a few months, but has not been routinely exercised, except by Jodi. All this means is that I shall no longer check that the program links under tsim_l2stt but will check that it links under tsim_l1l2.
For those who are not familiar with tsim_l1l2, I've attached three versions of the rcp files "head.rcp", "tsim.rcp" and "l1l2analyze.rcp" which, when placed in the rcp directory of your own copy of tsim_l1l2, should allow you to run the official simulator with only the STT part activated. Note: All the packages listed in the the OBJECTS file in the "bin" directory of tsim_l1l2 are linked in, but only those pertaining to the STT will be activated if you choose to use the attached rcp files. To activate other packages, just add them to the "Packages" list in tsim.rcp and their corresponding analyze packages to the "Packages" list in l1l2analyze.rcp. (Note: the tsim.rcp can only contain "DataFlow" packages.)
(A) Building the program
tsim_l1l2 is basically a repository of the list of packages to be linked into the executable (see OBJECTS file) and their rcp files. The file "head.rcp" is the "framework" rcp file; that is, it is the rcp file that specifies to the Dzero framework which packages to activate and in what order. The "head.rcp" file refers to "tsim.rcp" and "l1l2analyze.rcp" (amongst others). "tsim.rcp" specifies the list of simulators to be activated, while "l1l2analyze.rcp" gives the corresponding list of analyze packages.
To build the executable do
gmake tsim_l1l2.all
from your development area. If all goes well, in the area bin/$BFARCH
directly under your development area you should find the executable fileall 128Mbytes of it! The link takes time.
(B) Running the program
First enter "d0setwa" from your development area to initialize the RCP system.
There is no generally accepted convention within Dzero about which directory a program should be run from. In tsim_l2stt, I choose to run from a directory call "test" under that package. However, in tsim_l1l2, the convention is to run from the "bin" directory of that package, where you will find the script Runme.sh. After modifying the file ReadEvent.rcp (in the tsim_l1l2/rcp directory) in the usual way, one runs the program tsim_l1l2_test by doing
./Runme.sh
from the directory tsim_l1l2/bin. That script sets up the necessary
environment and runs the executable file using (by default) "head.rcp"
as the framework rcp.
(C) What if it crashes?
If the program crashes, you can try to read the core file as follows
gdb ../../bin/$BFARCH/tsim_l1l2_test core
and at the (gdb) prompt enter "where". This will tell you exactly where
the program crashes and is ususally quicker than running totalview,
especially if you are working remotely. (Use dbx if gdb is not
available.) If there is no core file, then run the program using the gdb
debugger:
gdb ../../bin/$BFARCH/tsim_l1l2_test
then at the prompt enter "r -rcp ../rcp/head.rcp" to start the
executable. Note where the crash occurs.
Please let me know if the above procedure fails.
Harrison
![]()