MPI parallelization of external standalone program

MPI parallelization of external standalone program

is possible to parallelize via MPI the following fragment of fortran code:do i = 1,n call ext_run(input(i), output(i))end dowhere subroutine ext_run(input,output) execute external single thread program by SYSTEMQQ (commandline) function.For example: SYSTEMQQ ('extprog.exe < input_i.dat > output_i.dat'), where input_i and output_i are auxiliary data files which were created using input(i) or output(i) parameters.I will be happy for some simple examples. Thanks ...

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi Michal,

MPI program is just a number of processes (the same) running in parallel. It's not clear how many times you want to call ext_run(), but it you want to call it for each mpi process you just need to remove the loop.

Calling 'mpiexec -n 4 ./your_app'
Each process will call:
call ext_run(input(rank), output(rank))
with its own rank which is in the range of 0...3

If you start 16 mpi processes, you'll call 16 different ext_run().

Does it answer your question?

Regards!
Dmitry

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen