typedef typename UnaryReturn<OLattice<T>, FnGetSite>::Type_t  Site_t;
typedef typename UnaryReturn<T, FnGetSite>::Type_t  Site_t;
XMLWriter& operator<<(XMLWriter& xml, const OLattice<T>& d){  typedef typename UnaryReturn<OLattice<T>, FnGetSite>::Type_t  Site_t;  Site_t  recv_buf;  xml.openTag("OLattice");  XMLWriterAPI::AttributeList alist;  // Find the location of each site and send to primary node  for(int site=0; site < Layout::vol(); ++site)  {    multi1d<int> coord = crtesn(site, Layout::lattSize());    int node   = Layout::nodeNumber(coord);    int linear = Layout::linearSiteIndex(coord);    int outersite = linear >> INNER_LOG;    int innersite = linear & ((1 << INNER_LOG)-1);    // Copy to buffer: be really careful since max(linear) could vary among nodes    if (Layout::nodeNumber() == node)      recv_buf = getSite(d.elem(outersite),innersite);  // extract into conventional scalar form    // Send result to primary node. Avoid sending prim-node sending to itself    if (node != 0)    {      if (Layout::primaryNode())	Internal::recvFromWait((void *)&recv_buf, node, sizeof(Site_t));      if (Layout::nodeNumber() == node)	Internal::sendToWait((void *)&recv_buf, 0, sizeof(Site_t));    }    if (Layout::primaryNode())    {      alist.clear();      alist.push_back(XMLWriterAPI::Attribute("site", site));      xml.openTag("elem", alist);      xml << recv_buf;      xml.closeTag();    }  }  xml.closeTag(); // OLattice  return xml;}