Help for parallel computing using MPI
Hi All,
I would like to implement my OOP C++ in computer cluster. But I dont know exactly how to do this. I am very new to this parallel computation. I tried as follows,
Code:
#include .....
#include <mpi.h>
int main(int nargs, char** args)
{
int size, my_rank;
MPI_Init (&nargs, &args);
MPI_Comm_size (MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
//here I want to run three different independent job
make_pov();
make_avs();
make_vrml();
MPI_Finalize ();
return 0;
}
Actually this is my first try, please give me how to do this job correctly with little explanation.
Thanks a lot in advance..
Sitha.
Edit/Delete Message
Re: Help for parallel computing using MPI
I assume that use use the my_rank variable ...
Code:
if (my_rank == 0)
{
// whatever
}
if (my_rank == 1)
{
// whatever
}
if (my_rank == 2)
{
// whatever
}
How are you executing the run ? Are you using mpirun or some
other method ?
Re: Help for parallel computing using MPI
Quote:
Originally Posted by Philip Nicoletti
I assume that use use the my_rank variable ...
How are you executing the run ? Are you using mpirun or some
other method ?
Thank you very much for your help.
Actually I am very new to this. I dont know my explanation whether correct or not for questions.
My cluster has 32 nodes.
it has MPICH2 for parallel computing
for executing we use
Code:
mpiexec -l filename -n 32 ./.out
for above application if I want to use all nodes how can I do?
Please give me the idea what is the best way to compile and run a program.
Thanks a lot.
Sitha.