MPI with MinGW and Eclipse - mpi

My question is devided in two parts :
What is the best combination to execute MPI program in C language, when i searched for the necessary tools i found who work with Visual Studio and MS-MPI , and who work with Eclipse PTP or Code::Blocks and MPICH2 MPIOpen so i didn't know what to choose and what are tools that are compatible which other?
So ive installed OpenMPI,Eclipse PTP (Kepler) and MinGW-w64 to compile some C programs using MPI on windows 7 64Bits. i set all paths such as mpicc.exe i tried to test the Hello world program which is include with eclipse as example, i got this error:
13:03:48 **** Incremental Build of configuration Debug for project A ****
Info: Internal Builder is used for build
mpicc "-IC:\Program" Files "(x86)\OpenMPI_v1.6.2-x64\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\A.o" "..\src\A.c"
The Open MPI wrapper compiler was unable to find the specified compiler
cl.exe in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
13:03:48 Build Finished (took 115ms)
So i searched for cl.exe in my computer but i didn't found it, when i looked for some solution i found that the majority who solved this cl.exe problem are using visual studio, which is not my case so am little bit confused i dont want to switch to Visual Studio, so any solution with the tools that am using ?

OpenMPI does not appear to officially support MinGW as a backend: https://www.open-mpi.org/software/ompi/v1.6/ms-windows.php
The installers were configured with CMake 2.8.1 and compiled under Visual Studio 2010, and they support for C/C++ compilers of Visual Studio 2005, 2008 and 2010.
https://www.math.ucla.edu/~wotaoyin/windows_coding.html and other sources found on a search describe workflows using MS-MPI with MinGW. It may be a viable alternative. VSCode and MPI in WSL describes yet another non-paid but proprietary approach using VSCode with the WSL plugin.

Related

Deployment of statically linked Qt application backward compatibility

This is my first attempt at making a Qt Application work on different systems.
I have opted for static linking method.I have already compiled the sources of Qt 5.5 and compiled my application with the static Qt. The executable is working fine on my computer.
My operating system is Ubuntu 15.04. But when I tried to run the same executable on Ubuntu 14.04 then I ran into trouble. The key details of the error message are given below.
libstdc++.so.6 cxxabi_1.3.8 not found
I did a standard Google search and realised it was because I had a newer version of it on my machine, the machine where I had created the executable. There were so many different approaches to handle this problem. One of the solutions I saw involved shipping your own copy of libstdc++.so with the executable. But when I tried to copy the .so file to a pen drive, there was a warning saying that the file system does not support such files.
My question is , what am I doing wrong ? Also if I wanted to make the executable target Ubuntu 10.04, what would be the correct procedure handling the backward compatibility issues. I know that one method would be to install the same OS on my machine and then create the executable , is there any other way?
libstd++ is backward compatible but not forward compatible, which means you can run a program with a newer version of libstdc++ than the one you compiled it with but not vice-versa. This is what you experienced.
One way to deal with this issue is using older OS versions as the build machine. When you for example use Ubuntu 14.04 LTS, you'll get this list of compatible target systems.
The build system you're using will probably limit available compilers. On Ubuntu 14.04 you get GCC 4.8, which is good for most C++11 and packages for clang 3.6 are available, which will give you full C++14 support.
Targeting Ubuntu 10.04 will be challenging if you do not want to use a stone age compiler.
The idea of shipping libstdc++ will not help you much because you'll run into the same problem with libc.

Compiling and linking library MSVC/MingW

I'm a big fan of StackOverflow because you always have answers for problems, and now is my chance to get advance of it Ö!
I'm trying to use a library which I got in the Internet, its OZCollide. Its suppossed to be crossplatform as it says in its website "Cross-platform, works on Windows, Linux and Macintosh, in fact any platform supporting VisualStudio 6/7 or gcc"
I got all the .h and .cpp, compile them with MinGW as objects (.o) and then link them all using ar. But the problem is when I include and use the library on my project (QT & MinGW) it throws "undefined reference".
I thought the problem could be that library examples only uses Visual Studio, so the library coulnd't be compiled for MinGW, but the website tells other story.
Thanks for your time!
EDIT: Okay I have managed to compile it and use it moving to another computer and compiling makefile. The only one difference is that Computer A had Cygwing and MinGW installed (with Cygwin set up in Windows path) and Computer B only had MinGW.
So I guess the problem was Makefile calling for g++ and Cygwin g++ got called instead of MinGW g++??
If I'm right, whats the difference between Cygwin and MinGW?
if you have experience with CMake, create your own CMakeLists file and import/link this libraries against your project. In this way, you can create projects for MinGW/MSVC/Linux/etc.
Here you'll find a good start with CMake http://www.cmake.org/cmake-tutorial/

Qt - Cross Compiling

I am doing a cross compiling [mips] of Qt and Qt based applications.
Two developement machines; one 64bit and other 32bit, are used for this purpose.
Generally Qt related libraries and binaries are cross compiled in 64 bit machine. Qt based application, is cross compiled in 32bit machine.
With this setup, there is a small problem with usage of moc/qmake/qrc etc; These are compiled on 64bit machine and cannot run on the 32bit machine.
One shortcut method, is to change the mkspec [Pass -m32 instead of -m64 in linux-g++-64 ].
This way issue is resolved.
What I wanted to know is, if we can configure Qt itself to use linux-g++-32 instead of 64, for compilation of qmake/moc etc binaries.
Try with -platform linux-g++-32 -xplatform your-mips-mkspec

Porting a Qt Application from Linux to Windows

I built a qt application that uses opengl on linux and am trying to build it on windows. I used g++ to make it on linux and am using command line nmake for Visual Studio 2005 to build it on windows. When I tryed to build my application I typed
qmake -makefile app.pro
nmake
The nmake failed and said "bool qt_win_owndc_required"... already defined in QtOpenGld.lib ..
one or more multiply definded symbols found
When I tried building one of the examples (hellogl) with opengl it resulted in the same error message. But when I tried building a different example without opengl it worked fine. Do I need to do something special to build the opengl library correctly? Is there something that I am not thinking of?
Are you running qmake in a Visual Studio 2005 Command prompt?
A google search turned up this post: http://www.delta3d.org/forum/viewtopic.php?showtopic=15723
The guy fixed the problem by rebuilding the source.

Can you install Qt-4.6.0-wince successfully?

I'm trying to install Qt-4.6.0-wince on XP and Vista. I read the instructions and follow it to install.
However, I can't install it successfully due to some fatal errors on all of the two machines. I think the problem is that qconfig.[h cpp] files are not created automatically during the configuration.
I already report about this problem, so you can see the more information here. However, it is still remained as unresolved.
Anybody here who has been installed it successfully?
#KernelJ I believe the original poster is using the correct install distro - the final product will be cross compiled from Win32 to WinCE; as is pointed out in the Qt for Windows CE Requirements.
#Brian, Unfortunately, I can't answer your original question - I have had unrelated trouble with the WinCE distribution myself and am working the issues now. However, I can provide some help: I was able to get the Qt Everywhere 4.6 to cross compile on my Win32 (XP) host for WinCE. I used the commercial version, but here is a link to the Open Source Qt Everywhere 4.6 package. As is pointed out in the nokia instructions, make sure to use the Visual Studio command prompt, get your environment variables ironed out, create a custom mkspec (if you have to), and keep a close eye during the configuration for any warnings.
Good luck.
Qt-4.6.0-wince, as is implied in the name and said explictly on the page you linked, is for Windows CE, NOT for Windows XP and Vista!!!
Nokia have released a nice software development kit for Qt which you can download here. It is very impressive and powerful!
I got things running as compilable (and running on emulator) with VS 2008, so your milage may vary:
Make sure the PATH variable points to \bin
Open a command prompt (using the Visual Studio Command Prompt)
Run the vcvars32.bat file (in C:\Program Files\Microsoft Visual Studio 9\VC\bin) folder
Cd into the qt folder
Run this: configure -no-sql-sqlite -no-qt3support -platform win32-msvc2008 –xplatform wincewm50pocket-msvc2008 -no-phonon -no-phonon-backend -no-webkit (building for WINCE 5.0, and all the '-no-...' makes it build faster, removing stuff we don’t want)
The setccepaths script provided sometimes doesn’t work. I used checksdk.exe –script temp_script.bat (It creates a script, the default is for Pocket PC SDK 5)
Run that script you just created (the temp_script.bat thing. It sets up environment variables.
Run nmake
*whew*
and good luck.

Resources