| III. Operation
	  	Software MPI Topics > MPI VxWorks Package Documentation 
	  	Software Release Notes > VxWorks 5.5.1    Table of Contents 
          Booting the Target SystemLoading the MPI Library Object ModulesHost/Client Communication between Win32 and VxWorks ApplicationsRunning Multiple Instances of server.o on Multiple Controllers 
 Booting the Target SystemBoot the target system using a valid VxWorks and bootrom image. Verify thatthe target has successfully attached to the host computer and no warning or
 error messages were logged.
   Loading the MPI Library Object Modules Once the target is booted, load the MEI library modules mpiXmp.o and appUtil.o to the target: ld < /mei/xmp/lib/VxWorks/x86/Release/mpiXmp.old < /mei/xmp/sqNodelib/lib/VxWorks/x86/Release/libsqNode.a
 ld < /mei/xmp/lib/VxWorks/x86/Release/appUtil.o
  These object modules have been precompiled for a VxWorks target and come in
          a Release or Debug format. The mpiXmp.o must be loaded first as it contains
          definitions for libsqNode.a and appUtil.o.    Host/Client Communication between Win32 and VxWorks ApplicationsThe target system is accessible from a Win32 host through TCP/IP via the server application. The server.o program is loaded on the target and then executed by typing ‘server’ from the telnet shell or console. This process must be active to receive any commands from a Win32 host. Press any key on the target to exit the server program. On the host side, all Win32 utilities and sample programs must be run with the –server <target> flag.  Server now has a new VxWorks specific option, “-background”, which avoids any console interaction.  This is useful to allow MOCON and other host utilities to interact with the controller for diagnostic purposes.  With no clients, server requires very little CPU support; and can be run with a very low priority:  ld < /mei/xmp/util/VxWorks/x86/Release/server.o
taskSpawn “server0”, 248, 0, 1024*1024, server, “-control”, “0”, 
	“-listen”, “3300”, “-background”, “1”  This enables the server with a low priority (248) and a 1MB stack, with the following parameters:       -control 0 –listen 3300 –background 1
   Running Multiple Instances of server.o on Multiple Controllers Running multiple instances of server.o in VxWorks can be problematic because VxWorks cannot differentiate between multiple instances with the same main function name. In order to eliminate the naming conflict, the server.o main function must be renamed in the source code and recompiled.  The procedure to run two instances of server.o on two controllers is outlined below. 
          Modify the source code (server.c) and rename the main function. The source code is located in C:\mei\xmp\util\server.c
              
              In the original source, the main function name is server. #if defined(ARG_MAIN_RENAME)
#define  main     serverMain
argMainRENAME(main, server)
#endif
 Change the name of the main function to server2. #if defined(ARG_MAIN_RENAME)
#define  main     serverMain
argMainRENAME(main, server2)
#endif
Compile the modified source code and rename the new server.o file to server2.o. There should now be two files ready to run as two instances of server: server.o and server2.o.Load the MPI library and load server.o and server2.o.Start the servers by executing the following commands:
		      taskSpawn "server0",248,0,1024*1024,server,"-control","0","-listen","3300","-background","1"
 taskSpawn "server2",248,0,1024*1024,server2,"-control","1","-listen","3301","-background","1"
Verify that both instances are running by typing Iat the shell prompt. You should see an instance of server and server2 running such as shown below.  NAME        ENTRY       TID    PRI   STATUS      
---------- ------------ -------- --- ---------- 
tExcTask   excTask      3f342828   0 PEND         
tLogTask   logTask      3f33fe88   0 PEND         
tShell     shell        3f144254   1 READY        
tWdbTask   wdbTask      3f1fa6a0   3 PEND         
tNetTask   netTask      3f3017ac  50 READY        
tTelnetd   telnetd      3f1fde9c  55 PEND         
tTelnetOut_telnetOutTas 3f0e2da8  55 READY        
tTelnetIn_3telnetInTask 3f0e0c9c  55 READY        
server0    server       3ee0c024 248 PEND         
server     argMain      3ed0be58 248 PEND         
t1         3f152950     3ec11c8c 248 DELAY        
server2    server2      3eb17ac0 248 PEND         
server2    argMain      3ea178f4 248 PEND         
t2         3f152950     3e8ecefc 248 DELAY        
tDcacheUpd dcacheUpd    3f156ad8 250 READY        
value = 0 = 0x0
   << Back: Installation  |  Next: Appendix >>   |