Ticket #664: part0001.html

File part0001.html, 4.7 KB (added by Rajeev Thakur, 5 months ago)

Added by email2trac

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<HTML><HEAD>
3<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
4<META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD>
5<BODY>
6<DIV dir=ltr align=left><FONT color=#0000ff size=2 
7face=Arial></FONT>&nbsp;</DIV><FONT color=#0000ff size=2 face=Arial></FONT><BR>
8<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
9<HR tabIndex=-1>
10<FONT size=2 face=Tahoma><B>From:</B> mpich2-dev-bounces@mcs.anl.gov
11[mailto:mpich2-dev-bounces@mcs.anl.gov] <B>On Behalf Of </B>Joe
12Ratterman<BR><B>Sent:</B> Tuesday, June 09, 2009 3:14 PM<BR><B>To:</B> MPICH2
13Dev<BR><B>Subject:</B> [mpich2-dev] Problem with MPI_Type_commit() and assert
14insegment_ops.c<BR></FONT><BR></DIV>
15<DIV></DIV>The specifics of this test come from an MPI excerciser that gathered
16(using MPIR_Gather) a variety of types, including&nbsp;MPI_SHORT_INT. &nbsp;The
17way that gather is implemented, it created and then sent a struct datatype of
18the tmp-data from the software tree and the local-data. &nbsp;I pulled out the
19important bits, and got this test-case. &nbsp;It asserts on PPC32 Linux 1.1 and
20BGP 1.1rc0, but runs fine on 1.0.7. &nbsp;The addresses/displacements are fake,
21but were originally based on the actual values used inside MPIR_Gather. &nbsp;It
22does the type-create on the first two types just to show that it doesn't always
23fail.
24<DIV><BR></DIV>
25<DIV><BR></DIV>
26<DIV>Error message:</DIV>
27<DIV><BR></DIV>
28<BLOCKQUOTE 
29style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 40px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0px" 
30class=webkit-indent-blockquote>Creating &nbsp;addr=[0x1,0x2]
31  &nbsp;types=[8c000003,4c00010d] &nbsp;struct_displs=[1,2]
32  &nbsp;blocks=[256,256] &nbsp;MPI_BOTTOM=(nil)<BR>foo:25<BR>Assertion failed in
33  file segment_ops.c at line 994: *lengthp &gt; 0<BR>internal ABORT - process
340</BLOCKQUOTE>
35<DIV>
36<DIV><BR></DIV>
37<DIV><FONT color=#0000ff size=2 face=Arial></FONT><BR></DIV>
38<DIV>Code</DIV>
39<DIV><BR></DIV></DIV>
40<BLOCKQUOTE 
41style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 40px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0px" 
42class=webkit-indent-blockquote>#include &lt;stdio.h&gt;<BR>#include
43  &lt;stdlib.h&gt;<BR>#include &lt;unistd.h&gt;<BR>#include
44  &lt;mpi.h&gt;<BR><BR>void foo(void *sendbuf,<BR>&nbsp;&nbsp; &nbsp; &nbsp; 
45  &nbsp; MPI_Datatype sendtype,<BR>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; void
46  *recvbuf,<BR>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; MPI_Datatype
47  recvtype)<BR>{<BR>&nbsp;&nbsp;int blocks[2];<BR>&nbsp;&nbsp;MPI_Aint
48  struct_displs[2];<BR>&nbsp;&nbsp;MPI_Datatype types[2],
49  tmp_type;<BR><BR>&nbsp;&nbsp;blocks[0] = 256;<BR>&nbsp;&nbsp;struct_displs[0]
50  = (size_t)sendbuf;<BR>&nbsp;&nbsp;types[0] =
51  sendtype;<BR>&nbsp;&nbsp;blocks[1] = 256;<BR>&nbsp;&nbsp;struct_displs[1] =
52  (size_t)recvbuf;<BR>&nbsp;&nbsp;types[1] =
53  MPI_BYTE;<BR><BR>&nbsp;&nbsp;printf("Creating &nbsp;addr=[%p,%p]
54  &nbsp;types=[%x,%x] &nbsp;struct_displs=[%x,%x] &nbsp;blocks=[%d,%d]
55  &nbsp;MPI_BOTTOM=%p\n",<BR>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; sendbuf, recvbuf,
56  types[0], types[1], struct_displs[0], struct_displs[1], blocks[0], blocks[1],
57  MPI_BOTTOM);<BR>&nbsp;&nbsp;MPI_Type_create_struct(2, blocks, struct_displs,
58  types, &amp;tmp_type);<BR>&nbsp;&nbsp;printf("%s:%d\n", __func__,
59  __LINE__);<BR>&nbsp;&nbsp;MPI_Type_commit(&amp;tmp_type);<BR>&nbsp;&nbsp;printf("%s:%d\n",
60  __func__, __LINE__);<BR>&nbsp;&nbsp;MPI_Type_free
61  &nbsp;(&amp;tmp_type);<BR>&nbsp;&nbsp;puts("Done");<BR>}<BR><BR><BR>int
62  main()<BR>{<BR>&nbsp;&nbsp;MPI_Init(NULL,
63  NULL);<BR><BR>&nbsp;&nbsp;foo((void*)0x1,<BR>&nbsp;&nbsp; &nbsp; 
64  &nbsp;MPI_FLOAT_INT,<BR>&nbsp;&nbsp; &nbsp; &nbsp;(void*)0x2,<BR>&nbsp;&nbsp; 
65  &nbsp; 
66  &nbsp;MPI_BYTE);<BR>&nbsp;&nbsp;sleep(1);<BR>&nbsp;&nbsp;foo((void*)0x1,<BR>&nbsp;&nbsp; 
67  &nbsp; &nbsp;MPI_DOUBLE_INT,<BR>&nbsp;&nbsp; &nbsp; 
68  &nbsp;(void*)0x2,<BR>&nbsp;&nbsp; &nbsp; 
69  &nbsp;MPI_BYTE);<BR>&nbsp;&nbsp;sleep(1);<BR>&nbsp;&nbsp;foo((void*)0x1,<BR>&nbsp;&nbsp; 
70  &nbsp; &nbsp;MPI_SHORT_INT,<BR>&nbsp;&nbsp; &nbsp; 
71  &nbsp;(void*)0x2,<BR>&nbsp;&nbsp; &nbsp; 
72  &nbsp;MPI_BYTE);<BR><BR>&nbsp;&nbsp;MPI_Finalize();<BR>&nbsp;&nbsp;return
73  0;<BR>}</BLOCKQUOTE>
74<DIV>
75<DIV>
76<DIV><BR></DIV></DIV>
77<DIV><BR></DIV>
78<DIV><BR></DIV>
79<DIV>I don't know anything about how this might be fixed, but we are looking
80into it as well.</DIV>
81<DIV><BR></DIV>
82<DIV>Thanks,</DIV>
83<DIV>Joe Ratterman</DIV>
84<DIV><A 
85href="mailto:jratt@us.ibm.com">jratt@us.ibm.com</A></DIV></DIV></BODY></HTML>