- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is possible to parallelize via MPI the following fragment of fortran code:
do i = 1,n
call ext_run(input(i), output(i))
end do
where 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 ...
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page