I want to run parallel codes on single pc with core i7 cpu I can compile my code but I have problem with running it.
I compile my code with mpicxx and when I run it by " mpirun -np 8 ./a.out" only one process is. My operating system is linux ubuntu 11.04.
Working what must I do?
For example I want to run this code:
#include <iostream>
#include <mpi.h>
using namespace std;
int main(int argc, char **argv)
{
int mynode, totalnodes;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);
MPI_Comm_rank(MPI_COMM_WORLD, &mynode);
cout << "Hello world from process " << mynode;
cout << " of " << totalnodes << endl;
MPI_Finalize();
}
I use mpich2 with mpirun --version:1.3.1