Run a single programm using multiple PCs(mpi linux)

View previous topic View next topic Go down

Run a single programm using multiple PCs(mpi linux)

Post by BIT0107-Toma on Sun Jan 30, 2011 11:23 pm

Course code: CSE 501
Course name: Parallel Computing

Today sir told us to run a code of matrix multiplication using parallel computing mechanism. I am going to tell the way shortly here.

1. Make a cluster of some(as much as you want) PCs.
2. Write a code for matrix multiplication and compile it using the direction below:

first go to the directory where the file is saved. Then write the command: mpicc -o executable_file c_file.

For example, my C file is in desktop, the name of the file is matrix_multiplication.c and I will give the name of executable file mm. So, the command to will be:
Code:
cd Desktop/
mpicc -o mm matrix_multiplication.c
3. Save the executable file in the directory below:
Code:
/home/mpiuser/mpich1/examples/
4. Copy the executable file in all the PCs of the cluster and keep it in the same directory above.
5. Make sure that the executable file is permitted to be executed.
Code:
Right mouse click>Properties>Permission>Mark "Allow executing file as program"(if unmarked)
6. Run the command from any of the PCs of the cluster
Code:
cd /home/mpiuser/mpich1/examples/
mpirun -np 4 mm
Here, 4 determines the number of processors to use to run the programm.

Note: As I am at home, I am confused about some concepts. I will give some clear concepts tomorrow after some experiments.

_________________________________________________________________
Take it easy, make it easy
avatar
BIT0107-Toma
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 280
Points : 453

View user profile

Back to top Go down

Re: Run a single programm using multiple PCs(mpi linux)

Post by BIT0122-Amit on Mon Jan 31, 2011 12:31 am

Good work.
Although I am a bit confused about the process itself with accordance to our teacher's instructions.

Anyway, rep++

BTW, it is MPICH, which implements MPI. If you just mention MPI, it might mean some other sorts of implementations as well.

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|[You must be registered and logged in to see this link.]|[You must be registered and logged in to see this link.]|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum