[Myrinet] MPICH-1.2.1..7b

Patrick Geoffray <[email protected]>
Newsgroups gmane.network.myrinet.general
Organization Myricom Inc
Message-ID <[email protected]>
Fellow Myrinet users,

MPICH-GM 1.2.1..7b is now available on the FTP server (and from the 
Myricom web site) and addresses several issues. This is an update 
release, there are no new features and no performance improvements 
(actually a little bit on the latency).

The ch_gm will now migrate from Myricom's CVS to MPICH's CVS in 
Argonne. However, MPICH-GM will still be distributed and maintained 
only by Myricom. This effort will provide synchronized releases, 
full usage of the MPICH environment (MPD for example) and 
interesting performance improvement (progression thread).

Here is an extract of the CHANGES file for 1.2.1..7b:

* mpich-1.2.1..7b:

  => bug fix release.
- Shared memory flow control bug: occurs when sending very long messages
  via the shared memory device (several MBytes). Apply to all architectures.
  Patch submitted by Oleg from Russia (Thanks!).
- Shared memory 64 bits packets padding: offset in the receive queue shifted
  by unaligned structures, corruption of last word possible. Apply to Alpha
  and IA64. Patch submitted by Oleg from Russia (Thanks again!).
- Change of malloc.c to gmpi_malloc.c: name collision with malloc.c in
  ROMIO. As ROMIO is compiled and added to libmpich.a AFTER ch_gm, the
  malloc stubs provided by ch_gm were not used when MPICH-GM was compiled
  with romio. Major data corruption for messages > 16 KB after more than
  128 KB has been given back to the kernel by malloc using sbrk or munmap,
  and the same pages were allocated just after that to a communication
  buffer. Sounds rare, but happens quite often :-(
- Small bug fix in the Finalize code, to avoid a code used by the
  sbrk/munmap stub to lockup registered pages, when freeing part of the
  code itself (stub in free(), but free() called on the stub itself).
  Problem appears on Mac OSX because sbrk is actually fake. Didn't know
  GM works on Mac OSX ? Well, now you do.
- Defined a MMAP threshold of 1 for Mac OSX, sbrk is fake.
- New bounce buffer code for Solaris. GM-1.6 provides registration, but
  only for Solaris 8. But we can allocate much more memory now.
- Removed a GNU specific include file in gmpi_malloc.c
- Change define to make the malloc provided by ch_gm thread-safe: MPICH
  is not thread-safe, but sometimes users work around by protecting
  MPI calls. But they do not protect malloc calls.
- Nasty GCC optimization bug in the gmpi_flush_send_fifo() function,
  leading to send FIFO corruption with some timings. GCC bug confirmed,
  worked-around in this function. I can send a some C code reproducing
  the bug with -O2. It's scary, the code is simple...

The code reproducing the gcc bug is attached (thanks to Loic Prylli 
for the diagnostic). Try it with -O, -O2 and -O3, it will produce 
interesting results if your gcc is affected (so far confirmed on 
RH 6.2 and Debian, x86 and IA64).

We advise customers to upgrade to 1.2.1..7b as soon as possible.

Patrick

----------------------------------------------------------
|   Patrick Geoffray, Ph.D.      [email protected] 
|   Myricom, Inc.                http://www.myri.com
|   Cell:  865-389-8852          685 Emory Valley Rd (B)
|   Phone: 865-425-0978          Oak Ridge, TN 37830
----------------------------------------------------------
patgccbug.c (text/x-csrc, 904 B)
struct node {
  int type;
  struct node *next;
};

struct main {
  struct node * head;
  int tokens;
} global;


static
void buggy_func(void)
{
  struct node * s1;

  while (global.head != 0 && global.tokens > 0)
    {
      if (global.head->type != 2)
        {
           printf( "BUG: 2 = %d!!!\n", global.head->type);
	   printf( "OK: 2 = %d\n", global.head->type);
	   abort();
         }
      s1 = global.head;

      
      switch(s1->type) 
        { 
	default:
	  printf("oops, shoudl not be there\n");
	  exit(1);
	  
	  break;
	  
	case 2:
	  global.head = s1->next;

	  s1->type = 3;
          noop(s1);

	  if (global.head == 0)
	    noop();
	  
	  break;
        }
    }
}

int main()
{

  struct node s1,s2;
  global.head = &s1;
  global.tokens = 2;
  s1.type = 2;
  s1.next = &s2;
  s2.type = 2;
  s2.next = 0;
  buggy_func();
  printf("everything OK\n");
  return 0;
}


int noop()
{
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.