IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Run a single programm using multiple PCs(mpi linux)

2 posters

Go down

single - Run a single programm using multiple PCs(mpi linux) Empty Run a single programm using multiple PCs(mpi linux)

Post by BIT0107-Toma 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.
BIT0107-Toma
BIT0107-Toma
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 280
Points : 453

Back to top Go down

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

Post by BIT0122-Amit 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.
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Back to top

- Similar topics

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