I succeded, with some help, at compiling and running a MPI program from commandline on windows. Now I'm trying to compile this program with my IDE code::blocks and it fails.
Under Settings -> Compiler... -> Other Settings -> Advanced Options -> Command line macros
I removed all the unnecessary flags and simly left:
$compiler $file
Settings -> Compiler... -> Toolchain executables
I simly have the MPI wrapper mpicc.exe
for C prgrams and mpic++.exe
for C++.
When I now click on Build
(Ctrl +F9) a small popup window opens stating:
cl.exe - application error
the error code is 0xc00000be
in the build log window of code::blocks I get:
mpicc.exe C:\Entwicklung\src\mpi_prime.c Skipping linking (no linker program set): C:\Entwicklung\src\mpi_prime.exe Process terminated with status -1073741634 (1 minutes, 37 seconds) 0 errors, 0 warnings (1 minutes, 37 seconds)
And here I'm stuck again, left with a few questions?
- should I keep the mpicc.exe wrapper?
- code::blocks tries always to invoke a linker etc. where can I turn that off?
- I wanted to change my compiler from cl to gcc from the start, should I try that first?
EDIT 1:
mpicc.exe /nologo /W3 /MD /Ox /DNDEBUG /IC:\Entwicklung\CUDA\VS2012~1\VC\include /IC:\Entwicklung\CUDA\VS2012~1\VC\include /c main.c /Foobj\Release\main.obj link.exe /nologo /LIBPATH:C:\Entwicklung\CUDA\VS2012~1\VC\include /LIBPATH:C:\Entwicklung\CUDA\VS2012~1\VC\include /out:bin\Release\mpi_test_projektarbeit.exe "..\..\..\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib" msvcrt.lib msvcprt.lib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib" obj\Release\main.obj Process terminated with status -1073741634 (0 minutes, 1 seconds) 0 errors, 0 warnings (0 minutes, 1 seconds)
I believe I did set up everything as it should be, however I still get the popup with the error code. I will fiddle with it. If nothing works, I'll try reinstalling code::blocks maybe this will help.
EDIT 2:
First, it's still not running. Second, I believe I have a much better understanding now whats going on and whats wrong.
By trying out diffrent things, I tried using cl.exe directly without the mpicc.exe wrapper. I chose Settings -> Compiler... -> Microsoft Visual C++ 2010
, codeblocks was offering me. Trying to build project I received exactly the same error message (had to discipline my noScript to show me the message) as with mpicc.exe
. mpicc.exe invokes cl.exe in its mpicc-wrapper-data.txt
manifesto.
So with some google magic, I found at the codeblocks forum this page, where someone else had exactly the same error message. Their suggestion was to add the additional environment PATHs, which made me think. Before I ran mpicc
from command line I had to run vcvarsall.bat
first because I got an error that mspdb110.dll
was missing. So I took a closer look at vcvarsall.bat
which was invoking another batch-file vcvars32.bat
. That file temporarily added PATH variables. So I added
C:\Entwicklung\CUDA\VS 2012\Common7\IDE\
permanently to my PATH, and mpicc.exe
can be invoked without any missing DLL error message, but trying to compile, shows up with some linker error unable to find advapi32.lib
. I will look into it deeper and as soon as it runs on commandline without the help of vcvars32.bat
I'll try it from CB again. I hope this is causing all my problems.
There is still one other thing confusing me a little bit, nothing serious but when I uninstalled CB and installed it again, CB had may
"new" mpi
compiler setup somewhere saved. I checked my installation folder: all files were deleted after uninstalling it, so I also deleted the CB folder under USER\AppData\
. However installing CB anew, the compiler settings where still present at CB startup, asking me if I wanted to import them?!?