Windows 10 64bit, Cygwin64, openmpi 1.10.7-1 (dev, c, c++, fortran), x86_64-w64-mingw32-gcc 6.3.0-1 (core, gcc, g++, fortran)

I am compiling the standard "hello_c.c" example with mgicc configured to use the Cygwin installed MinGW gcc compiler:

$ export OMPI_CC=x86_64-w64-mingw32-gcc
$ mpicc -idirafter /cygdrive/c/cygwin64/usr/include hello_c.c -o hello_c 

For some unknown reason, I have to manually include the "usr/include" directory to pick up the "mpi.h" header, and it must be searched after the standard header directories to avoid "time_t" typedef conflicts. The showme:

x86_64-w64-mingw32-gcc -idirafter /cygdrive/c/cygwin64/usr/include hello_c.c -o hello_c -fexceptions -L/usr/lib -lmpi -lopen-rte -lopen-pal -lm -lgdi32

This successfully creates hello_c.exe. Running it either directly or with mpiexec displays the following errors for each process:

$ ./hello_c
      1 [main] hello_c 18116 child_copy: cygheap read copy failed, 0x180307408..0x180319318, done 0, windows pid 18116, Win32 error 6
    112 [main] hello_c 18116 D:\mpi\examples\hello_c.exe: *** fatal error - ccalloc would have returned NULL
$ mpiexec -n 4 hello_c
      1 [main] hello_c 15660 child_copy: cygheap read copy failed, 0x180307408..0x1803216B0, done 0, windows pid 15660, Win32 error 6
    182 [main] hello_c 15660 D:\mpi\examples\hello_c.exe: *** fatal error - ccalloc would have returned NULL
      2 [main] hello_c 7852 child_copy: cygheap read copy failed, 0x180307408..0x18031F588, done 0, windows pid 7852, Win32 error 6
    223 [main] hello_c 7852 D:\mpi\examples\hello_c.exe: *** fatal error - ccalloc would have returned NULL
      1 [main] hello_c 16464 child_copy: cygheap read copy failed, 0x180307408..0x1803208E0, done 0, windows pid 16464, Win32 error 6
    215 [main] hello_c 16464 D:\mpi\examples\hello_c.exe: *** fatal error - ccalloc would have returned NULL
      2 [main] hello_c 17184 child_copy: cygheap read copy failed, 0x180307408..0x180322710, done 0, windows pid 17184, Win32 error 6
    281 [main] hello_c 17184 D:\mpi\examples\hello_c.exe: *** fatal error - ccalloc would have returned NULL    
Does anyone have any ideas as to what is causing these errors. Can an open mpi application even be compiled with the Cygwin installed MinGW gcc compiler?
hello_c.c
---------------
#include <stdio.h>
#include "mpi.h"

int main(int argc, char* argv[])
{
  int rank, size, len;
  char version[MPI_MAX_LIBRARY_VERSION_STRING];

  MPI_Init(&argc, &argv);

  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_size(MPI_COMM_WORLD, &size);
  MPI_Get_library_version(version, &len);
  printf("Hello World! I am %d of %d, (%s, %d)\n", rank, size, version, len);

  MPI_Finalize();

  return 0;
}
---------------

_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to