[mpich2-dev] [opa-core] Problem with MPICH2 1.1 during MPI_Init() on PPC Linux 32bit

Joe Ratterman jratt0 at gmail.com
Tue Jun 9 15:49:10 CDT 2009


I don't know much about how locks are done on BG/P, but I have a couple
pretty-sure bits:1) Pointers are 4 bytes and 4-byte-aligned; we don't need
8-byte for pointers.
2) Pointers used in LL/SC operations get best performance on their own cache
line (32 bytes), but I believe I was told that no alignment was *required*.
 To me, that implies 4-byte-aligned is fine.

Sameer, do you know anything about this?  You can see the file in question
here:
https://svn.mcs.anl.gov/repos/openpa/trunk/src/primitives/opa_gcc_ppc.h


Thanks,
Joe Ratterman
jratt at us.ibm.com



On Tue, Jun 9, 2009 at 3:23 PM, Darius Buntinas <buntinas at mcs.anl.gov>wrote:

> I see that there is a comment in opa_gcc_ppc.h that "these need to be
> aligned on an 8-byte boundary to work on a BG/P."  Do you know if this
> is true?
>
> Dave, this looks like your comment.  Can you comment?
>
> Should this be changed to "OPA_ATTRIBUTE((aligned (SIZEOF_VOID_P)))" to
> handle different pointer sizes (similarly for SIZEOF_INT for ints)?
>
> -d
>
> On 06/09/2009 03:04 PM, Joe Ratterman wrote:
> > This is the error I'm seeing:
> >
> >     Assertion failed in file mpid_nem_init.c at line 89:
> >     sizeof(MPID_nem_cell_rel_ptr_t) == 4
> >
> >
> >
> > This appears to be the important code from the pre-processed version
> > of mpid_nem_init.c
> >
> >
> >     # 11
> >
> "/bglhome/usr1/jratt/src-sles10/mpich2/mpich2-1.1/src/openpa/src/primitives/opa_gcc_ppc.h"
> >     typedef struct { volatile int v __attribute__ ((aligned (8))); }
> >     OPA_int_t;
> >     typedef struct { void * volatile v __attribute__ ((aligned (8))); }
> >     OPA_ptr_t;
> >
> >     # 188 "../include/mpid_nem_datatypes.h"
> >     typedef struct MPID_nem_cell_rel_ptr
> >     {
> >         OPA_ptr_t p;
> >     }
> >     MPID_nem_cell_rel_ptr_t;
> >
> >     # 135 mpid/ch3/include/mpidi_ch3_conf.h
> >
> >     #define SIZEOF_VOID_P 4
> >
> >     # 85 mpid_nem_init.c
> >         /* The MPID_nem_cell_rel_ptr_t defined in mpid_nem_datatypes.h
> >          * should only contain a pointer. Also, we don't support
> compilers
> >          * which add random padding to the start of the structure. The
> >          * below assert should blow up if any of these happens. */
> >         MPIU_Assert(sizeof(MPID_nem_cell_rel_ptr_t) == SIZEOF_VOID_P);
> >
> >
> >
> > Given the above code, the size of that type appears to be 8 in both GCC
> > and XLC.  I see that the alignment is hard-coded to 8 in
> > src/openpa/src/primitives/opa_gcc_ppc.h.  Changing that first line to an
> > alignment of 4, the type size shrinks to 4 (correspondingly, increasing
> > it to 16 increases the type size as well).
> >
> > Changing the file to 4 and recompiling things allows a few simple tests
> > to work fine--I haven't tried too much more.
> >
> >
> >
> > Thanks,
> > Joe Ratterman
> > jratt at us.ibm.com <mailto:jratt at us.ibm.com>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > opa-core mailing list
> > opa-core at lists.mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/opa-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20090609/9d3892f4/attachment.htm>


More information about the mpich2-dev mailing list