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

VS MPI App Cannot Find impi.dll

hentall_maccuish__ja
New Contributor II
1,889 Views

I have recently migrated from parallel studio to oneAPI HPC and I cannot run a MPI application in visual studio. It compiles fine but when I try to run in Visual studio it produces an error stating it cannot find impi.dll. The compiled executable of the project code executes fine from the command line with mpiexec.exe when I manually run setvars.bat.

I have set all the project settings to run an mpi app mentioned here https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-windows/top/compiling-and-linking/configuring-a-visual-studio-project.html replacing $(I_MPI_ROOT)\intel64 with $(I_MPI_ONEAPI_ROOT). I have also extended the PATH environment variable as suggested here https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/I-MPI-ROOT-issue-in-VS-after-installing-oneapi/m-p/1243225 . Finally, I have replaced $(ConfigurationName) in the suggestions in this thread with the hard coded configuration name as a user claimed was needed to get it working for them. None of this has fixed the issue.

I didm't have this many issue running an mpi application in visual studio with parallel studio and like I said the complied project code does run with mpiexec if I manually set everything up in the command line. That just isn't a workable long term solution.

I am using VS2017 version 15.9 which I think is meant to be supported.


Thanks

0 Kudos
6 Replies
AbhishekD_Intel
Moderator
1,806 Views

Hi,

 

Thanks for reaching out to us.

It seems that the issue is more related to your Visual Studio Environment as you can execute the same executable using the command-line. We tried running a simple MPI sample on Visual Studio with the latest Intel Compiler but didn't observe that same problem, we are able to compile and execute it with VS.

Please try using the attached config file(.vcxproj) with a simple MPI sample and let us know the results, directly open the attached file in VS, add any simple MPI sample file/code and try compiling & executing with the same configuration.

 

If the provided configuration works then you can use the same configuration for your existing project.

 

Please let us know your findings.

 

 

Warm Regards,

Abhishek

 

hentall_maccuish__ja
New Contributor II
1,795 Views

Hello,

That is very helpful. Unfortrauntaly I am trying to run a fortran mpi program and the project file you sent is for a C++ project. I should have specified this in my post, it was an oversight on my part. Sorry for the confusion.

Thanks,

Jamie

0 Kudos
hentall_maccuish__ja
New Contributor II
1,792 Views

Here are the VS setting I think are relevant in case someone can help me spot any error:

In Debugging:

Command: $(I_MPI_ONEAPI_ROOT)\bin\mpiexec.exe

Command Arguments: -n 7 "$(TargetPath)"

Environment : $(I_MPI_ONEAPI_ROOT)\bin\release;$(I_MPI_ONEAPI_ROOT)\libfabric\bin\release

In Fortran, General:

Additional Include Directories: $(I_MPI_ONEAPI_ROOT)\include

In Linker, General:

Additional Libary Directories: $(I_MPI_ONEAPI_ROOT)\lib\release;$(I_MPI_ONEAPI_ROOT)\lib;

In Linker, Input

Additional Dependencies: impi.lib

Thanks,

0 Kudos
AbhishekD_Intel
Moderator
1,757 Views

Hi,


We have verified your configuration and they seem to be the same as that of our configuration.

But we are unable to reproduce the problem that you are getting. The same configuration is working for us.

We will try to reproduce it on some different system and if we observed the same problem will try to resolve it and will get back to you.

Meanwhile if possible you can try updating your VS to VS2019 supported version.

Will get back to you with the updates.



Warm Regards,

Abhishek


0 Kudos
Michael_Intel
Moderator
1,708 Views

Hello,


Since your environment works on the command line, please compare the I_MPI_ONEAPI_ROOT environment there to the one used inside your VS.


Best regards,

Michael


0 Kudos
Michael_Intel
Moderator
1,675 Views

This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


0 Kudos
Reply