locked
How link MS-MPI with Intel Visual Fortran on Win10 RRS feed

  • Question

  • Hi everyone,

    I am trying to use MS-MPI (v10)  in Intel Visual Fortran (2013) on Windows 10. Based on suggestions posted on this forum, I made the same setting. However it still doesn't work. My settings are as follows:

    1. Put " use mpi" in the beginning of the program;

    2. Add "C:\Program Files (x86)\Microsoft SDKs\MPI\Include  C:\Program Files (x86)\Microsoft SDKs\MPI\Include\x64" at Property=>Fortran=>General=>Additional Inclue Directories;

    3. Add "C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64" at Property=>Linker=>General=>Additional Library Directories;

    4. Put " msmpi.lib; msmpifec.lib " at Property=>Linker=>Input=>Additional Dependencies; (How to sepearte these two llibs? I use space or semicolon. It seems not right. )

    5. File "mpi.f90" is also added into the project.

    After that, I will get " Error #716     fatal error LNK1181: Cannot open file 'msmpi.lib;'    LINK". However, I checked that msmpi.lib is located at "C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64". 

    Besides, there are also 715 warnings such as " warning #11077: msmpifec.lib(mpifbind.obj): locally defined symbol __imp_pmpi_win_allocate__ imported    ipo ".

    What could cause this problem? Thanks

    Monday, January 21, 2019 4:26 AM

All replies

  • It looks like the problem is indeed in adding libs to the project. This works for me (this is obviously from Visual Studio):

    Hope it helps,

    -Anna

    Wednesday, January 23, 2019 10:27 PM
  • Thank you Anna. It did work.

    However, some other errors also show up.

    Errors like "  error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned __int64)" (?_invalid_parameter@@YAXPEBG00I_K@Z) Already in LIBCMTD.lib (invarg.obj Defined in LIBCMT.lib(invarg.obj)  "  were solved by adding libcmtd.lib at Property=>Linker=>Input=>Ignore Specific Library.

    After that, another error pops out " Error LNK2019: Unresolved external symbol __guard_check_icall_fptr, this symbol is referenced in function MPIR_Comm_copy_attr_f77_proxy ". I googled but do not find a solution.

    Thursday, January 24, 2019 8:44 AM
  • We built latest release of msmpi with Control Flow Guard enabled. It might be that your Fortran compiler does not support this option. 

    One quick suggestion/workaround is to use MSMPI 9.0.1 (https://www.microsoft.com/en-us/download/details.aspx?id=56727). Unless you want to use RMA, this should not be a deal breaker.

    The other option would be to update the compiler to more recent version.

    -Anna

    Thursday, January 24, 2019 7:41 PM
  • Hi Anna,

    It works. Thank you for your patient assistance.

    In case someone may want to know:

    To set the number of running cores, open cmd at exe directory and type mpiexec -n 4 filename.exe, where 4 is the running cores. Make sure the mpiexe is from MS MPI. It comes from the installation of msmpisetup.exe and locates at C:\Program Files\Microsoft MPI\Bin (By default).

    Saturday, January 26, 2019 1:52 PM