manual:parallel_execution
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
manual:parallel_execution [2014/01/13 11:52] – created zenke | manual:parallel_execution [2014/10/14 17:32] – Adds paragraph on cluster computation. zenke | ||
---|---|---|---|
Line 3: | Line 3: | ||
Let's come back to our [[examples: | Let's come back to our [[examples: | ||
<code shell> | <code shell> | ||
- | ./ | ||
./ | ./ | ||
</ | </ | ||
- | Suppose you would like to run the same code in parallel. Suppose | + | Suppose you would like to run the same code in parallel |
<code shell> | <code shell> | ||
- | mpirun -n 4 ./ | ||
mpirun -n 4 ./ | mpirun -n 4 ./ | ||
</ | </ | ||
where '' | where '' | ||
+ | |||
+ | To use multiple machines as a cluster the specifics might be different depending on the MPI implementation used. For OpenMPI it suffices, if the same home directory is mounted on all machines, to add a hostfile containing the names of all machines in the luster to the command line (e.g. '' | ||
===== Output ===== | ===== Output ===== | ||
- | Let's now look at the output side of this call. I will further assume that if your MPI implementation ran all processes on the single node. If that's not the case you will probably know that the output might be scattered over different ''/ | + | Let's now look at the output side of this call. I will further assume that if your MPI implementation ran all processes on the single node. If that's not the case you will probably know that the output might be scattered over different ''/ |
+ | |||
+ | |||
+ | ==== Output files ==== | ||
+ | |||
+ | We now find the following directory listing under ''/ | ||
<code shell> | <code shell> | ||
-bash-4.1$ ls -sl /tmp/coba.* | -bash-4.1$ ls -sl /tmp/coba.* | ||
Line 39: | Line 44: | ||
8 -rw-r--r-- 1 zenke lcn1 5364 Jan 13 12:23 / | 8 -rw-r--r-- 1 zenke lcn1 5364 Jan 13 12:23 / | ||
</ | </ | ||
+ | |||
+ | |||
That means that each process has written its output to independent files. In generaly you have to specify the convention you want to use manually in your simulation executable with a call sequence similar to following | That means that each process has written its output to independent files. In generaly you have to specify the convention you want to use manually in your simulation executable with a call sequence similar to following | ||
<code c++> | <code c++> | ||
Line 49: | Line 56: | ||
</ | </ | ||
where '' | where '' | ||
+ | |||
+ | |||
+ | ==== Log output ==== | ||
Now let us have a look into '' | Now let us have a look into '' | ||
Line 82: | Line 92: | ||
</ | </ | ||
This is in essence the log output underlying the call of '' | This is in essence the log output underlying the call of '' | ||
+ | |||
+ | |||
+ | ==== Merging ras output files ==== | ||
+ | |||
+ | For other output files that are passed as arguments to [[Monitor]] objects for instance the same rules hold as described in the [[#output files]] section. That is why there are a total of four files '' | ||
+ | |||
+ | Multiple [[ras]] can be merged efficiently using linux command line syntax only and the following call will do the job | ||
+ | <code shell> | ||
+ | sort -g -m coba.*.e.ras > coba.e.ras | ||
+ | </ | ||
+ |
manual/parallel_execution.txt · Last modified: 2014/10/14 17:41 by zenke