Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

impi.dll not found when running fortran app from visual studio 2019

fernando1
Beginner
2,243 Views

I'm using Visual Studio 2019 with Intel oneapi base and HPC toolkits. When I try to use mpi in a fortran application, it builds the code correctly, but when I run it, I get the error message "can't find impi.dll". I've tried a lot of solutions but nothing works, execpt when I copy the files impi.dll and impifabric.dll to the local project directory.

0 Kudos
10 Replies
SantoshY_Intel
Moderator
2,216 Views

Hi,

 

Thanks for reaching out to us.

 

Could you please check whether impi.dll is present in the installed oneAPI directory below:

 

Intel\oneAPI\mpi\2021.x.0\bin\debug 

 

In the absence of impi.dll, please reinstall the latest oneAPI HPC & Base toolkit.

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)"

 

Now try re-building and debugging your project. Let us know if the issue still persists.

 

Thanks & Regards,

Santosh

 

0 Kudos
fernando1
Beginner
2,202 Views

Thanks for your answer. There are two impi.dll files, one for debug and the other for release configuration, while the libfabric.dll is the same for both configurations. I solved the problem including to the PATH variable in Configuration Properties->debugging-environment the statements:

$(I_MPI_ONEAPI_ROOT)\bin\release, for the release configuration and

$(I_MPI_ONEAPI_ROOT)\bin\debug, for the debug config.

 

Do you think that is a proper solution ? It works fine now.

 

Best regards,

Fernando Ribeiro

 

0 Kudos
SantoshY_Intel
Moderator
2,159 Views

Hi,

 

Glad to know that your issue has been resolved.

>>"Do you think that is a proper solution? It works fine now."

It is an official workaround provided by Intel which was documented. Please refer to the below link.

https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-windows/top/compiling-and-linking/configuring-a-visual-studio-project.html

 

As your issue has been resolved, Could you please confirm whether to close this thread?

Awaiting your reply.

 

Thanks & Regards,

Santosh

 

 

0 Kudos
fernando1
Beginner
2,106 Views

Thanks for your answer. In fact I followed the instructions in the link you sent me, but for my surprise it didn't work. For example, in the statement

  • Environment: 
    PATH=$(I_MPI_ONEAPI_ROOT)\bin\$(ConfigurationName)$(I_MPI_ONEAPI_ROOT)\libfabric\bin;$(PATH)
     
    $(ConfigurationName) should stand for the release and debug configutations, so I had to include it manually, like this:
     
    PATH=$(I_MPI_ONEAPI_ROOT)\bin\$(ConfigurationName)$(I_MPI_ONEAPI_ROOT)\bin\release$(I_MPI_ONEAPI_ROOT)\libfabric\bin;$(PATH) for the release configuration and
     
    PATH=$(I_MPI_ONEAPI_ROOT)\bin\$(ConfigurationName)$(I_MPI_ONEAPI_ROOT)\bin\debug$(I_MPI_ONEAPI_ROOT)\libfabric\bin;$(PATH) for the debug configuration.
     
    That means that the environment variable $(ConfigurationName) isn't being recognized at this stage. Also I've seen others installations where the environment box doesn't even need to be specified for everything to work fine.
     

0 Kudos
SantoshY_Intel
Moderator
2,095 Views

Hi,


"There’s still one typo (missing semicolon) that will be fixed in the next update of the IMPI documentation".

 

Current,

PATH=$(I_MPI_ONEAPI_ROOT)\bin\$(ConfigurationName)$(I_MPI_ONEAPI_ROOT)\libfabric\bin;$(PATH)

 

Correct,

PATH=$(I_MPI_ONEAPI_ROOT)\bin\$(ConfigurationName);$(I_MPI_ONEAPI_ROOT)\libfabric\bin;$(PATH)

 

Please let us know if you still face the issue.


Thanks & Regards,

Santosh


0 Kudos
fernando1
Beginner
2,076 Views

I have included the semicolons but it still doesn't work. There is something wrong with my installation related to the PATH.

I have seen some installations that its not necessary to specify these environment variables.

0 Kudos
SantoshY_Intel
Moderator
2,053 Views

Hi,

Could you please let us know the Visual studio version you have been using?

 

Thanks,

Santosh

 

0 Kudos
fernando1
Beginner
1,869 Views
0 Kudos
SantoshY_Intel
Moderator
1,972 Views

Hi,

We have not heard back from you. Is your issue resolved? If not, could you please let us know the Visual Studio version you have been using?


Thanks,

Santosh


0 Kudos
SantoshY_Intel
Moderator
1,904 Views

Hi,


As we have not heard back from you, we are considering that your issue has been resolved. So 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. 

Have a Good day!


Thanks & Regards

Santosh


0 Kudos
Reply