I'd like to start a c++ programm with some parameters, like n, i_proc, j_proc.
It is a parallel programm and I need this parameters for deconstruct the grid with arbitrary numbers of Intervalls in x-direction (i_proc) and y-direction (j_proc).
n shall be the complete number of processes with n=i_proc+j_proc.
For example, my Programm calls grid.
Then I'd like to start my programm with something like this
mpirun -np 6 2 4 grid
where 6 is the complete number of processes, 2 is i_proc and j is j_proc and this parameters shall my programm know during the main part.