Running the Parallel Version
Run the parallel version of Feko with optional parameters for an efficient solution.
The parallel version of Feko may be used on any system that is licensed to run multiple Feko processes concurrently. If a system has a multi-core CPU (for example a quad-core CPU) then a sequential Feko licence will allow a parallel solution with up to 4 parallel processes to be launched. For systems with multiple CPUs (for example, a system with 2 separate dual-core CPUs) a 2-CPU parallel Feko licence will be required in order to run parallel solutions using all 4 of the available cores.
In order to use the parallel version of Feko from the GUI, it is required to configure the host names and number of processes that will be used for each node. (This is initially be set up during installation of Feko, meaning that reconfiguration is only necessary if changes are made.)
On the Solve/Run tab, in the Run/Launch group, click the dialog launcher.
On the Feko Solver tab, under Parallel execution, click the Configure button. In the dialog (see Figure 1), the host names and number of processes to be started on each host must be entered. Usually one process per available core on each machine should be chosen, for example 4 processes for a quad-core machine. It is also possible to use this option to implement a crude load balancing system: running more processes on hosts with faster CPUs or more memory. Nodes may be added or removed from the current cluster setup using the Add and Remove buttons respectively.
After clicking OK the hosts are saved to a machines.feko file in the directory specified by the environment variable FEKO_USER_HOME. This file is then used in the actual parallel process launching.
The target priority of the Feko run may also be set on this tab. Setting the priority below normal will allow other interactive work on the same computer. However, all machines in the cluster operate at the speed of the slowest node - starting other CPU-intensive jobs on one of the nodes in a cluster is generally not recommended.
In order to use parallel solving after it has been set up, do the following: On the Solve/Run tab, in the Run/Launch group, click the Parallel icon. A check mark will be displayed next to the menu option. Any Feko solver runs that are launched while this option is checked will use the parallel version of Feko.
runfeko example1 -np x
where the parameter x
following -np
indicates the
required number of processes to be used in the parallel solution. In addition to the
arguments listed in Running the Sequential Version,
the parallel version accepts the following optional parameters:
- -np x
- Start the parallel Feko version with
x
processes. The-np all
option is also supported when all available processors in the machines file should be used.
- --machines-file machname
- The file machname is the machines file with the node names and the number of CPUs (see below).
- --mpi-options ...
- Unless another
--xxx-options
parameter is used, all options following this are passed to the MPI launcher (for example mpirun or mpiexec). - --parallel-authenticate <method>
- Sets the authentication method to be used for parallel Feko runs. The following authentication methods are available:
Hostname:Number of processes
For example assume that host1 has 4 processors and host2 has 8, then the machines file will be as follows:
host1:4
host2:8
With this machines file, if 6 parallel processes are requested then Fekowill use 4 processes on host1 and 2 processes on host2.
If only one process is to be started on any host, then instead of the entry
host3:1
in the machines file, the shorter form
host3
may be used.
FEKO_MACHFILE=./machname
export FEKO_MACHFILE
runfeko example1 -np 6
runfeko example1 -np 6 --machines-file ../../machname
--mpi-options
. For example on a ScaMPI
cluster (assuming FEKO_WHICH_MPI=6), the
callrunfeko example_08 -np 6 --mpi-options -immediate_handling \
threaded -smtrace 5-6
(all on one line) is interpreted internally and Feko is executed with the command
/opt/scali/bin/mpimon -export env -immediate_handling threaded \
-smtrace 5-6 /opt/feko/bin/feko.csv example_08 -- host1 4 \
host2 2
host1
and host2
are examples only—the actual
information is taken from the machines file.In addition to using the --mpi-options
command line option, the MPI
environment can be controlled by setting certain environment variables. For
instance, when using Intel MPI the environment variable I_MPI_DEVICE4 is quite important to control
which device should be used (sockets or shared memory, or RDMA device). Such
environment variables is set up internally by means of Lua initialisation scripts.
See the Feko Installation Guide for more
information.
For more details refer to the Intel MPI and MPICH documentation in mpi\<platform>\<mpi-version>\doc directory of the Feko installation.