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

VS MPI App Cannot Find impi.dll

hentall_maccuish__ja
New Contributor II
3,751 Views

I am facing the VS integration issue described in this thread.  I'm reposting as that thread is no longer followed by intel support and I am now facing exactly the same issue on a completely fresh install with the latest VS2019, so it seems this is not a one off problem.

The issue is that I cannot execute a mpi application via mpiexec from inside VS. As outlined in the other thread the code 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 intel oneAPI command line with mpiexec.exe 

The settings I shared appear to be corect:

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

And I have tried the suggestion in the other thread and they haven't helped. In particular I am now using VS2019 on a different machine and I tried manaully overwritting I_MPI_ONEAPI_ROOT with the value echoing it in the intel oneApi command line.

One observation that might be useful is that the enviroment variable PATH is a lot shorted when outputted from VS using get_environment_variable than when echoed from the intel oneAPI command line (~6000 chars vs. ~3000 chars) but both are longer than PATH when echoed from the windonws cmd command line (<2000).

Thanks for your help

0 Kudos
1 Solution
James_T_Intel
Moderator
3,690 Views

In your Debugging settings, please try replacing:


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


with:


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


View solution in original post

10 Replies
AbhishekD_Intel
Moderator
3,731 Views

Hi,



Thanks for the complete details.

Please check if the impi.dll is present in the installed oneAPI directory. You can refer to the below path:

Intel\oneAPI\mpi\2021.2.0\bin\debug for the presence of impi.dll.

If the file is not present then please reinstall the latest oneAPI Basekit and HPCkit.

And if the file is present in the directory then try adding the below lines in Project Properties -> Configuration Properties -> Build Events -> Post Build Event -> Command Line option.


copy /Y "$(I_MPI_ONEAPI_ROOT)\bin\debug\impi.dll" "$(TargetDir)"

copy /Y "$(I_MPI_ONEAPI_ROOT)\libfabric\bin\libfabric.dll" "$(TargetDir)"


And try re-building and debugging your project. Let us know if are still getting the same issue.

Hope the provided details will help you to resolve your issue.



Warm Regards,

Abhishek


0 Kudos
hentall_maccuish__ja
New Contributor II
3,717 Views

Yes impi.dll is in that folder and also in the release counterpart which isn't suprpising as the code runs through mpiexec in the oneApi comannd line. The issue seems to be purely VS integration.

I don't understand why  but even the workaround you suggest of having a post build event to copy impi.dll to the target directory has not worked. I get exactly the same error message about being unable to find impi.dll  

Of course I have built and rebuilt the project mulitple times. I also can't debug the issue as a system error is being thrown before visual studio enter the project code or debug, so that no code is reached in debug mode but an error is thrown than I can't pass. I have included a screen shoot below if that helps.

If it helps replicate the issue, on the two computer I have experinced this problem my user account does not have admin rights but I was using evalted previdgles of a different admin account to install the software. Otherwise everything about the installation process was completely straightforward.

hentall_maccuish__ja_0-1621593966587.png

 

 

0 Kudos
AbhishekD_Intel
Moderator
3,696 Views

Hi,


This issue is more related to VS and your environment. We tried reproducing this issue on our end on different Win10 machines and we are not able to reproduce it from our end.

We are looking into this issue internally and will update you with the details.



Warm Regards,

Abhishek


0 Kudos
James_T_Intel
Moderator
3,691 Views

In your Debugging settings, please try replacing:


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


with:


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


hentall_maccuish__ja
New Contributor II
3,640 Views

Thanks. No that change made no difference . Exactly the same system error as shown in the screen shoot. 

Is there any information that might help you replicate this issue? Like I say I have had exactly the same problem on two machines in two different organisation with different IT policies so it doesn't feel like an isolated incident. In neither did my user account have admin rights and below is the system information for the machine on which I was doing a completely fresh install. Let me know if any other info would be helpful to try and replicate.

hentall_maccuish__ja_1-1622212424281.png

 

 

0 Kudos
James_T_Intel
Moderator
3,617 Views

I was able to reproduce it by copying the settings you mentioned in your first post into a new project. I modified the settings to what I showed and that resolved it for me. Can you zip up your entire solution and project and attach that for me to test?


0 Kudos
hentall_maccuish__ja
New Contributor II
3,581 Views

Appologies for the silence. I haven't been able to get on the machine affected since. Yes I will send the zipped solution as soon as I do. Thanks

0 Kudos
James_T_Intel
Moderator
3,547 Views

Have you had an opportunity to get the solution and project together?


0 Kudos
hentall_maccuish__ja
New Contributor II
3,535 Views

Sorry for the long silence again and apologies as I have accidently misled. I logged on to the machine in question to get the project solutions to upload here and realised that I had changed the environment path in a non-active configuration. When I made the change in the right configuration it worked. I have accepted your solution above. Thank you for resolving the issue for me.

0 Kudos
James_T_Intel
Moderator
3,526 Views

No worries, I'm glad everything is working now.


Intel support will no longer be monitoring this thread. Any future replies will be considered community only.


0 Kudos
Reply