Hello guys,

I try to do the first steps with Open MPI and I finally got it work on Cygwin64(Windows 7 64bit). I am able to compile plain C code without any issues via "mpicc ..." but when I try to initialize MPI the program is getting stuck within "MPI_INIT" without creating CPU load. Example from https://svn.open-mpi.org/source/xref/ompi_1.8/examples/:

   #include <stdio.h>
   #include "mpi.h"
   int main(int argc, char* argv[])
   {
        int rank, size, len;
        char version[MPI_MAX_LIBRARY_VERSION_STRING];
        printf("1\n");
        MPI_Init(&argc, &argv);
        printf("2\n");
        MPI_Comm_rank(MPI_COMM_WORLD, &rank);
        printf("3\n");
        MPI_Comm_size(MPI_COMM_WORLD, &size);
        printf("4\n");
        MPI_Get_library_version(version, &len);
        printf("5\n");
        printf("Hello, world, I am %d of %d, (%s, %d)\n", rank, size,
   version, len);
        MPI_Finalize();
        printf("6\n");
        return 0;
   }

Compiling works perfectly fine with "mpicc -o hello_c.exe hello_c.c". But when I run it with "mpirun -np 4 ./hello_c" it creates 4 threads printing "1" but then keeps on running without doing anything. I then have to kill the threads manually to keep on working with Cygwin.

Can you tell me what I am doing wrong?

Thanks
Marco

PS: Installed packages on Cygwin are libopenmpi, libopenmpi-devel, openmpi, gcc-core

Reply via email to