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

MPI Intel Fortran and Visual Sudio 2022 configuration

fernando1
Novice
185 Views

I'm using visual studio community 2022 and intel oneapi base and HPC toolkits, latest versions. I followed the intel instructions to configure MPI Fortran, as shown abobe:

Configuring a Microsoft Visual Studio* Project

To configure a Microsoft Visual Studio* project with Intel® MPI Library, do the following:

  1. In Microsoft Visual Studio*, create a console application project or open an existing one.

  2. Open the project properties, go to Configuration Properties > Debugging and set the following parameters:

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

    Command arguments: -n <processes-number> "$(TargetPath)"

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

    NOTE: 
    If you have installed the Microsoft Visual Studio* integration, go to Project > Properties > Intel Libraries for oneAPI > Use Intel MPI Library and set it to Yes. You can skip the steps below.
  3. In Configuration Properties > C/C++ or Fortran, as appropriate, set the following parameter:

    Additional Include Directories: $(I_MPI_ONEAPI_ROOT)\include

  4. In Configuration Properties > Linker, set the following parameter:

    Additional Library Directories: $(I_MPI_ONEAPI_ROOT)\lib\$(ConfigurationName);$(I_MPI_ONEAPI_ROOT)\lib

  5. In Configuration Properties > Linker > Input, set the following parameters:

    • For Fortran, set Additional Dependencies: impi.lib
    • For C++, set Additional Dependencies: impi.lib and impicxx.lib

 

First, I get the the error message:

error #5102 Cannot open include file 'mpif.h'

Second, I don't see an option :

Project > Properties > Intel Libraries for oneAPI > Use Intel MPI Library and set it to Yes

 

This error is really annoyind and I've been looking for a solution for a long time. I would really appreciate if anyone can help me with this issue.

Thanks in advance,

 

Fernando Ribeiro

 

0 Kudos
1 Solution
fernando1
Novice
114 Views

Problem solved. Thank you very much !

View solution in original post

0 Kudos
2 Replies
fernando1
Novice
115 Views

Problem solved. Thank you very much !

0 Kudos
Reply