fprintf(ofs, "  <lt> %d </lt>\n", T);
fprintf(ofs, "  <lt> %d </lt>\n", T*g_nproc_t);
int write_ildg_format_xml(char *filename, LimeWriter * limewriter){  FILE * ofs;  off_t bytes, bytes_left, bytes_to_copy;  int MB_flag=1, ME_flag=0, status=0;  LimeRecordHeader * limeheader;  char buf[MAXBUF];  ofs = fopen(filename, "w");  fprintf(ofs, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");  fprintf(ofs, "<ildgFormat xmlns=\"http://www.lqcd.org/ildg\"\n");  fprintf(ofs, "            xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");  fprintf(ofs, "            xsi:schemaLocation=\"http://www.lqcd.org/ildg filefmt.xsd\">\n");  fprintf(ofs, "  <version> 1.0 </version>\n");  fprintf(ofs, "  <field> su3gauge </field>\n");  fprintf(ofs, "  <precision> 64 </precision>\n");  fprintf(ofs, "  <lx> %d </lx>\n", LX);  fprintf(ofs, "  <ly> %d </ly>\n", LY);  fprintf(ofs, "  <lz> %d </lz>\n", LZ);  fprintf(ofs, "  <lt> %d </lt>\n", T);  fprintf(ofs, "</ildgFormat>");  fclose( ofs );  ofs = fopen(filename, "r");  bytes = file_size(ofs);    limeheader = limeCreateHeader(MB_flag, ME_flag, "ildg-format", bytes);  if(limeheader == (LimeRecordHeader*)NULL) {    fprintf(stderr, "LIME create header ildg-format error\n Aborting...\n");    exit(500);  }  status = limeWriteRecordHeader( limeheader, limewriter);  if(status < 0 ) {    fprintf(stderr, "LIME write header ildg-format error %d\n Aborting...\n", status);    exit(500);  }  limeDestroyHeader( limeheader );  /* Buffered copy */  bytes_left = bytes;  while(bytes_left > 0){    if(MAXBUF < bytes_left) {      bytes_to_copy = MAXBUF;    }    else bytes_to_copy = bytes_left;    if( bytes_to_copy != fread(buf,1,bytes_to_copy,ofs))      {	fprintf(stderr, "Error reading %s\n", filename);	return EXIT_FAILURE;      }        status = limeWriteRecordData(buf, &bytes_to_copy, limewriter);    if (status != 0) {      fprintf(stderr, "LIME error writing ildg-format status = %d\n Aborting...\n", status);      exit(500);    }    bytes_left -= bytes_to_copy;  }    fclose( ofs );  return(0);}