hello i seem to have a problem when i try to run my progem i get this error
------------------------------------------------------------------------------
----------------------------------
It seems that [at least] one of processes that was started with mpirun
did not invoke MPI_INIT before quitting (it is possible that more than
one process did not invoke MPI_INIT -- mpirun was only notified of the
first one, which was on node n1050863079).
mpirun can *only* be used with MPI programs (i.e., programs that
invoke MPI_INIT and MPI_FINALIZE). You can use the "lamexec" program
to run non-MPI programs over the lambooted nodes.
------------------------------------------------------------------------------
-----------------------------------
the problem is i do call both funtions in main
int main(int argc, char **argv)
{
int rank, size, partner;
int namelen;
char name [MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc, &argv); /* Initialize MPI*/
//how many process are there?
MPI_Comm_size(MPI_COMM_WORLD, &size);
//which one am i
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
//where am i running
MPI_Get_processor_name(name, &namelen);
char message[100];
char plain_text[100];
char *c;
int lom = 0;
int blocksize = 2;
int p = 127;
int q = 107;
//int p = 32887;
//int q = 33179;
//int p = 421;
//int q = 569;
int E; // = 17;
int D; // = 2357;
int E_Array[10];
PQ = (LINT)p*(LINT)q;
LINT data;
LINT cypher_text[50];
Find_E(E_Array, p, q);
E = E_Array[3];
cout<<"E = "<<E<<endl;
read_primes(primes);
if(rank != 0)
{
MPI_Recv( &path_length, 0,MPI_INT, 0, 1, MPI_COMM_WORLD, &stat);
for (int lcv=0; lcv<=path_length; lcv++)
{Expand_Indeces(primes);}
}//end if
else
{
lom = read_message(message);
RSA_Crack(primes, E, D);
//cout<<"Done"<<endl;
/*for (int outer=9000; outer<9005; outer++)
{
for(int inner=1000; inner<1005; inner++)
{
p = primes[outer];
q = primes[inner];
PQ = (LINT)p*(LINT)q;
c = lint2str(PQ,10);
cout<<"PQ = "<<c<<endl;
cout<<"P = "<<p<<" Q = "<<q<<endl;
RSA_Crack(primes, PQ);
cout<<endl;
}
}*/
}//end else
MPI_Finalize();
return 0;
}
any ideas???
|