Set number of processes mpi in cmake project at qtcreator

932 Views Asked by At

How can I set number of processes in qtcreator in a c++ MPI program?

I add -n 4 into run arguments but the program was not run on 4 processes!!

Should I change CMakeLists?

1

There are 1 best solutions below

1
On BEST ANSWER

In qtcreator menu :

projects -> build & run -> run -> add custom executable:

Executable : mpiexec

Arguments : -n 4 main

Note: 4 is number of processes and main is your target name.