TSTKSL001#sh hw-module switch 2 slot 3 oversubscription port-group oversubscription-mode 1 disabled 2 disabled TSTKSL001#conf t TSTKSL001(config)#hw-module switch 2.
Up To £30 In Free Bets - New UK & Ireland customers only. Min Deposit: £10. First deposit matched up to £30. 1 x wagering at odds of 1.75+ Hw Module Slot X Oversubscription Port Group Y to unlock Free Bet. Credit Card, Debit Card & PayPal deposits only. Slot-1 Stack # download image 1.1.1.1 summitX-16.1.1.4.xos slot 2 secondary Debug information files are present in internal-memory. These files will be removed if you continue with download.
Table of ContentsNote:mpirun, mpiexec, and orterun are all synonyms for eachother as well as oshrun, shmemrun in case Open SHMEM is installed. Usingany of the names will produce the same behavior.
Single ProcessMultiple Data (SPMD) Model:
mpirun [ options ] <program> [ <args> ]
MultipleInstruction Multiple Data (MIMD) Model:
mpirun [ global_options ] [ local_options1 ]
<program1> [ <args1> ] : [ local_options2 ]
<program2> [ <args2> ] : ... :
[ local_optionsN ]
<programN> [ <argsN> ]
Note that in both models, invoking mpirun via an absolutepath name is equivalent to specifying the --prefix option with a <dir> valueequivalent to the directory where mpirun resides, minus its last subdirectory. For example:
% /usr/local/bin/mpirun ...
is equivalent to
% mpirun --prefix /usr/local
% mpirun[ -np X ] [ --hostfile <filename> ] <program>
This will run X copies of <program> in your current run-time environment(if running under a supported resource manager, Open MPI’s mpirun will usuallyautomatically use the corresponding resource manager process starter, asopposed to, for example, rsh or ssh, which require the use of a hostfile,or will default to running all X copies on the localhost), scheduling (bydefault) in a round-robin fashion by CPU slot. See the rest of this pagefor more details.
Please note that mpirun automatically binds processesas of the start of the v1.8 series. Three binding patterns are used in theabsence of any further directives:
If your application uses threads, then you probablywant to ensure that you are either not bound at all (by specifying --bind-tonone), or bound to multiple cores using an appropriate binding level orspecific number of processing elements per application process.
Use oneof the following options to specify which hosts (nodes) of the clusterto run on. Note that as of the start of the v1.8 release, mpirun will launcha daemon onto each host in the allocation (as modified by the followingoptions) at the very beginning of execution, regardless of whether or notapplication processes will eventually be mapped to execute there. This isdone to allow collection of hardware topology information from the remotenodes, thus allowing us to map processes against known topology. However,it is a change from the behavior in prior releases where daemons were onlylaunched after mapping was complete, and thus only occurred on nodes whereapplication processes would actually be executing.
The following options specify the number of processes to launch.Note that none of the options imply a particular binding policy - e.g., requestingN processes for each socket does not imply that the processes will be boundto the socket.
To map processes:
To order processes’ ranks in MPI_COMM_WORLD:
For process binding:
For rankfiles:
To manage standard I/O:
To managefiles and runtime environment:
The parser for the -x option is not very sophisticated; it does not evenunderstand quoted values. Users are advised to set variables in the environment,and then use -x to export (not define) them.
Setting MCA parameters:
For debugging:
There are also other options:
Thefollowing options are useful for developers; they are not generally usefulto most ORTE and/or MPI users:
There may be other options listedwith mpirun --help.
If the application is multiple instruction multiple data(MIMD), comprising of multiple programs, the set of programs and argumentcan be specified in one of two ways: Extended Command Line Arguments, andApplication Context.
An application context describes the MIMD program setincluding all arguments in a separate file. This file essentially containsmultiple mpirun command lines, less the command name itself. The abilityto specify different options for different instantiations of a programis another reason to use an application context.
Extended command line argumentsallow for the description of the application layout on the command lineusing colons (:) to separate the specification of programs and arguments.Some options are globally set across all specified programs (e.g. --hostfile),while others are specific to a single program (e.g. -np).
For example,
Or, consider the hostfile
% cat myhostfile
aa slots=2
bb slots=2
cc slots=2
Here, we list both the host names (aa, bb, and cc) but also how many'slots' there are for each. Slots indicate how many processes can potentiallyexecute on a node. For best performance, the number of slots may be chosento be the number of cores on the node or the number of processor sockets. If the hostfile does not provide slots information, Open MPI will attemptto discover the number of cores (or hwthreads, if the use-hwthreads-as-cpusoption is set) and set the number of slots to that value. This default behavioralso occurs when specifying the -host option with a single hostname. Thus,the command
When running under resource managers (e.g., SLURM, Torque, etc.), Open MPIwill obtain both the hostnames and the number of slots directly from theresource manger.
The number of processes launched can be specified as a multipleof the number of nodes or processor sockets available. For example,
Another alternative is to specify the number of processeswith the -np option. Consider now the hostfile
% cat myhostfile
aa slots=4
bb slots=4
cc slots=4
Now,
Consider the same hostfile as above, again with -np 6:
node aa node bb node cc
mpirun 0 1 2 3 4 5
mpirun --map-by node 0 3 1 4 2 5
mpirun -nolocal 0 1 2 3 4 5
The --map-by node option will load balance the processes across the availablenodes, numbering each process in a round-robin fashion.
The -nolocal optionprevents any processes from being mapped onto the local host (in this casenode aa). While mpirun typically consumes few system resources, -nolocalcan be helpful for launching very large jobs where mpirun may actuallyneed to use noticeable amounts of memory and/or processing time.
Just as-np can specify fewer processes than there are slots, it can also oversubscribethe slots. For example, with the same hostfile:
One can also specify limits to oversubscription. For example, with thesame hostfile:
Limits to oversubscription can also be specified in the hostfile itself: % cat myhostfile
aa slots=4 max_slots=4
bb max_slots=4
cc slots=4
The max_slots field specifies such a limit. When it does, the slots valuedefaults to the limit. Now:
Using the --nooversubscribeoption can be helpful since Open MPI currently does not get 'max_slots'values from the resource manager.
Of course, -np can also be used with the-H or -host option. For example,
And here is a MIMD example:
The mappingstep is used to assign a default location to each process based on themapper being employed. Mapping by slot, node, and sequentially results inthe assignment of the processes to the node level. In contrast, mappingby object, allows the mapper to assign the process to an actual objecton each node.
Note: the location assigned to the process is independentof where it will be bound - the assignment is used solely as input to thebinding algorithm.
The mapping of process processes to nodes can be definednot just with general policies but also, if necessary, using arbitrarymappings that cannot be described by a simple policy. One can use the 'sequentialmapper,' which reads the hostfile line by line, assigning processes tonodes in whatever order the hostfile specifies. Use the -mca rmaps seq option. For example, using the same hostfile as before:
mpirun -hostfile myhostfile-mca rmaps seq ./a.out
will launch three processes, one on each of nodesaa, bb, and cc, respectively. The slot counts don’t matter; one processis launched per line on whatever node is listed on the line.
Another wayto specify arbitrary mappings is with a rankfile, which gives you detailedcontrol over process binding as well. Rankfiles are discussed below.
Thesecond phase focuses on the ranking of the process within the job’s MPI_COMM_WORLD. Open MPI separates this from the mapping procedure to allow more flexibilityin the relative placement of MPI processes. This is best illustrated byconsidering the following two cases where we used the —map-by ppr:2:socketoption:
node aa node bb
rank-by core 0 1 ! 2 3 4 5 ! 6 7
rank-by socket 0 2 ! 1 3 4 6 ! 5 7
rank-by socket:span 0 4 ! 1 5 2 6 ! 3 7
Ranking by core and by slot provide the identical result - a simple progressionof MPI_COMM_WORLD ranks across each node. Ranking by socket does a round-robinranking within each node until all processes have been assigned an MCWrank, and then progresses to the next node. Adding the span modifier tothe ranking directive causes the ranking algorithm to treat the entireallocation as a single entity - thus, the MCW ranks are assigned acrossall sockets before circling back around to the beginning.
The binding phaseactually binds each process to a given set of processors. This can improveperformance if the operating system is placing processes suboptimally.For example, it might oversubscribe some multi-core processor sockets, leavingother sockets idle; this can lead processes to contend unnecessarily forcommon resources. Or, it might spread processes out too widely; this canbe suboptimal if application performance is sensitive to interprocess communicationcosts. Binding can also keep the operating system from migrating processesexcessively, regardless of how optimally those processes were placed tobegin with.
The processors to be used for binding can be identified interms of topological groupings - e.g., binding to an l3cache will bind eachprocess to all processors within the scope of a single L3 cache withintheir assigned location. Thus, if a process is assigned by the mapper toa certain socket, then a —bind-to l3cache directive will cause the processto be bound to the processors that share a single L3 cache within thatsocket.
To help balance loads, the binding directive uses a round-robinmethod when binding to levels lower than used in the mapper. For example,consider the case where a job is mapped to the socket level, and then boundto core. Each socket will have multiple cores, so if multiple processesare mapped to a given socket, the binding algorithm will assign each processlocated to a socket to a unique core in a round-robin manner.
Alternatively,processes mapped by l2cache and then bound to socket will simply be boundto all the processors in the socket where they are located. In this manner,users can exert detailed control over relative MCW rank location and binding.
Finally, --report-bindings can be used to report bindings.
As an example,consider a node with two processor sockets, each comprising four cores. We run mpirun with -np 4 --report-bindings and the following additional options:
% mpirun ... --map-by core --bind-to core
[...] ... binding child [...,0] to cpus 0001
[...] ... binding child [...,1] to cpus 0002
[...] ... binding child [...,2] to cpus 0004
[...] ... binding child [...,3] to cpus 0008
% mpirun ... --map-by socket --bind-to socket
[...] ... binding child [...,0] to socket 0 cpus 000f
[...] ... binding child [...,1] to socket 1 cpus 00f0
[...] ... binding child [...,2] to socket 0 cpus 000f
[...] ... binding child [...,3] to socket 1 cpus 00f0
% mpirun ... --map-by core:PE=2 --bind-to core
[...] ... binding child [...,0] to cpus 0003
[...] ... binding child [...,1] to cpus 000c
[...] ... binding child [...,2] to cpus 0030
[...] ... binding child [...,3] to cpus 00c0
% mpirun ... --bind-to none
Here, --report-bindings shows the binding of each process as a mask. In thefirst case, the processes bind to successive cores as indicated by themasks 0001, 0002, 0004, and 0008. In the second case, processes bind toall cores on successive sockets as indicated by the masks 000f and 00f0.The processes cycle through the processor sockets in a round-robin fashionas many times as are needed. In the third case, the masks show us that2 cores have been bound per process. In the fourth case, binding is turnedoff and no bindings are reported.
Open MPI’s support for process bindingdepends on the underlying operating system. Therefore, certain processbinding options may not be available on every system.
Process binding canalso be set with MCA parameters. Their usage is less convenient than thatof mpirun options. On the other hand, MCA parameters can be set not onlyon the mpirun command line, but alternatively in a system or user mca-params.conffile or as environment variables, as described in the MCA section below.Some examples include:
mpirun option MCA parameter key value
--map-by core rmaps_base_mapping_policy core
--map-by socket rmaps_base_mapping_policy socket
--rank-by core rmaps_base_ranking_policy core
--bind-to core hwloc_base_binding_policy core
--bind-to socket hwloc_base_binding_policy socket
--bind-to none hwloc_base_binding_policy none
rank <N>=<hostname> slot=<slot list>
For example:
$ cat myrankfile
rank 0=aa slot=1:0-2
rank 1=bb slot=0:0,1
rank 2=cc slot=1-2
$ mpirun -H aa,bb,cc,dd -rf myrankfile ./a.out
Means that
Rank 0 runs on node aa, bound to logical socket 1, cores0-2.
Rank 1 runs on node bb, bound to logical socket 0, cores 0 and 1.
Rank 2 runs on node cc, bound to logical cores 1 and 2.
Rankfiles can alternatively be used to specify physical processor locations.In this case, the syntax is somewhat different. Sockets are no longer recognized,and the slot number given must be the number of the physical PU as mostOS’s do not assign a unique physical identifier to each core in the node.Thus, a proper physical rankfile looks something like the following:
$ cat myphysicalrankfile
rank 0=aa slot=1
rank 1=bb slot=8
rank 2=cc slot=6
This means that
Rank 0 will run on node aa, bound to the core thatcontains physical PU 1
Rank 1 will run on node bb, bound to the core that contains physicalPU 8
Rank 2 will run on node cc, bound to the core that contains physicalPU 6
Rankfiles are treated as logical by default, and the MCA parameter rmaps_rank_file_physicalmust be set to 1 to indicate that the rankfile is to be considered as physical.
The hostnames listed above are 'absolute,' meaning that actual resolveablehostnames are specified. However, hostnames can also be specified as 'relative,'meaning that they are specified in relation to an externally-specified listof hostnames (e.g., by mpirun’s --host argument, a hostfile, or a job scheduler).
The 'relative' specification is of the form '+n<X>', where X is an integerspecifying the Xth hostname in the set of all available hostnames, indexedfrom 0. For example:
$ cat myrankfile
rank 0=+n0 slot=1:0-2
rank 1=+n1 slot=0:0,1
rank 2=+n2 slot=1-2
$ mpirun -H aa,bb,cc,dd -rf myrankfile ./a.out
Starting with Open MPI v1.7, all socket/core slot locations are be specifiedas logical indexes (the Open MPI v1.6 series used physical indexes). Youcan use tools such as HWLOC’s 'lstopo' to find the logical indexes of socketand cores.
If a relative directory is specified, it must be relative to the initialworking directory determined by the specific starter used. For example whenusing the rsh or ssh starters, the initial directory is $HOME by default.Other starters may set the initial directory to the current working directoryfrom the invocation of mpirun.
If the -wdir option appears both in a context fileand on the command line, the context file directory will override the commandline value.
If the -wdir option is specified, Open MPI will attempt to changeto the specified directory on all of the remote nodes. If this fails, mpirunwill abort.
If the -wdir option is not specified, Open MPI will send thedirectory name where mpirun was invoked to each of the remote nodes. Theremote nodes will try to change to that directory. If they are unable (e.g.,if the directory does not exist on that node), then Open MPI will use thedefault directory determined by the starter.
All directory changing occursbefore the user’s program is invoked; it does not wait until MPI_INIT iscalled.
Open MPI directs UNIX standard output and errorfrom remote nodes to the node that invoked mpirun and prints it on thestandard output/error of mpirun. Local processes inherit the standard output/errorof mpirun and transfer to it directly.
Thus it is possible to redirect standardI/O for Open MPI applications by using the typical shell redirection procedureon mpirun.
% mpirun -np 2 my_app < my_input > my_output
Note that in this example only the MPI_COMM_WORLD rank 0 process willreceive the stream from my_input on stdin. The stdin on all the other nodeswill be tied to /dev/null. However, the stdout from all nodes will be collectedinto the my_output file.
SIGUSR1 and SIGUSR2 signals received byorterun are propagated to all processes in the job.
A SIGTSTOP signal tompirun will cause a SIGSTOP signal to be sent to all of the programs startedby mpirun and likewise a SIGCONT signal to mpirun will cause a SIGCONTsent.
Other signals are not currently propagated by orterun.
User signal handlers should probablyavoid trying to cleanup MPI state (Open MPI is currently not async-signal-safe;see MPI_Init_thread(3) for details about MPI_THREAD_MULTIPLE and threadsafety). For example, if a segmentation fault occurs in MPI_SEND (perhapsbecause a bad buffer was passed in) and a user signal handler is invoked,if this user handler attempts to invoke MPI_FINALIZE, Bad Things couldhappen since Open MPI was already 'in' MPI when the error occurred. Sincempirun will notice that the process died due to a signal, it is probablynot necessary (and safest) for the user to only clean up non-MPI state.
See the 'Remote Execution' section for more details.
However, it is not always desirable or possible to edit shellstartup files to set PATH and/or LD_LIBRARY_PATH. The --prefix option isprovided for some simple configurations where this is not possible.
The--prefix option takes a single argument: the base directory on the remotenode where Open MPI is installed. Open MPI will use this directory to setthe remote PATH and LD_LIBRARY_PATH before executing any Open MPI or userapplications. This allows running Open MPI jobs without having pre-configuredthe PATH and LD_LIBRARY_PATH on the remote nodes.
Open MPI adds the basenameof the current node’s 'bindir' (the directory where Open MPI’s executablesare installed) to the prefix and uses that to set the PATH on the remotenode. Similarly, Open MPI adds the basename of the current node’s 'libdir'(the directory where Open MPI’s libraries are installed) to the prefix anduses that to set the LD_LIBRARY_PATH on the remote node. For example:
If the following command line is used:
% mpirun --prefix /remote/node/directory
Open MPI will add '/remote/node/directory/bin' to the PATH and '/remote/node/directory/lib64'to the LD_LIBRARY_PATH on the remote node before attempting to executeanything.
The --prefix option is not sufficient if the installation pathson the remote node are different than the local node (e.g., if '/lib' isused on the local node, but '/lib64' is used on the remote node), or ifthe installation paths are something other than a subdirectory under acommon prefix.
Note that executing mpirun via an absolute pathname is equivalentto specifying --prefix without the last subdirectory in the absolute pathnameto mpirun. For example:
% /usr/local/bin/mpirun ...
is equivalent to
% mpirun --prefix /usr/local
The -mca switch takes two arguments: <key> and <value>. The <key> argumentgenerally specifies which MCA module will receive the value. For example,the <key> 'btl' is used to select which BTL to be used for transporting MPImessages. The <value> argument is the value that is passed. For example:
The -mca switch can be used multiple timesto specify different <key> and/or <value> arguments. If the same <key> is specifiedmore than once, the <value>s are concatenated with a comma (',') separatingthem.
Note that the -mca switch is simply a shortcut for setting environmentvariables. The same effect may be accomplished by setting correspondingenvironment variables before running mpirun. The form of the environmentvariables that Open MPI sets is:
OMPI_MCA_<key>=<value>
Thus, the -mca switch overrides any previously set environment variables. The -mca settings similarly override MCA parameters set in the $OPAL_PREFIX/etc/openmpi-mca-params.confor $HOME/.openmpi/mca-params.conf file.
Unknown <key> arguments are still setas environment variable -- they are not checked (by mpirun) for correctness.Illegal or incorrect <value> arguments may or may not be reported -- it dependson the specific MCA module.
To find the available component types underthe MCA architecture, or to find the available parameters for a specificcomponent, use the ompi_info command. See the ompi_info(1) man page fordetailed information on the command.
A valid line in the file may contain zero ormany '-x', '-mca', or “--mca” arguments. The following patterns are supported:-mca var val -mca var 'val' -x var=val -x var. If any argument is duplicatedin the file, the last value read will be used.
MCA parameters and environmentspecified on the command line have higher precedence than variables specifiedin the file.
Reflecting this advice, mpirun will refuse to run as rootby default. To override this default, you can add the --allow-run-as-root optionto the mpirun command line.
By default, OMPI records and notes that MPI processes exitedwith non-zero termination status. This is generally not considered an 'abnormaltermination' - i.e., OMPI will not abort an MPI job if one or more processesreturn a non-zero status. Instead, the default behavior simply reports thenumber of processes terminating with non-zero status upon completion ofthe job.
However, in some cases it can be desirable to have the job abortwhen any process terminates with non-zero status. For example, a non-MPI jobmight detect a bad result from a calculation and want to abort, but doesn’twant to generate a core file. Or an MPI job might continue past a call toMPI_Finalize, but indicate that all processes should abort due to somepost-MPI result.
It is not anticipated that this situation will occur frequently.However, in the interest of serving the broader community, OMPI now hasa means for allowing users to direct that jobs be aborted upon any processexiting with non-zero status. Setting the MCA parameter 'orte_abort_on_non_zero_status'to 1 will cause OMPI to abort all processes once any process exits withnon-zero status.
Terminations caused in this manner will be reported on the console asan 'abnormal termination', with the first process to so exit identifiedalong with its exit status.
If the --timeout command line optionis used and the timeout expires before the job completes (thereby forcingmpirun to kill the job) mpirun will return an exit status equivalent tothe value of ETIMEDOUT (which is typically 110 on Linux and OS X systems).