[mpich-discuss] Segfault with MPICH 3.2+Clang but not GCC

Jeff Hammond jeff.science at gmail.com
Tue Jul 26 10:56:03 CDT 2016


I cannot reproduce this.  I am using Darwin 15.5.0 instead of 15.6.0, but
the compiler is identical.  I am using MPICH Git master from June 29.

At this point, it is unclear to me if the bug is in MPICH or Clang.

Jeff

vsanthan-mobl1:BUGS jrhammon$ /opt/mpich/dev/clang/default/bin/mpichversion

MPICH Version:    3.2

MPICH Release date: unreleased development copy

MPICH Device:    ch3:nemesis

MPICH configure: CC=clang CXX=clang++ FC=false F77=false --enable-cxx
--disable-fortran --with-pm=hydra --prefix=/opt/mpich/dev/clang/default
--enable-cxx --enable-wrapper-rpath --disable-static --enable-shared

MPICH CC: clang    -O2

MPICH CXX: clang++   -O2

MPICH F77: false

MPICH FC: false

vsanthan-mobl1:BUGS jrhammon$ /opt/mpich/dev/clang/default/bin/mpicc -v

mpicc for MPICH version 3.2

Apple LLVM version 7.3.0 (clang-703.0.31)

Target: x86_64-apple-darwin15.5.0

Thread model: posix

InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

clang: warning: argument unused during compilation: '-I
/opt/mpich/dev/clang/default/include'

On Tue, Jul 26, 2016 at 8:17 AM, Andreas Noack <andreasnoackjensen at gmail.com
> wrote:

> On my El Capitan macbook I get a segfault when running the program below
> with more than a single process but only when MPICH has been compiled with
> Clang.
>
> I don't get that good debug info but here is some of what I got
>
> (lldb) c
> Process 61129 resuming
> Process 61129 stopped
> * thread #1: tid = 0x32c438, 0x00000003119d0432
> libpmpi.12.dylib`MPID_Request_create + 244, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
>     frame #0: 0x00000003119d0432 libpmpi.12.dylib`MPID_Request_create + 244
> libpmpi.12.dylib`MPID_Request_create:
> ->  0x3119d0432 <+244>: movaps %xmm0, 0x230(%rax)
>     0x3119d0439 <+251>: movq   $0x0, 0x240(%rax)
>     0x3119d0444 <+262>: movl   %ecx, 0x210(%rax)
>     0x3119d044a <+268>: popq   %rbp
>
> My version of Clang is
>
> Apple LLVM version 7.3.0 (clang-703.0.31)
> Target: x86_64-apple-darwin15.6.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>
> and the bug has been confirmed by my colleague who is running Linux and
> compiling with Clang 3.8. The program runs fine with OpenMPI+Clang.
>
> #include <mpi.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char *argv[])
> {
>     MPI_Init(&argc, &argv);
>
>     MPI_Comm comm = MPI_COMM_WORLD;
>     uint64_t *A, *C;
>     int rnk;
>
>     MPI_Comm_rank(comm, &rnk);
>     A = calloc(1, sizeof(uint64_t));
>     C = calloc(2, sizeof(uint64_t));
>     A[0] = rnk + 1;
>
>     MPI_Allgather(A, 1, MPI_UINT64_T, C, 1, MPI_UINT64_T, comm);
>
>     MPI_Finalize();
>     return 0;
> }
>
>
> Best regards
>
> Andreas Noack
> Postdoctoral Associate
> Computer Science and Artificial Intelligence Laboratory
> Massachusetts Institute of Technology
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>



-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20160726/a92cfc56/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list