[petsc-dev] How to configure parallel petsc on windows?

John R. Cary cary at txcorp.com
Sun Nov 20 14:41:40 CST 2011


On 11/20/2011 11:09 AM, Satish Balay wrote:
> On Sun, 20 Nov 2011, Satish Balay wrote:
>
>>>>>>>>>>>>>>>>>> .
>> Executing: mingw32-gfortran  -o conftest.exe    -Wall -Wno-unused-variable -O   -I/winsame/contrib-mingw/microsoft-hpc-mingw/Include conftest.o  /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpi.lib -L/winsame/builds-mingw/facetsall-mingw/petsc-3.1-p8/par/c:/mingw/lib/gcc/mingw32/4.6.1 -L/winsame/builds-mingw/facetsall-mingw/petsc-3.1-p8/par/c:/mingw/lib/gcc -L/winsame/builds-mingw/facetsall-mingw/petsc-3.1-p8/par/c:/mingw/mingw32/lib -L/winsame/builds-mingw/facetsall-mingw/petsc-3.1-p8/par/c:/mingw/lib -L/mingw/lib -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32
>> sh:
>> Possible ERROR while running linker: Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_recv_]+0x1f): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_wait_]+0x1f): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_test_]+0x20): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_waitany_]+0x20): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_testany_]+0x21): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_waitall_]+0x1f): undefined reference to `_imp__MPI_F_STATUSES_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_testall_]+0x20): undefined reference to `_imp__MPI_F_STATUSES_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_waitsome_]+0x1f): undefined reference to `_imp__MPI_F_STATUSES_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_testsome_]+0x1f): undefined reference to `_imp__MPI_F_STATUSES_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_iprobe_]+0x20): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_probe_]+0x1f): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_sendrecv_]+0x1f): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpi_sendrecv_replace_]+0x1f): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpirinitc]+0xa): undefined reference to `_imp__MPI_F_STATUS_IGNORE'
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib(obj/i386/mpif.obj):(.text[_mpirinitc]+0x25): undefined reference to `_imp__MPI_F_STATUSES_IGNORE'
>> collect2: ld returned 1 exit status
>>
>>
>> Source:
>>        program main
>>         include 'mpif.h'
>>         integer ierr
>>         call mpi_init(ierr)
>>        end
>>
>> <<<<<<<<<<<<<
>>
>> Perhaps msmpi libs are using some internal notation that
>> mingw-gfortran is unable to interpret? The unresolved symbols are
>> coming from
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib and I
>> think should be resolved by either
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib or
>> /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpi.lib
>>
>> I would check with:
>>
>> nm -Ao /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpi.lib |grep _imp__MPI_F_STATUS_IGNORE
>
> Should also try to compile that simple mpi fortran code snippet
> directly with mingw32-gfortran - and see if that works.
>
> mingw32-gfortran conftest.f -o conftest.exe -I/winsame/contrib-mingw/microsoft-hpc-mingw/Include /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpifec.lib /winsame/contrib-mingw/microsoft-hpc-mingw/lib/i386/msmpi.lib
>
>

So I confirm what you found.  I also found

http://social.microsoft.com/Forums/is/windowshpcmpi/thread/fa213e91-5b83-419b-a1df-e11a76568664

which indicates this is a known problem.  The basic symbol is in msmpi.lib:

xena.cary$ link /dump /exports msmpi.lib | grep -i mpi_f_st
                   _MPI_F_STATUSES_IGNORE
                   _MPI_F_STATUS_IGNORE

But not the symbol desired by msmpifec.lib:

xena.cary$ nm msmpifec.lib | grep -i mpi_f_st
          U __imp__MPI_F_STATUSES_IGNORE
          U __imp__MPI_F_STATUS_IGNORE

So seems not to be mingw but just a fact of the msmpi package.

????

John








More information about the petsc-dev mailing list