CHESS Tutorial - MChess
back to top
MChess Tutorial With LFQ Test 1
-
You will first need the code for LockFreeQueue
and the tests. You may download the zip file
here.
Extract it where you
want. For this tutorial, I will be downloading
the file to the C: drive and I will extract it to
the C: drive.
-
Open a Visual Studio 2008 Command Prompt. If you
don't know how, go to Start > All Programs >
Microsoft Visual Studio 2008 > Visual Studio Tools
> Visual Studio 2008 Command Prompt.
-
In the VS Command Prompt, cd to the code that you
extracted two steps ago. In my case, I just need
to enter the command
cd C:\mchess_lfq1
-
The folder should contain ChessTest.cs,
EmptyException.cs, LockFreeQueue.cs,
LockFreeQueueWithError1.cs,
LockFreeQueueWithError2.cs, and Node.cs. We need
to create an executable using the csc.exe program.
To build the executable, type the following:
csc /debug ChessTest.cs EmptyException.cs LockFreeQueue.cs LockFreeQueueWithError1.cs LockFreeQueueWithError2.cs Node.cs
Don't worry about the warnings that come from the
compiler. They do not influence the outcome in any
way. Two files should be created called
ChessTest.exe and ChessTest.pdb.
-
Now we can run mchess. I will type
mchess ChessTest.exe
-
To reproduce the error from the files that were
created in the last step, you can run the command
mchess /repro ChessTest.exe
-
We can also create a trace binary file to be used
with ConcurrencyExplorer.exe. Type in the command
mchess /trace ChessTest.exe
-
At this point, we can use the trace binary file
with ConcurrencyExplorer.exe by using the following
command
ConcurrencyExplorer trace