- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I just installed the latest openAPI base kit and the openAPI HPC kit. I'm using Visual Studio 2022 to run Fortran codes. I tried to run the mpi test code (test.f90) that comes with the HPC toolkit, but have been running into errors. For further information, I've configured the Visual Studio project as suggested here (https://www.intel.com/content/www/us/en/docs/mpi-library/developer-guide-windows/2021-9/configuring-a-microsoft-visual-studio-project.html).
Any clue what's going on here?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sounds like a path issue. The message indicates it found a mpi.mod file, but it is not of a version/platform compatible with the compiler chosen. Assure that you are not mixing platforms (Win32 vs x64 (vs x86)) amongst Build, Link and environment variables.
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
from the errors it is not finding the Intel MPI include directory. Specifically, this configuration
-
In Configuration Properties > C/C++ or Fortran, as appropriate, set the following parameter:
Additional Include Directories: $(I_MPI_ONEAPI_ROOT)\include
check that Configuration Property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Ron,
Thanks for the response! I checked that configuration property, and also checked that the module "mpi.mod" is in the path in the directory. The code is now running with an error "this module was generated for a different platform or by an incompatible compiler or compiler release." Is it possible that something didn't install correctly?
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sounds like a path issue. The message indicates it found a mpi.mod file, but it is not of a version/platform compatible with the compiler chosen. Assure that you are not mixing platforms (Win32 vs x64 (vs x86)) amongst Build, Link and environment variables.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks so much Jim! This might be very elementary, but what exactly should I do to make sure the Build, Link, and environment variables are consistent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried changing the configuration to x64 and now it works! Thanks Jim!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First: Start | System Information | Software Environment | Environment Variables
Check to see if I_MPI_ONEAPI_ROOT is defined properly (and verify the path and sub paths contains the files).
I haven't run an MPI test program on my system, but I notice that I_MPI_ONEAPI_ROOT has...\2021.9.0 whereas my newer version of OneAPI is 2023.1.0, so I do not know if that will present an issue (i.e. possibly I should install a 2023 version of Intel's MPI).
A second thing to check is the include paths in MS VS
**** OK ran a failing test ***
When I create a new project (MS VS 2019) using OneAPI 2023.1.0 but specifying include folder off of I_ONEAPI_ROOT (the 2021.9.0) I get the same error as you (incompatible version).
We need to go to the Intel OneAPI website to locate the (if there is) newer version of mpi, download and install.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@zhzhu1218 what configuration are you building?
Intel MPI only supports 64bit applications. You must set configuration to x64, NOT ia32. Needs to be a 64bit build.
If you try to build default ia32 32bit configuration you will get the error about the .mod file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My bad. MS VS defaulted to 32-bit app.
Ron, why isn't there an MS VS integration option to select an MPI build? It is a bit cumbersome and error prone to manually specify the additional include path (both compiler and linker) and the library path (linker).
Am I missing something?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ron_Green - i was initially building on a x86 configuration, and once I switched to 64 bit the problem was solved
@jimdempseyatthecove I also find the manual specification quite cumbersome, especially since this is required for every new program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MPI vendors provide compiler "wrappers" to make the compilation easier. These are for the command line. for example, if hello_mpi.f90 is an MPI program:
mpiifort -o hello hello_mpi.f90
sets the include directories, lib directories, and pulls in the .lib or .dll files at link time. The wrapper makes it easy!
But I do not know how to tell Visual Studio to use 'mpiifort' instead of 'ifort' for the compiler.
So command line is easy, Visual Studio needs changes to the configuration since it does not know about MPI by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ron_Green @jimdempseyatthecove , not directly related to the original problem, but have you folks also noticed that when running mpi codes on visual studio, the console automatically closes after debugging? The same doesn't happen when running codes that don't use the mpi library / mpiexec.exe
Any clue how this can be fixed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Put a break point at the end of the program
or place a PAUSE statement at the end of the program (conditionally enabled in Debug build).
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page