Solving OpenMPI Problems on Windows

  • Thread starter Thread starter FunkyDwarf
  • Start date Start date
  • Tags Tags
    Windows
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues related to setting up OpenMPI on a Windows machine. Participants are exploring problems with the mpicc compiler not locating necessary header files, specifically mpi.h and standard library headers like stdio.h and stddef.h. The conversation includes technical details about environment variable paths and compiler configurations.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports issues with mpicc not finding basic libraries, leading to errors related to missing header files.
  • Another participant suggests checking the order of included directories in the Visual C++ IDE, as incorrect ordering can lead to errors.
  • There is a discussion about the necessity of Visual Studio for using cl.exe, with one participant questioning if it is possible to avoid using Visual Studio altogether.
  • A suggestion is made to use a program that converts arguments for cl.exe to those used by GNU C/C++ compilers, indicating potential workarounds for the issue.
  • Concerns are raised about the implications of using different versions of include files and the importance of the order in which paths are passed to cl.exe.
  • One participant notes that stddef.h may not be a standard library header and suggests ensuring that special SDK include files are referenced correctly in the include path.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of Visual Studio for compiling with OpenMPI and the correct configuration of include paths. The discussion remains unresolved regarding the best approach to configure the environment for OpenMPI on Windows.

Contextual Notes

Limitations include potential missing assumptions about the setup of the development environment and the specific configurations required for different compilers. The discussion also highlights the complexity of managing multiple compilers and their respective include paths.

FunkyDwarf
Messages
481
Reaction score
0
Hey gang,

I'm trying to get started with OpenMPI on my windows machine (crazy/stupid I know, one day I will man up and dual boot linux) but I'm running into a few problems.

I can get mpiexec to work fine to run jobs, i.e. examples that come with various installs, but mpicc doesn't seem to want to work.

Specifically, it doesn't seem to find basic libraries used by mpi.h. I get errors like:

fatal error c1083: Cannot open include file: 'stdio.h' no such file or directory.

I have MingW installed for gcc/g++ and they work fine. My environment variable paths are as follows:

C:\OpenMPI\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\MinGW\bin;

The only reason Visual studio is there is for cl.exe which is apparently needed by MPI. The IDE path is there for some .dll.

Am I doing something stupid (apart from using windows to code on) or missing something obvious?

Thanks!

EDIT:
I tried including
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include
to the path as well and now it can't find stddef.h even though it resides in this folder as well :\
 
Technology news on Phys.org
Hey FunkyDwarf.

I have a few suggestions.

The first relates to the order of included directories in Visual C++ IDE. Sometimes if they are in the wrong order, weird errors happen and it's mainly got to do with when you have different include file specifications.

The second relates to the nature of the actual include directories themselves. If they are like say http://blogs.msdn.com/b/vsproject/archive/2009/07/07/vc-directories.aspx (scroll down to include screen shot), then you will have more directories to include than the one you mentioned above.

The other thing relates to versions of include files and what comes with each compiler (in this case the VC++ one as part of of the Visual Studio Suite). In this case, wrong versions will tend to create lots of errors.
 
Hi chrio,

Thanks for the reply. Just to qualify your statement, do you mean the order of Visual C++ stuff in that program, or in the path I listed?

I'm not actually using VC, I only installed it for the cl.exe file. I'm trying to run everything from command line and I use a different IDE for the programming itself.

I tried seeing if there is a way to do all of this without VC but I'm yet to find one, is it possible?
 
FunkyDwarf said:
Hi chrio,

Thanks for the reply. Just to qualify your statement, do you mean the order of Visual C++ stuff in that program, or in the path I listed?

I'm not actually using VC, I only installed it for the cl.exe file. I'm trying to run everything from command line and I use a different IDE for the programming itself.

I tried seeing if there is a way to do all of this without VC but I'm yet to find one, is it possible?

One thing that you can do is to use a program that converts the argument list given to cl.exe to an argument list used for say the GNU C (or C++ depending the code) compiler and then simply call the other compiler to compile the code.

If for some reason though the DLL uses some kind of specialized Microsoft functionality (like a .NET, COM, MFC, whatever type structure/interface) then you will need to use the Microsoft Compiler.

For the path information, if you are passing path information to cl.exe then yes it is this order that I'm referring to and the order is important especially if you are using different code-repositories with different versions, or different meanings. For example, if you've ever done windows programming, you may have realized that when you include "windows.h", you are including a plethora of definitions of all kinds and including stuff at the wrong time will give you a tonne of compiler errors associated with redefinitions and other messages that fill the error window in a few seconds (or less).

So if you give a path, pass this to cl.exe in the right order and make sure that the list is also complete.

The other thing is stddef.h is actually synonymous with an application header and not necessarily a standard library or SDK header (it may be, but I do know that certain IDE's set this up to put all the standard application definitions in one place), so you should also make sure if you have special SDK include files, that this directory is referenced before every other include directory.
 

Similar threads

Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
22
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K