Fallo de segmentación al usar MPI_Barrier en `libpmpi.12.dylib`

Instalo mpich usando brew install mpich , pero si uso MPI_Barrier , obtendré un error de segmentación. Vea el código simple a continuación:

 // Ac #include "mpi.h" #include  int main(int argc, char *argv[]) { int rank, nprocs; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&nprocs); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Barrier(MPI_COMM_WORLD); printf("Hello, world. I am %d of %d\n", rank, nprocs);fflush(stdout); MPI_Finalize(); return 0; } 

mpicc Ac -g -O0 -o A

Después de ejecutar mpirun -n 2 ./A , recibí el siguiente error:

  ================================================================================== = = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = PID 60914 RUNNING AT pivotal.lan = EXIT CODE: 139 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES =================================================================================== YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault: 11 (signal 11) This typically refers to a problem with your application. Please see the FAQ page for debugging suggestions 

La stack detallada de lldb -c /cores/core.60914 :

 (lldb) target create --core "core.60914" warning: (x86_64) /cores/core.60914 load command 82 LC_SEGMENT_64 has a fileoff + filesize (0x27d3b000) that extends beyond the end of the file (0x27d3a000), the segment will be truncated to match warning: (x86_64) /cores/core.60914 load command 83 LC_SEGMENT_64 has a fileoff (0x27d3b000) that extends beyond the end of the file (0x27d3a000), ignoring this section bCore file '/cores/core.60914' (x86_64) was loaded. (lldb) bt * thread #1: tid = 0x0000, 0x000000010176f432 libpmpi.12.dylib`MPID_Request_create + 244, stop reason = signal SIGSTOP * frame #0: 0x000000010176f432 libpmpi.12.dylib`MPID_Request_create + 244 frame #1: 0x000000010178d2fa libpmpi.12.dylib`MPID_Isend + 152 frame #2: 0x0000000101744d6f libpmpi.12.dylib`MPIC_Sendrecv + 351 frame #3: 0x00000001016861df libpmpi.12.dylib`MPIR_Barrier_intra + 401 frame #4: 0x00000001016866f2 libpmpi.12.dylib`MPIR_Barrier + 67 frame #5: 0x0000000101686789 libpmpi.12.dylib`MPIR_Barrier_impl + 90 frame #6: 0x00000001016860fb libpmpi.12.dylib`MPIR_Barrier_intra + 173 frame #7: 0x00000001016866f2 libpmpi.12.dylib`MPIR_Barrier + 67 frame #8: 0x0000000101686789 libpmpi.12.dylib`MPIR_Barrier_impl + 90 frame #9: 0x00000001015a8ed9 libmpi.12.dylib`MPI_Barrier + 820 frame #10: 0x0000000101590ed8 a.out`main(argc=1, argv=0x00007fff5e66fa40) + 88 at bc:11 frame #11: 0x00007fff8f7805ad libdyld.dylib`start + 1 

El uso se copia de la guía oficial. ¿Cuál es el problema de la implementación de la función libmpi.12.dylib en libmpi.12.dylib ? Gracias.