Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

Setting Visual Studio for getting started with Intel MPI

Jihoe_K_
Beginner
1,614 Views

I am trying to set up the mpi development on my computer (Windows 7).

 I Installed the Intel® Cluster Studio XE 2013 Evaluation version, and succeeded in building/running the test.f90 on the command line (Build Environment for Intel Cluster Studio XE 2013).

 But I am having a problem in using it on the Visual Studio 2010, 

Current Situation :

 smpd service is running,

 The environmental variablePATH is as shown below.

C:\Program Files (x86)\Intel\Composer XE 2013\bin\ia32;C:\Program Files (x86)\Intel\MPI\4.1.0.023\em64t\bin;C:\Program Files (x86)\Intel\MPI\4.1.0.023\ia32\bin;%INTEL_DEV_REDIST%redist\intel64\mpirt;%INTEL_DEV_REDIST%redist\ia32\mpirt;%INTEL_DEV_REDIST%redist\intel64\compiler;%INTEL_DEV_REDIST%redist\ia32\compiler;C:\Program Files (x86)\Intel\Trace Analyzer and Collector\8.1.0.023\bin;C:\Program Files (x86)\Intel\icsxe\2013.0.028\bin;C:\Program Files (x86)\Intel\MPI\4.1.1.036\ia32\include;C:\Program Files (x86)\Intel\MPI\4.1.1.036\ia32\lib;C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ia32;C:\Program Files (x86)\Tecplot\Tec360 2008\Bin;C:\Python25\;C:\usr\texlive\2011\bin\win32;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\

 

 As mentioned above, compiling/running the test on the command line (using the 'mpiifort' using the "Cluster Studio XE 2013 for Windows OS Build Environment")  is done well. But When I try to build the same source using the Visual Studio, the errors are as below.

Case 1. When I use "use mpi" statement,

   error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MPI]

 

 Case 2. When I use "include 'mpif.h'" statement,

  error #5102: Cannot open include file 'mpif.h'

 

  Should I define the additional include path in the project to use the mpi library and include files?

0 Kudos
3 Replies
Jihoe_K_
Beginner
1,614 Views

I added include directory and lib directory paths in Additional Include Directories Tab (Project Property -> Fortran -> General),

And the build went to further stage (Linking).  But then warning and errors.

 

1>Linking...

1>ipo: warning #11077: D:\sources\MPITest\MPITest\x64\Debug\MPITest.obj: locally defined symbol __imp_MPIFCMB5 imported

1>ipo: warning #11077: D:\sources\MPITest\MPITest\x64\Debug\MPITest.obj: locally defined symbol __imp_MPIPRIV1 imported

1>ipo: warning #11077: D:\sources\MPITest\MPITest\x64\Debug\MPITest.obj: locally defined symbol __imp_MPIPRIV2 imported

1>ipo: warning #11077: D:\sources\MPITest\MPITest\x64\Debug\MPITest.obj: locally defined symbol __imp_MPIPRIVC imported

1>MPITest.obj : warning LNK4049: locally defined symbol MPIFCMB5 imported

1>MPITest.obj : warning LNK4049: locally defined symbol MPIPRIV1 imported

1>MPITest.obj : warning LNK4049: locally defined symbol MPIPRIV2 imported

1>MPITest.obj : warning LNK4049: locally defined symbol MPIPRIVC imported

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_INIT referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_COMM_SIZE referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_COMM_RANK referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_GET_PROCESSOR_NAME referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_RECV referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_SEND referenced in function MAIN__

1>MPITest.obj : error LNK2019: unresolved external symbol MPI_FINALIZE referenced in function MAIN__

 1>x64\Debug\MPITest.exe : fatal error LNK1120: 7 unresolved externals

 

The reason I guess is because the Studio uses ifort compiler directly without wrapping it with MPI as when using mpiifort.bat.

Is there anyone to help me?

 

 

  

0 Kudos
Jihoe_K_
Beginner
1,614 Views

 I realize I missed one thing (add impid.lib to additional dependency).  

Now I can build it with VS2013,  But still there is a warning message with debug mode compilation in 64 bit. 

1>ipo: warning #11077: D:\sources\implicit_drag\PARALLELIZATION\PARALLEL1\x64\Debug\drag_force.obj: locally defined symbol __imp_MPIFCMB5 imported

The error is not happening in Debug-32bit compile,  Release-32 bit compile , and Release-64bit compile.

But it occurs in Debug-64bit compilation.

Can I just ignore this?

0 Kudos
alaferg
Beginner
1,614 Views

I had the same link errors and adding in the impi library worked. I just wanted note that unlike most of the other libraries, the name of the debug version doesn't add a d, as you would expect. Instead the debug and release versions are in separate folders, which I'm guessing would fix the error in debug mode that you were having. For my Intel MPI distribution, I have these as

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\mpi\intel64\lib\debug\impi.lib

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\mpi\intel64\lib\release\impi.lib

0 Kudos
Reply