Discussion:
[OMPI users] Window memory alignment not suitable for long double
Joseph Schuchart
2018-03-09 09:47:19 UTC
Permalink
We have recently added support for long double to our distributed data
structures and found similar crashes to the ones we have reported in
[1]. I have not been able to reproduce this with a small example but
some analysis indicates that the memory that is handed out by
MPI_Win_allocate is guaranteed to be aligned to 8 Byte while sizeof(long
double) on my machine is 16 Byte. The clang 5.0 compiler issues vmovaps
XMM stores that require the target memory to be aligned to 128 bit
boundaries, potentially causing a segmentation fault on non-aligned
memory accesses.

AFAICS, since MPI supports long double through MPI_LONG_DOUBLE the
memory that is allocated by MPI functions should meet the requirements
of this type. Open MPI should allocate memory in MPI_Allocate,
MPI_Win_allocate, and MPI_Win_allocate_shared that is aligned to 16 Byte
to avoid this problem.

Cheers,
Joseph

[1] https://www.mail-archive.com/***@lists.open-mpi.org/msg30621.html
--
Dipl.-Inf. Joseph Schuchart
High Performance Computing Center Stuttgart (HLRS)
Nobelstr. 19
D-70569 Stuttgart

Tel.: +49(0)711-68565890
Fax: +49(0)711-6856832
E-Mail: ***@hlrs.de
Loading...