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

Visual Studio Fortran Missing MPIF library after clean install

SNORLAXMAN
Beginner
14,567 Views

I am trying to use visual studio Version 17.7.4 in conjunction with the Intel oneAPI HPC tools to compile a fortran program for me to use from an open source project. I checked that the installed oneAPI files are good with the below attached picture. When I try to compile the program I get the following error. I assumed it was because there is a missing library so I followed the attached guide to enable the MPI library. This did not change anything. I made sure to run the setvars file as well but that didn't change anything either.  I have attached what I changed in visual studio and would love if someone could help me out with this issue. Thank you very much.

0 Kudos
14 Replies
RahulC_Intel
Moderator
14,533 Views

Hi Dylan, we have moved your query to the respective team and they will get back to you soon.



0 Kudos
SNORLAXMAN
Beginner
14,499 Views

Thank you very much I look forward to the reply!

0 Kudos
VeenaJ_Intel
Moderator
14,448 Views

Hi, 

 

Thank you for your post on the Intel Communities forum.

 

We have made an attempt to recreate your issue in debug mode by configuring the same settings as indicated in the screenshots, using a sample "Hello World" program. However, we were unable to reproduce the issue.

 

 

To assist you further, please check if you have configured any additional settings beyond those mentioned.

 

We observed a few discrepancies in your settings:

 

1. In Configuration Properties -> Debugging -> Command Arguments, please specify the number of processes. For example, you can use the following format: -n 2 "$(TargetPath)".

2. In Configuration Properties -> Debugging -> Environment, please ensure that you properly close the brace for the PATH environmental variable.

 

While these discrepancies may not affect compilation, they could potentially result in errors during the execution of the executable.

 

Additionally, it would be helpful if you could provide the following details:

 

1. Your operating system's version.

2. The sample code that reproduces the issue.

3. CPU and Hardware details.

4. Kindly, mention whether you are using "debug" or "Release" mode

 

 

This information will aid us in our efforts to reproduce and address the problem on our end.

 

Thanks and Regards,

Veena

 

0 Kudos
SNORLAXMAN
Beginner
14,412 Views

Thank you for the response.

 

I have updated the the values you told me but I received the same error.

 

My hardware configuration is as followed.

1. Your operating system's version.

  • Windows 11 Pro Build 22621.2283

2. The sample code that reproduces the issue.

  • I have attached the Fortran code.

3. CPU and Hardware details.

  • 13700K, 4070, 32GB DDR5 Ram, 1 TB Samsung 980 Pro, 2Tb Intel 760p

4. Kindly, mention whether you are using "debug" or "Release" mode

  • I was using "debug" mode for the initial tests
0 Kudos
SNORLAXMAN
Beginner
14,410 Views

I wanted to add one more thing which is the slide from their installation guide. I didn't think it mattered but wanted to share in case it helps figure out the problem. For when I was trying to build the program all I was doing in visual studio was either building a solution (Ctrl+Shift+B), Build with (Ifort) (Ctrl +B), and compile with (Ctrl +F7). I wanted to use the Intel MPI command "$ mpiifort –o MobCal-MPI_2.exe MobCal-MPI_2.f -Ofast" and not the OpenMPI due to the programming running much faster on the Intel packages.

0 Kudos
VeenaJ_Intel
Moderator
14,103 Views

Hi, 

 

Thank you for your prompt response.

 

We made an effort to replicate the issue using the provided code on our end. In the "Debug" mode, the compilation was successful, and we didn't encounter any errors. However, during runtime, we encountered a crash. Although the initial problem pertains to compilation, we acknowledge it for now. We have attached screenshots illustrating the properties settings, compilation process, and code execution for your reference.

 

On the other hand, when we attempted to compile the code with identical settings in "Release" mode, we encountered the same error that you mentioned. This issue also occurred when we tested it with a "Hello World" sample program. To assist in the debugging process, we have attached screenshots depicting the error.

 

I have attached the "Hello World" sample program. Kindly run it on your system in both "Release" and "Debug" modes and share the results with us. Also, kindly share us the output of "lscpu" command. This would greatly assist us in further debugging.

 

Thanks and Regards,

Veena

 

 

0 Kudos
SNORLAXMAN
Beginner
14,055 Views

Thank you for the reply. I attempted to run your code on my xps 15 9520 laptop which has a 12700H and 3050ti since I was away from my desktop system. All software is running the same versions to my initial request. Regardless of the computer configuration I received the same error of the cannot open 'mpif.h'. Running in debug or release gives me the same error. The release and debug have different default libraries so the libraries you save for debug will be different for release if you did them separately. I am just trying to figure out why it only worked on one and not the other one for you.

 

I have attached what I have put in for my properties in case there is a misspelling even though I have triple checked with your output although some of the text is blocked due to how long the line is. One thing that is very odd to me is this line in the MPI library developer guide for windows OS. "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." I have looked for this setting in my properties and I cannot find it for the life of me which is very odd.

 

I have attached the output of the windows equivalent of "lscpu" command being "wmic cpu list /format:list".

 

Thank you again for the continued support.

0 Kudos
VeenaJ_Intel
Moderator
14,020 Views

Hi,

 

I have tried reconfiguring our settings in "Release" mode. Now, in 'Release' mode, both the sample 'Hello World' code and the code provided earlier by you compile without any issues.

 

We suspect that error which you face  may occur when the configuration settings are incorrect. To facilitate a more effective comparison of the settings, could you kindly share your project files (i.e., .vfproj and .proj files) by compressing the folder into a ZIP file?"

 

Thanks and Regards,

Veena

 

 

0 Kudos
SNORLAXMAN
Beginner
14,009 Views

Thank you again for the continued support. I have attached the zipped project files. Thank you very much!

0 Kudos
SNORLAXMAN
Beginner
14,009 Views

I should also note even if I try to open the matrix multiply example project it says it is missing the vcxproj file which doesn't make any sense as well. So something definitely is wrong.

0 Kudos
SNORLAXMAN
Beginner
13,863 Views

I repaired the mpi and dpc++ packages and for some reason it worked after it compiled!!!

 

SNORLAXMAN_0-1695356444236.png

Best,

Dylan

0 Kudos
VeenaJ_Intel
Moderator
13,808 Views

Hi,


I successfully ran the project file you provided and I'm pleased to inform you that we were able to compile the code using the project settings you supplied.


Furthermore, we're glad to hear that your issue has been resolved. If you encounter any other issues related to this , please don't hesitate to reach out. Could you please confirm whether we can close this thread?


Thanks and Regards,

Veena


0 Kudos
SNORLAXMAN
Beginner
13,740 Views

You can close this thread now. Thank you for the quick replies!

0 Kudos
VeenaJ_Intel
Moderator
13,582 Views

Hi,

 

Glad to know that your issue is resolved. Thanks for sharing the solution with us. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Thanks and Regards,

Veena

 

0 Kudos
Reply