⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node24.htm

📁 空间物理学研究需要有并行的环境
💻 HTM
字号:
<HTML>
<HEAD>
<!-- This file was generated by tohtml from mpichntman.tex -->
<!-- with the command
tohtml -default -dosnl -gaudy -basedef mpiman.def mpichntman.tex 
-->
<TITLE>mpirun for mpd</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<HR><H2><A NAME="Node24">mpirun for mpd</a></H2>
<A HREF="node23.htm#Node23"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node23.htm#Node23"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node25"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node23.htm#Node23"> Tools</a>
<b>Next: </b><A HREF="node24.htm#Node25"> Usage</a>
<b>Previous: </b><A HREF="node23.htm#Node23"> Tools</a>
<P>
mpirun is the tool that communicates with the mpd process launcher to start   
MPI applications.  mpirun comes in two flavors - mpirun and guimpirun.  mpirun is the   
command line version of the tool and guimpirun is the graphical version.  The command   
line tool was developed first and then the gui tool was ported from the command line   
version.  For this reason, the command line tool is more stable.  
<P> 
You will want to add <tt> MPICH<IMG WIDTH=5 HEIGHT=11 SRC="img46.xbm">
mpd<IMG WIDTH=5 HEIGHT=11 SRC="img47.xbm">
bin</tt> to your path to   
have access to mpirun and the other tools from a command prompt.  
<P> 
<menu> 
</menu> 

<P>
<HR>
<A HREF="node23.htm#Node23"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node23.htm#Node23"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node25"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node23.htm#Node23"> Tools</a>
<b>Next: </b><A HREF="node24.htm#Node25"> Usage</a>
<b>Previous: </b><A HREF="node23.htm#Node23"> Tools</a>
<P>
<HR><H3><A NAME="Node25">Usage</a></H3>
<A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node26"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node24.htm#Node26"> Configuration files for mpirun</a>
<b>Previous: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<P>
<BR> 
<pre><tt>mpirun [-mpirun options] configfile [args ...]  
mpirun -np #processes [-mpirun options] executable [args ...]  
</tt></pre> 
Bracketed sections are optional (don't type the [] characters).  
<P> 

<P>
<HR>
<A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node26"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node24.htm#Node26"> Configuration files for mpirun</a>
<b>Previous: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<P>
<HR><H3><A NAME="Node26">Configuration files for mpirun</a></H3>
<A HREF="node24.htm#Node25"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node27"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node24.htm#Node27"> Command line options for mpirun</a>
<b>Previous: </b><A HREF="node24.htm#Node25"> Usage</a>
<P>
The configuration file format is as follows:   
<P> 
<P><IMG WIDTH=5 HEIGHT=11 SRC="img48.xbm"><P>
Bracketed lines are optional (don't inlucde the [] characters). The # character   
will comment out a line.  You may specify a path to an executable on each host line,   
thus enabling MPMD programming.  If you do not specify a path, then the default is   
used from the exe line.  
<P> 
 Here are two sample configuration files:  
<P> 
<P><IMG WIDTH=5 HEIGHT=11 SRC="img49.xbm"><P>
 This one shows a more complicated scenario:  
<P> 
<P><IMG WIDTH=5 HEIGHT=11 SRC="img50.xbm"><P>
This configuration file would launch one instance of <em>master.exe</em> on fry and   
three instances of <em>slave.exe</em>, one on fry and two on jazz.    
Host light would be ignored because of the # character.  Each process would have four  
environment variables set.  Each process would receive   
``<tt>-i c: temp cool.points</tt>'' as command line arguments.  
<P> 

<P>
<HR>
<A HREF="node24.htm#Node25"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node24.htm#Node27"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node24.htm#Node27"> Command line options for mpirun</a>
<b>Previous: </b><A HREF="node24.htm#Node25"> Usage</a>
<P>
<HR><H3><A NAME="Node27">Command line options for mpirun</a></H3>
<A HREF="node24.htm#Node26"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node28.htm#Node28"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node28.htm#Node28"> MPIRegister tool</a>
<b>Previous: </b><A HREF="node24.htm#Node26"> Configuration files for mpirun</a>
<P>
<dl> 
 
<dt> 
<b></b><tt>-np #procs</tt></b><dd> 
<BR>  
Launch <tt>#procs</tt> processes.  mpirun uses the list of hosts stored in the   
registry by the configuration tool to choose hosts to start processes on.  If   
there is no list in the registry all the processes are launched on the local host.  
<P> 
 
<dt> 
<b></b><tt>-machinefile filename</tt></b><dd> 
<BR>  
This tells mpirun to use the hosts in <em>filename</em> when determining where to   
launch processes.  Use this in conjunction with <em>-np x</em> to launch processes   
on a specific set of machines.  Put one host per line in the file.  Empty lines are   
discarded and lines starting with # are ignored.  You can specify a number after   
the host name to recommend how many processes to launch on the host.  This is useful   
if you want to launch more than one process on a multi-CPU machine.  mpirun will   
cycle through this list until all the processes are launched, repeating hosts if   
necessary.  Example file:  
<BR> 
<pre><tt>ccnode01 
ccnode02 2 
ccnode03 4 
ccnode04 
</tt></pre> 
 
<dt> 
<b></b><tt>-localonly</tt></b><dd> 
<BR>  
This flag causes all the processes to be launched on the local machine using the shared   
memory device.  
<P> 
 
<dt> 
<b></b><tt>-localroot</tt></b><dd> 
<BR>  
This flag causes the root process to be launched by mpirun instead of mpd.  This only  
happens if the root process is on the same node where mpirun is executed.  The reason  
for this option is to allow the root to live in the same space as mpirun.  It has two  
advantages.  First, the root can create windows that the user can see and interact with.  
Second, if the root crashes, you can attach the debugger to see what happened.  
<P> 
 
<dt> 
<b></b><tt>-env "var1=val1|var2=val2|var3=val3|...varn=valn"</tt></b><dd> 
<BR>  
This will set the environment variables specified in the string before each process   
is launched.  Remember to quote the string so the command prompt doesn't interpret   
the vertical bar as a pipe command.  
<P> 
 
<dt> 
<b></b><tt>-logon</tt></b><dd> 
<BR>  
This option will cause mpirun to prompt for an account and password.  If you use   
mpiregister.exe to encrypt an account and password into the registry, -logon will   
override the use of that user.  
<P> 
 
<dt> 
<b>{</b><tt> -map drive:$$$$host$$share}</tt></b><dd> 
<BR>  
This option will map a drive on the hosts where the processes are launched.    
The mappings are removed after the processes exit.  This option can be repeated multiple   
times. example: <tt> -map z:<IMG WIDTH=5 HEIGHT=11 SRC="img51.xbm">
<IMG WIDTH=5 HEIGHT=11 SRC="img52.xbm">
myserver<IMG WIDTH=5 HEIGHT=11 SRC="img53.xbm">
myhome</tt>  
<P> 
 
<dt> 
<b>{</b><tt> -dir drive:$$some$$path}</tt></b><dd> 
<BR>  
This sets the working directory for the launched processes.  If this option is not   
specified the current directory is used.  
<P> 
 
<dt> 
<b></b><tt>-hosts n host1 host2 ... hostn</tt></b><dd> 
 
<dt> 
<b></b><tt>-hosts n host1 m1 host2 m2 ... hostn mn</tt></b><dd> 
<BR>  
Specify the hosts to launch on.  In the second form, the number of processes is   
m1 + m2 + ... + mn.  
<P> 
 
<dt> 
<b></b><tt>-pwdfile filename</tt></b><dd> 
<BR>  
Specify a file containing an account and password used to launch processes under.    
The first line of the file must be the account name and the second line must be the password.  
<P> 
 
<dt> 
<b></b><tt>-exitcodes</tt></b><dd> 
<BR>  
This option causes mpirun to print out the exit code of each process as it exits.  
<P> 
 
<dt> 
<b></b><tt>-noprompt</tt></b><dd> 
<BR>  
This option prevents mpirun from prompting for user credentials if they have not been stored  
in the registry.  
<P> 
 
<dt> 
<b></b><tt>-priority class:level</tt></b><dd> 
<BR>  
This option set the process run priority.  The class can be a value from 0 to 4 representing  
idle, below, normal, above, and high priority classes (realtime priority is not allowed).  The  
level can be a value from 0 to 5 representing idle, lowest, below, normal, above, and higest.  
The values corresponding to below and above are only supported on Window2000 and XP.  An example  
would be <tt>-priority 3:4</tt>.  The default is 2:3.  
<P> 
 
<dt> 
<b></b><tt>-mpduser</tt></b><dd> 
<BR>  
Use this option to launch a job in the context of the user registered with mpd.  All the mpd's   
must have been installed with the mpduser option, an account must be set on each mpd, and the  
mpduser option must be enabled on each mpd.  If the mpd's are configured correctly, mpirun  
will not use the current user's credentials to launch the job but instead launch in the context  
of the registered mpd user.  
 <P> 
</dl> 
<BR> 
  

<P>
<HR>
<A HREF="node24.htm#Node26"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node24.htm#Node24"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node28.htm#Node28"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node24.htm#Node24"> mpirun for mpd</a>
<b>Next: </b><A HREF="node28.htm#Node28"> MPIRegister tool</a>
<b>Previous: </b><A HREF="node24.htm#Node26"> Configuration files for mpirun</a>
<P>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -