Unresolved External symbol - MPI Compilation

Unresolved External symbol - MPI Compilation

Hi,

I am trying to compile a setup for my current code on a new machine in Visual Studio.
I have made the changes in the following places:

Properties -> Fortran -> General -> Add include directories as "C:\Program Files\OpenMPI_v1.6-win32\include" 
Properties -> Fortran -> PreProcessing -> Add include directories as "C:\Program Files\OpenMPI_v1.6-win32\include" 
Properties -> Linker-> General-> Add Library Dependencies as C:\Program Files\OpenMPI_v1.6-win32\lib;
Properties -> Linker-> Input -> Additional Dependencies as libmpi.lib libmpi_cxx.lib libmpi_cxxd.lib libmpi_f77d.lib libmpid.lib libopen-pal.lib libopen-pald.lib libopen-rte.lib libopen-rted.lib

I believe the above steps got me working on my previous machine, but I still keep getting compile errors like these:

Error    1     error LNK2019: unresolved external symbol _MPI_INIT 

Any reason why i should get this?

PS: I change the link to the MPI directory to x64 OpenMPI 1.62 when I run in my new system

 

 

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Steve Lionel (Intel)

That's actually a link error, not a compile error. The simple answer is that there is no routine named _MPI_INIT in the library you are linking to. The first thing I would do is search the C:\Program Files\OpenMPI_v1.6-win32\lib folder for the library that contains _MPI_INIT in exactly that case. I like to use Agent Ransack for such searches. Then you need to make sure that library is listed under Additional Dependencies.

Steve

In view of your shift to X64, apparently you are hoping that the (no longer supported) MSVC X64 builds of OpenMPI included ifort bindings, although there is no evidence of that.  The amd64\bin\link.exe will ignore the 32-bit libraries which you used previously.

Unfortunately, Windows hasn't proven a popular enough platform for MPI to justify OpenMPI keeping up support for ifort.  Note the recommendation to use the cygwin version if wanting to run OpenMPI on Windows.  It seems difficult for this forum to provide better support for old OpenMPI versions than the OpenMPI forums do.

ifort support for Windows is included in MPICH2 and Intel MPI.
 

Connectez-vous pour laisser un commentaire.