Hello Everyone,
I am having problem in implementing loop break condition in my C++/MPI code.
Here is the code I want to implement:
CONDITION = 0;
for(n=1; n<=Nt; n++)
{
for(i=1; i=Nx; x++)
if(condition met)
{
CONDITION = 1;
MPI_Allreduc(&CONDITION,&CONDITION,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
}
if(CONDITION == 1) break;
}
When I execute my code with this implementation, it hangs and terminates with
error. The error I got is:
srun: interrupt (one more within 1 sec to abort)
srun: task0: running
srun: interrupt (one more within 1 sec to abort)
srun: task[0-5]: running
srun: error: node1: task0: Exited with exit code 130
srun: sending Ctrl-C to job
Could anyone please point out mistake in my implementation? I would appericate
any help.
Thanks a lot,
Ravi Kumar
Looking forward to hearing from you.
Thanks,
--
Ravi R. Kumar
859-333-8174
|