none
How to configure an x64 mpi program in vs2015, intel visual fortran RRS feed

  • Question

  • Hi, 

    My OS is win10 and would like to compile an x64 mpi program in vs2015, intel visual fortran. I downloaded MS-MPI v8 and installed msmpisdk.msi. Then I configure my project in vs2015 by adding the include and lib libraries. In Linker--input, I add msmpi.lib and msmpifec.lib as additional dependencies.  In Linker, I add "D:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64" as additional library directories and in Fortran, I add "D:\Program Files (x86)\Microsoft SDKs\MPI\Include\x64" as additional include directories. My source code starts with "use mpi". However after I compile it, I get "error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MPI]". What is the problem? Thanks.

    Wednesday, February 22, 2017 12:51 PM

All replies

  • Hi,

    You want to have both "D:\Program Files (x86)\Microsoft SDKs\MPI\Include" and "D:\Program Files (x86)\Microsoft SDKs\MPI\Include\x64" as additional include directories. Let us know if that fixes the issue you're seeing

    Anh

    Thursday, February 23, 2017 1:37 AM
  • I did what you suggested, however the same error remains.
    Thursday, February 23, 2017 7:55 AM
  • For Fortran f90 you will also need to add mpi.f90 to the list of the source file (or you can compile the mpi.f90 module separately and include that everytime). The file mpi.f90 can be found in the SDK\Include directory
    Thursday, February 23, 2017 7:41 PM
  • By adding mpi.f90 to the list of the source file, error #7002 disappears. However this time, it shows "fatal error LNK1104: cannot open file 'ifconsol.lib'". The output is: 

    1>------ Rebuild All started: Project: Console1, Configuration: Release x64 ------
    1>Deleting intermediate files and output files for project 'Console1', configuration 'Release|x64'.
    1>Compiling with Intel(R) Visual Fortran Compiler 16.0 [Intel(R) 64]...
    1>mpi.f90
    1>spin_susceptbility_coherence_factor_highsymmetry.f90
    1>Linking...
    1>LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
    1>
    1>Build log written to  "file://C:\Users\Administrator\Desktop\Console1\Console1\x64\Release\BuildLog.htm"
    1>Console1 - 1 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    The build log shows:

    Build Log
     
     Build started: Project: Console1, Configuration: Release|x64 

    Output
     
    Deleting intermediate files and output files for project 'Console1', configuration 'Release|x64'.
    Compiling with Intel(R) Visual Fortran Compiler 16.0 [Intel(R) 64]...
    ifort /nologo /O2 /I"D:\Program Files (x86)\Microsoft SDKs\MPI\Include\x64" /I"D:\Program Files (x86)\Microsoft SDKs\MPI\Include" /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc140.pdb" /libs:dll /threads /c /Qlocation,link,"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin\amd64" "D:\Program Files (x86)\Microsoft SDKs\MPI\Include\mpi.f90"
    ifort /nologo /O2 /I"D:\Program Files (x86)\Microsoft SDKs\MPI\Include\x64" /I"D:\Program Files (x86)\Microsoft SDKs\MPI\Include" /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc140.pdb" /libs:dll /threads /c /Qlocation,link,"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin\amd64" "C:\Users\Administrator\Desktop\Console1\spin_susceptbility_coherence_factor_highsymmetry.f90"
    Linking...
    Link /OUT:"x64\Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"D:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64" /MANIFEST /MANIFESTFILE:"x64\Release\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Users\Administrator\Desktop\Console1\Console1\x64\Release\Console1.lib" msmpi.lib msmpifmc.lib "x64\Release\mpi.obj" "x64\Release\spin_susceptbility_coherence_factor_highsymmetry.obj"
    LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'


    Console1 - 1 error(s), 0 warning(s)

    • Edited by flygaoonly Friday, February 24, 2017 1:27 AM
    Friday, February 24, 2017 12:46 AM
  • Can you paste a screenshot of your project configuration and command line? Have you successfully compiled a non-MPI fortran f90 with your environment yet? I would suggest making sure that works fine before adding MPI components to it

    Anh

    Friday, February 24, 2017 1:13 AM
  • I think the LIBPATH for Link.exe doesn't have the ifort folder. If you look info your ifort compiler installation there should be a lib directory, something like C:\Program Files (x86)\Intel\Composer XE 2013 SP1\compiler\lib\intel64. You can try adding that to the list of additional library directories and see if that helps
    Friday, February 24, 2017 6:29 PM
  • Thanks, Anh, it turns out that the library path in tools-options-intel compilers and tools-visual fortran-compilers-x64, has been changed by me erroneously. By reseting, now I can build an x64 mpi fortran code. Thank you again for your patience. 
    Friday, February 24, 2017 9:57 PM
  • No worries. I'm glad it's working for you now. Let us know if you have other issues

    Anh

    Friday, February 24, 2017 10:51 PM