<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<br class=""><br class="">I think I’ve done something stupid when installing mpich, so thanks in advance for your patience.<br class=""><br class="">The following is a minimal working example of the bug:<br class=""><br class=""><br class="">#include <stdio.h> <br class="">#include <mpi.h> <br class=""><br class="">int main(int argc, char** argv) { <br class=""><br class="">MPI_Init(NULL, NULL); <br class=""><br class="">printf("Before barrier\n"); <br class="">MPI_Barrier(MPI_COMM_WORLD); <br class="">printf("After barrier\n"); <br class=""><br class="">MPI_Finalize(); <br class="">} <br class=""><br class=""><br class="">I compile it with the command mpicc -o minimal_working_example minimal_working_example.c<br class="">When I run it with the commandmpiexec -n 1 ./minimal_working_example<br class="">I get the output <br class=""><br class=""><br class="">Before barrier<br class="">After barrier<br class=""><br class=""><br class="">which is what I expect. When I run it with the command mpiexec -n 2 ./minimal_working_example<br class="">I get the output <br class=""><br class="">Before barrier<br class="">Before barrier<br class=""><br class="">===================================================================================<br class="">= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br class="">= PID 45072 RUNNING AT localhost<br class="">= EXIT CODE: 11<br class="">= CLEANING UP REMAINING PROCESSES<br class="">= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br class="">===================================================================================<br class="">YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault: 11 (signal 11)<br class="">This typically refers to a problem with your application.<br class="">Please see the FAQ page for debugging suggestions<br class=""><br class="">which is not what I expect. For the record the same occurs when running the `comare_bcast` program found at, <a href="https://github.com/wesleykendall/mpitutorial/tree/gh-pages/tutorials/mpi-broadcast-and-collective-communication/code" class="">https://github.com/wesleykendall/mpitutorial/tree/gh-pages/tutorials/mpi-broadcast-and-collective-communication/code</a>. Since I really expected this code to work I suspect that I’ve installed mpich incorrectly.<br class=""><br class="">I’m on OSX 10.11.4 and installed mpich using the command sudo port install mpich<br class=""><br class=""><br class="">Any advice welcome.<br class="">Thank you very much for your help.<br class=""><br class="">Ben</body></html>