[mpich-discuss] cygwin & mingw64 & windows 7 (64bits)

Jean-Michel Beuken beuken at pcpm.ucl.ac.be
Mon Nov 8 14:42:30 CST 2010


Hello Jayesh,

thank you for ypur quick answer...
>   Mingw does not provide the POSIX runtime environment that Nemesis/sock needs. Try compiling your code with gcc (from mingw package) and MPICH2 (64-bit) installed using the windows installers (mpich2-1.3-win-x86-64.msi).
I had installed this package but I'm not a windows specialist

customarily, on linux, the compilation of mpich2 produces some wrappers ( like mpif90 ) and the link is made easily...

after installation of the msi package under Windows , there are :

------------------------------------------------------------------------------
$ ls /cygdrive/c/lib/
TraceInput.lib    cxx.lib  fmpich2.lib  fmpich2g.lib  irlog2rlog.lib  mpe.lib  mpi.lib  rlog.lib

$ ls /cygdrive/c/include/
clog_commset.h    clog_inttypes.h  mpe.h        mpe_logf.h    mpi.h     mpi_base.mod        mpi_sizeofs.mod  mpif.h
clog_const.h    clog_uuid.h     mpe_log.h  mpe_misc.h    mpi.mod  mpi_constants.mod  mpicxx.h         mpio.h
------------------------------------------------------------------------------

tried with the f90 example found in mpich2 : pi3f90.f90

under linux :
------------------------------------------------------------
[root at shiva f90]# mpif90 -show
gfortran -I/usr/local/mpich2_gcc45/include -L/usr/local/mpich2_gcc45/lib -lmpichf90 -lmpich -lopa -lmpl -lrt -lpthread

[root at shiva f90]# echo $LD_LIBRARY_PATH
/usr/local/gcc45/lib64:/usr/local/gcc45/lib:/usr/local/lib:/usr/local/lib64:/usr/local/mpich2_gcc45/lib

[root at shiva f90]# make
../../bin/mpif90  -c pi3f90.f90
../../bin/mpif90   -o pi3f90 pi3f90.o -lrt -lpthread

------------------------------------------------------------

under cygwin  with the MINGW :
------------------------------------------------------------
$ x86_64-w64-mingw32-gfortran.exe -I/cygdrive/c/include/ -c pi3f90.f90
pi3f90.f90:25.8:

  use mpi
         1
Fatal Error: File 'mpi.mod' opened at (1) is not a GFORTRAN module file
------------------------------------------------------------

then, I comment the 'use mpi' and add

include 'mpif.h'   in pi3f90.f90

------------------------------------------------------------
$ x86_64-w64-mingw32-gfortran.exe -I/cygdrive/c/include/ -c pi3f90.f90  -fno-range-check  -fsecond-underscore

$ x86_64-w64-mingw32-gfortran.exe  -o pi3f90 pi3f90.o -L/cygdrive/c/lib -lfmpich2 -lfmpich2g -lmpi -static-libgcc -static-libgfortran

------------------------------------------------------------

I must put "-fno-range-check" because error :

------------------------------------------------------------
mpif.h:340.42:
     Included at pi3f90.f90:26:

        PARAMETER (MPI_FLOAT_INT=2348810240)
                                           1
Error: Integer too big for its kind at (1). This check can be disabled with the option -fno-range-check
------------------------------------------------------------

in bash, I start smpd ( I verify then the service runs )  and start :

/cygdrive/c/bin/mpiexec.exe -n 4 pi3f90

but nothing :-(

with wmpiconfig, I see the exitcode  for the 4 processes = -1073741819

the  mpich2-1.3-win-x86-64.msi  has been compiled  with which compilers ?

regards

jmb








More information about the mpich-discuss mailing list