PDA

View Full Version : How to run with mpirun inside Qt?



mirzadeh
11th June 2011, 01:36
Hi guys,

I'm trying to compile my code, being developed inside Qt, with linking it to a library that has been written using C and MPI. I have been able to link the library and can ask Qt to compile my code with mpiCC compiler. The only part that I don't know how to do is to ask Qt to run the binary using mpirun with a given number of processors.

Any help is appreciated.

Thanks

wysota
11th June 2011, 01:40
Qt doesn't "run binaries" nor "compiles code". Qt is a C++ framework, compiled using standard compilers such as gcc/g++. If you want to run a binary using mpirun then just open a terminal, type in the appropriate mpirun command and that's it.

mirzadeh
11th June 2011, 01:50
I see. I just thought that there would be a way to run in inside qt creator. Thanks anyway!

wysota
11th June 2011, 01:57
There is but I'm assuming mpirun requires some configuration which might be difficult to be clicked-in in Creator (and remember, Qt != QtCreator, don't mix the two -- It's like we treated the names "Microsoft Visual Studio" and "Microsoft" as the same thing). If you want, you're welcome to try using the Projects pane and runtime settings pane.

mirzadeh
11th June 2011, 21:25
Thanks man :) You are correct, Qt and Qt creator are two separate things, its just that currently I am only using Qt creator as an IDE but later will be developing a gui for my project using Qt. Do you think it's a good idea to ask Qt creator to run a bash script where I put all my mpirun settings?

wysota
11th June 2011, 23:28
Sure, why not.

mirzadeh
11th June 2011, 23:32
Cool. Its working like a charm. thanks man