Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
66 views

m2s MC Programming Archi N Programming

This document provides instructions for installing and using Multi2Sim, a multicore processor simulator. It explains how to download and unpack Multi2Sim, install dependencies, compile the software, set the PATH variable, compile C/C++ and OpenMP programs, simulate programs in Multi2Sim, scale simulations by modifying a configuration file, and references for additional documentation.

Uploaded by

Neha Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

m2s MC Programming Archi N Programming

This document provides instructions for installing and using Multi2Sim, a multicore processor simulator. It explains how to download and unpack Multi2Sim, install dependencies, compile the software, set the PATH variable, compile C/C++ and OpenMP programs, simulate programs in Multi2Sim, scale simulations by modifying a configuration file, and references for additional documentation.

Uploaded by

Neha Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Tutorial on Multi2Sim

for
CSCI-GA.3033-012
Multicore Processors:
Architecture & Programming
By
Tao He
Jyotsna K Narayanan
Installation of Multi2Sim
Multi2Sim runs on Linux environment

1. URL to Download the Multi2Sim version 3.4
http://www.multi2sim.org/

2. Command to unpack
tar -zxvf multi2sim-3.4.tar.gz

3. Commands to Install zlib, gtk & freeglut (Depends on
your system)
sudo apt-get install zlib1g-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install freeglut3-dev
Installation of Multi2Sim
4. Commands to Compile
cd multi2sim-3.4
./configure && make
If any errors occur at step 4, you can do the following:
./configure prefix=/full/path/to/multi2sim
make install

5. Method to Set the PATH variable
In order to execute the program from any directory, the
bin folder should be added to the system bash file in the
home directory.

For eg: Add the below line in .bashrc file in
/home/xyz123
export PATH=$PATH:~/multi2sim-3.4/bin
Compilation Procedure
6. Command to compile C/C++ program
gcc filename.c m32 static

7. To compile a pthread program include the lpthread flag
gcc filename.c m32 static lpthread

8. Commands to compile an OpenMP program
gcc omp_filename.c fopenmp
export OMP_NUM_THREADS=2

9. To Simulate the program in Multi2Sim
m2s <program>
Eg: m2s a.out
Scaling Procedure
1. Create a configuration file in the execution directory
Note: The content of the config file should be in the
same format as the cpuconfig.args-sort file present
in /multi2sim/samples folder.

2. Modify the Cores and Threads as per the
requirement.

3. Include the configuration flag as follows and execute
the program
m2s --cpu-sim detailed cpu-config cpuconfig.args-
sort ./a.out

Reference
http://www.multi2sim.org/
The Multi2Sim Guide
http://www.dartmouth.edu/~rc/classes/intro_
openmp/compile_run.html
https://computing.llnl.gov/tutorials/pthreads/

You might also like