﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
27	send-recv deadlock	Stephen Siegel	zirkel	"To do a message-passing data exchange, you need to send first, receive second.  Otherwise deadlock will ensue.   In diffusion example, the receives happen first (check for this in other examples as well):

{{{
void exchange_ghost_cells() {
  if(left >= 0) send(v[1], left, 0);
  if(right < nprocs){
	recv(v[nxl+1], right, 0);
   	send(v[nxl], right, 0);
  }
  if(left >= 0) recv(v[0], left, 0);
}
}}}
I guess in this case it won't deadlock because of the boundaries, but it will force sequentialization.
"	defect	new	major		examples	1.0		deadlock send recv message-passing diffusion	
