Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27159 Discussions

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

fernando1
Beginner
890 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
863 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

 

fernando1
Beginner
849 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

 

SantoshY_Intel
Moderator
806 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/c...

 

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

Awaiting your reply.

 

Thanks & Regards,

Santosh

 

 

fernando1
Beginner
753 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.
     

SantoshY_Intel
Moderator
742 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


fernando1
Beginner
723 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.

SantoshY_Intel
Moderator
700 Views

Hi,

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

 

Thanks,

Santosh

 

fernando1
Beginner
516 Views
SantoshY_Intel
Moderator
619 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


SantoshY_Intel
Moderator
551 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


Reply