Question of combiningcomputercluster_atomandcoord_atom command

Hi axel,

Thanks for your reply. I am just confused one thing in the code. When I use the following code, everything is ok

if (dot_product > threshold){
//cout<<i<<" “<<j<<” “<<carray[i][0]<<” “<<carray[i][1]<<”" << carray[j][1]<<endl;
carray[i][1] = carray[j][1] = MIN(carray[i][1],carray[j][1]);
done = 0;

}

However, when I just add red word in the if sentence, it is endless loop.

if (dot_product > threshold && carray[i][0] >= 11.0 ) {
//cout<<i<<" “<<j<<” “<<carray[i][0]<<” “<<carray[i][1]<<”" << carray[j][1]<<endl;
carray[i][1] = carray[j][1] = MIN(carray[i][1],carray[j][1]);
done = 0;

}

That’s incomprehensible for me. Why the new if sentence can change the result of comm->forward_comm_compute(this)?
If I understand the issue, I will know the direction to solve the bug. Any suggestion is appreciated.

Thanks for your time.

Wade

If done = 0 is the signal to exit the loop, then presumably

with the added if condition, you are never setting done = 0.

Add a print statement inside it, or print the value of carray[i][0] every

iteration. Then you can figure out what’s happeining.

Steve