mpirun limit on number of processors

I am using the CDK on Linux redhat 5.9.

When I execute mpirun -np 3 mpihello (compiled in C++ with mpich1) it works fine.

Any number of processors about 3 results in a hang up and I have to terminate the mpirun command. I can see that each processor is getting contacted (by the splash screen info we have) but none of the outputs I have are being executed.

Any suggestions?

Hi Larry,

There’s no limit on the number of MPI process you can use.

Has this program working in the past? My first guess is that there’s program error where the processes are blocked at some synchronization point (like a SEND/RECIEVE).

Try running your program in the PGI Debugger, PGDBG (See Chapter 11 of PGDBG User’s Guide for details), and see where the hang occurs.

Also, are all the processes on the same node? If not, could there be a network issue or a problem with one of the nodes?

  • Mat

It has worked in the past.

The program hangs at MPI_Init.

Here is the code:
int main(int argc, char *argv)
{
int numproc=1; // number of processors in group
int rank=0; // rank of calling process
int rc = 0; // return variable for MPI_INIT

rc= MPI_Init(&argc,&argv);
if (rc != 0 )
{
cout <<" Error starting MPI program. Terminating. " << endl;
MPI_Abort(MPI_COMM_WORLD, rc);
}

//Function which gives the rank of each process (ID)
rc = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rc != 0 )
{
cout << "Error at Comm_rank. " << endl;
}

//Function which indicates the number of processes
rc = MPI_Comm_size(MPI_COMM_WORLD, &numproc);
if (rc != 0 )
{
cout << "Error at Comm_size. " << endl;
}

int namelen;
char processor_name[256];
MPI_Get_processor_name(processor_name, &namelen);


cout << “Hello! - P” << rank << " Processor " << processor_name << endl;

rc = MPI_Finalize();

return 0;
}

Hi Larry,

It works for me. What’s changed between the last time you built/ran the program? Are you using a single or multiple nodes? What version of the CDK are you using? What flags are you using?

  • Mat