|
![]() |
Parameters tied to the deployment of an application should be totally described in a xml deployment descriptor. Hence within the source code, there are no longer any references to :
A ProActive application can be deployed on different hosts, with different protocols without changing the source code
newActive(String, Object[], Node);
newActiveAsGroup(String, Object[], VirtualNode); turnActiveAsGroup(Object, String, VirtualNode);
<ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DescriptorSchema.xsd"> <componentDefinition> <virtualNodesDefinition> <virtualNode name="Dispatcher"/> </virtualNodesDefinition> <componentDefinition/> <deployment> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <vmName value="Jvm1"/> </jvmSet> </map> </mapping> <jvms> <jvm name="Jvm1"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> </jvms> </deployment> <infrastructure> <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> </processes> </infrastructure> </ProActiveDescriptor>This example shows a VirtualNode called Dispatcher, that is mapped to a jvm called Jvm1
ProActiveDescriptor pad = ProActive.getProActiveDescriptor(String xmlFileLocation);
VirtualNode dispatcher = pad.getVirtualNode("Dispatcher");
dispatcher.activate();
Node node = dispatcher.getNode();
C3DDispatcher c3dDispatcher = newActive("org.objectweb.proactive.core.examples.c3d.C3DDispatcher", param, node);
..........................
<virtualNodesDefinition> <virtualNode name="Dispatcher"/> <virtualNodesDefinition/> <deployment> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <vmName value="Jvm0"/> </jvmSet> </map> </mapping>Another possibility for the one to one mapping is to map 1 VN to the jvm running the program. In that case the lookup protocol can be specified but is optionnal(default value is the property proactive.communication.protocol) as it is shown in the following:
<virtualNodesDefinition> <virtualNode name="Dispatcher"/> <virtualNodesDefinition/> <deployment> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <currentJvm protocol="rmi"/> or <currentJvm/> </jvmSet> </map> </mapping>Since it is the current jvm, it has not to be redifined later in the descriptor. This will be shown in a complete example
<virtualNodesDefinition> <virtualNode name="Renderer" property="multiple"/> <virtualNodesDefinition/> <deployment> <mapping> <map virtualNode="Renderer"> <jvmSet> <currentJvm/> <vmName value="Jvm1"/> <vmName value="Jvm2"/> <vmName value="Jvm3"/> <vmName value="Jvm4"/> </jvmSet> </map> </mapping>Note that the property attribute is set to multiple if you want to map 1 VN to multiple JVMs, and then a set of JVMs is defined for the VirtualNode Renderer. Four values are possible for the property attribute: unique which means one to one mapping, unique_singleAO: one to one mapping and only one AO deployed on the corresponding node, multiple: one to N mapping, multiple_cyclic: one to N mapping in a cyclic manner. This property is not mandatory but an exception can be thrown in case of incompatibility. For instance property set to unique, and more than one jvm defined in the jvmSet tag. In case of property set to unique_singleAO method getUniqueAO() in class org.objectweb.proactive.core.descriptor.data.VirtualNode called on such VirtualNode returns the unique AO created
<virtualNodesDefinition> <virtualNode name="Dispatcher" timeout="200" waitForTimeout="true"/> <virtualNode name="Renderer" timeout="200" minNodeNumber="3"/> <virtualNodesDefinition/>The timeout attribute represents an amount of time(in milliseconds) to wait before accessing Nodes mapped on the VirtualNode. The waitForTimeout attribute is a boolean. If set to true, you will have to wait exaclty timeout seconds before accessing Nodes. If set to false, timeout represents the maximum amount of time to wait, it means that if all nodes are created before the timeout expires, you get access to the Nodes. Defaut value for waitForTimeout attribute is false. The minNodeNumber attribute defines the minimum number of nodes to be created before accessing the nodes. If not defined, access to the nodes will occur once the timeout expires, or the number of nodes expected are effectively created. Setting this attribute allows to redefine the number of nodes expected, we define it as the number of nodes needed for the VirtualNode to be suitable for the application. In the exammple above, once 3 nodes are created and mapped to the VirtualNode Renderer, this VirtualNode starts to give access to its nodes. Those options are very usefull when there is no idea about how many nodes will be mapped on the VirtualNode(which is often unususal). Those attributes are optional.
<virtualNodesDefinition> <virtualNode name="Dispatcher" property="unique_singleAO"/> <virtualNode name="Renderer" property="multiple"/> </virtualNodesDefinition> <deployment> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <vmName value="Jvm1"/> </jvmSet> </map> <map virtualNode="Renderer"> <jvmSet> <vmName value="Jvm1"/> <vmName value="Jvm2"/> <vmName value="Jvm3"/> <vmName value="Jvm4"/> </jvmSet> </map> </mapping>In this example both VirtualNodes Dispatcher and Renderer have a mapping with Jvm1, it means that at deployment time, both VirtualNodes will get nodes created in the same JVM. Here is the notion of co-allocation in a JVM.
<virtualNodesDefinition> <virtualNode name="Dispatcher" property="unique_singleAO"/> <virtualNodesDefinition/> <deployment> <register virtualNode="Dispatcher" protocol="rmi"/> or <register virtualNode="Dispatcher"/> <!--using this syntax, registers the VirtualNode with the protocol specified in proactive.communication.protocol property --> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <vmName value="Jvm0"/> </jvmSet> </map> </mapping>The register tag allows to register the VirtualNode Dispatcher when activated, on the local machine in the RMIRegistry. As said before this VirtualNode will be accessible by another application using the lookup tag(see below) or using method: ProActive.lookupVirtualNode(String).
<virtualNodesAcquisition> <virtualNode name="Dispatcher"/> </virtualNodesAcquisition> .......... <deployment> .......... <lookup virtualNode="Dispatcher" host="machine_name" protocol="rmi" port="2020"/> </deployment>As mentioned in the previous section, in order to acquire VirtualNode Dispatcher, it must have been previously registered on the specified host by another application. Sometimes, the host where to perform the lookup will only be known at runtime, it that case it is specified in the descriptor with "*" for the host attribute
<lookup virtualNode="Dispatcher" host="*" protocol="rmi"/>Then when the host name is available, ProActive provides method setRuntimeInformations in class org.objectweb.proactive.core.descriptor.data.VirtualNode to update the value and to perform the lookup. Typical example of code:
ProActiveDescriptor pad = ProActive.getProActiveDescriptor(String xmlFileLocation);
pad.activateMappings;
vnDispatcher = pad.getVirtualNode("Dispatcher");
..........................
vnDispatcher.setRuntimeInformations("LOOKUP_HOST","machine_name);
ProActive.registerVirtualNode(VirtualNode virtualNode, String registrationProtocol, boolean replacePreviousBinding );
ProActive.lookupVirtualNode(String url, String protocol);
ProActive.unregisterVirtualNode(VirtualNode virtualNode);
........................... <jvm name="jvm1"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> .................................In this example, jvm1 will be created using the process called jvmProcess (discussed later, this process represents a java process and can be seen as java ProActiveClassname command)
......................... <jvm name="Jvm1" nodeNumber="3"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> ..........................Note that the nodeNumber attribute is set to the number of Nodes associated to the Jvm1
........................... <jvm name="Jvm1"> <acquisition> <serviceReference refid="lookup"/> </acquisition> </jvm> ............................In this example, Jvm1 will be acquired using the service called lookup (discussed later, this service represents a way to acquire a JVM). Note that the name lookup is totally abstract, with the condition that a service with the id lookup is defined in the infrastructure part
<ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Location_of_DescriptorSchema.xsd">Note that this schema is available in the ProActive distribution package under ProActive\descriptor directory. Using descriptors related methods (Proactive.getProActiveDescriptor(file)) triggers automatic and transparent validation of the file using Xerces2_4_0 if the ProActive property schema.validation is set to enable(see configuration file for more details). If a problem occurs during the validation, an error message is displayed otherwise if the validation is successful no message appear. An XML validation tool such as XMLSPY5.0(windows) can also be used to validate XML descriptors.
<ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DescriptorSchema.xsd"> <componentDefinition> <virtualNodesDefinition> <virtualNode name="Dispatcher" property="unique_singleAO"/> <virtualNode name="Renderer" property="multiple"/> </virtualNodesDefinition> </componentDefinition> <deployment> <register virtualNode="Dispatcher"/> <mapping> <map virtualNode="Dispatcher"> <jvmSet> <currentJvm/> </jvmSet> </map> <map virtualNode="Renderer"> <jvmSet> <vmName value="Jvm1"/> <vmName value="Jvm2"/> <vmName value="Jvm3"/> <vmName value="Jvm4"/> </jvmSet> </map> </mapping> <jvms> <jvm name="Jvm1"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> <jvm name="Jvm2"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> <jvm name="Jvm3"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> <jvm name="Jvm4"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> </jvms> </deployment> <infrastructure> <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> </processes> </infrastructure> </ProActiveDescriptor>This example represents xml deployment descriptor for the C3D application. The abstract part containing VirtualNodes definition and deployment informations has already been explained. To summarize, two VirtualNodes are defined Dispatcher and Renderer. Dispatcher is mapped to the jvm running the main(), and will be exported using the protocol specified in proactive.communication.protocol property. This VirtualNode will be registered in a Registry(still using the protocol specified in proactive.communication.protocol property) when activated. Renderer is mapped to a set of JVMs called Jvm1, ..., Jvm4.
<ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DescriptorSchema.xsd"> <componentDefinition> <virtualNodesDefinition> <virtualNode name="User"/> </virtualNodesDefinition> <virtualNodesAcquisition> <virtualNode name="Dispatcher"/> </virtualNodesAcquisition> </componentDefinition> <deployment> <mapping> <map virtualNode="User"> <jvmSet> <currentJvm protocol="rmi"/> </jvmSet> </map> </mapping> <lookup virtualNode="Dispatcher" host="*" protocol="rmi"/> </deployment> <infrastructure> <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> </processes> </infrastructure> </ProActiveDescriptor>This file is read when addind a C3DUser. Two VirtualNodes are defined User which is mapped to the jvm running the main(), whose acquisition method is performed by looking up the RMIRegistry and Dispatcher in the virtualNodesAcquisition part which will be the result of a lookup in the RMIRegistry of a host to be specified at runtime.
org.objectweb.proactive.core.process.JVMNodeProcess
<infrastructure> <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcesss"> <classpath> <relativePath origin="user.home" value="/ProActive/classes"/> <relativePath origin="user.home" value="/ProActive/lib/bcel.jar"/> <relativePath origin="user.home" value="/ProActive/lib/asm.jar"/> <relativePath origin="user.home" value="/ProActive/lib/jini-core.jar"/> <relativePath origin="user.home" value="/ProActive/lib/jini-ext.jar"/> <relativePath origin="user.home" value="/ProActive/lib/reggie.jar"/> </classpath> <javaPath> <absolutePath value="/usr/local/jdk1.4.0/bin/java"/> </javaPath> <policyFile> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/proactive.java.policy"/> </policyFile> <log4jpropertiesFile> <relativePath origin="user.home" value="ProActive/scripts/unix/proactive-log4j"/> </log4jpropertiesFile> <ProActiveUserPropertiesFile> <absolutePath value="/net/home/rquilici/config.xml"/> </ProActiveUserPropertiesFile> <jvmParameters> <parameter value="-Djava.library.path=/home1/fabrice/workProActive/ProActive/lib"/> <parameter value="-Dsun.boot.library.path=/home1/fabrice/workProActive/ProActive/lib"/> <parameter value=-Xms512 -Xmx512"/> </jvmParameters> </jvmProcess> </processDefinition> </processes> </infrastructure>As shown in the example above, ProActive provides the ability to define or change the classpath environment variable, the java path, the policy file path, the log4j properties file path, the ProActive properties file path (see configuration file for more details) and also to pass parameters to the JVM to be created. Note that parameters to be passed here are related to the jvm in opposition to properties given in the configuration file(more focused on ProActive or application behaviour). In fact parameters given here will be part of the java command to create other jvms, whereas properties given in the config file will be loaded once the jvm is created.
<bootclasspath> <absolutePath value="/home1/fabrice/IOFAb/Ibis/"/> <absolutePath value="/home1/fabrice/IOFAb/classlibs/jdk"/> </bootclasspath>
<jvm name="Jvm2"> <creation> <processReference refid="rshProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="rshProcess"> <rshProcess class="org.objectweb.proactive.core.process.rsh.RSHJVMProcess" hostname="sea.inria.fr"> <processReference refid="jvmProcess"/> </rshProcess> </processDefinition> </processes>For the Jvm2 the creation process is rshProcess(still an abstract name), which is defined in the infrastructure section. To define this process you have to give the class to instantiate to create the rsh process. ProActive provides
org.objectweb.proactive.core.process.rsh.RSHJVMProcess
to create rsh process. You must give the remote host name to log on with rsh. You can define as well username="toto"
if you plan to use rsh with -l option. As said before this rsh process must reference a local process, and in the example, it references the process defined with the id jvmProcess. It means that once logged on sea.inria.fr with rsh, a local JVM will be launched, ie a ProActive node will be created on sea.inria.fr thanks to the process defined by jvmProcess.<jvm name="Jvm2"> <creation> <processReference refid="rloginProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id=""rloginProcess"> <rloginProcess class="org.objectweb.proactive.core.process.lsf.RLoginProcess" hostname="sea.inria.fr"> <processReference refid="jvmProcess"/> </rloginProcess> </processDefinition> </processes>You can use rlogin in the same way that you would use rsh
<jvm name="Jvm2"> <creation> <processReference refid="sshProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="sshProcess"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="sea.inria.fr"> <processReference refid="jvmProcess"/> </sshProcess> </processDefinition>ProActive provides
org.objectweb.proactive.core.process.ssh.SSHProcess
to create ssh process. org.objectweb.proactive.core.process.lsf.LSFBSubProcess
to create bsub process. <jvm name="Jvm2"> <creation> <processReference refid="sshProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="bsubInriaCluster"> <bsubProcess class="org.objectweb.proactive.core.process.lsf.LSFBSubProcess"> <processReference refid="jvmProcess"/> <bsubOption> <hostlist>cluster_machine1 cluster_machine2<hostlist/> <processor>6</processor> <scriptPath> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/cluster/startRuntime.sh"/> </scriptPath> </bsubOption> </bsubProcess> </processDefinition> <processDefinition id="sshProcess"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="sea.inria.fr"> <processReference refid="bsubInriaCluster"/> </sshProcess> </processDefinition> </processes>In this example, the JVM called Jvm2 will be created using ssh to log on the cluster front end. Then a bsub command will be generated thanks to the process defined by bsubInriaCluster. This bsub command will create Nodes on several cluster machines, since bsubInriaCluster references the jvmProcess defined process. All tags defined under <bsubOption> are not mandatory, but they can be very usefull. The <hostlist> tag defines possible candidates in the job attribution, if not set the job will be allocated among all cluster's machines. The <processor> tag defines the number of processor requested, if not set, one processor is requested. The <resourceRequirement> tag defines the expected number of processors per machine. For instance <resourceRequirement value="span[ptile=2]"/> ensures that 2 processors per machines will be used, whereas value="span[ptile=1]" forces that LSF allocates only only one processor per machine. It represents the -R option of LSF. At last <scriptPath> defines the path on the cluster front end of the script startRuntime.sh which is necessary to run ProActive on a cluster. This script is located under Proactive/scripts/unix/cluster. If not set the default location is set as ~/Proactive/scripts/unix/cluster.
<jvm name="Jvm2"> <creation> <processReference refid="bsubProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="bsubInriaCluster"> <bsubProcess class="org.objectweb.proactive.core.process.lsf.LSFBSubProcess" interactive="true" queue="short'> <processReference refid="jvmProcess"/> <bsubOption> <hostlist>cluster_machine1 cluster_machine2<hostlist/> <processor>6</processor> <resourceRequirement value="span[ptile=2]"/> <scriptPath> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/cluster/startRuntime.sh"/> </scriptPath> </bsubOption> </bsubProcess> </processDefinition> </processes>Note that in the example above two attributes: interactive and queue appear. They are optional, and have a default value: respectively false and normal. They represent option in the bsub command: interactive mode, and the name of the queue.
org.objectweb.proactive.core.process.pbs.PBSBSubProcess
to create pbs processes. As explained for LSF you can combine protocols in order for instance to log on the cluster's frontal with ssh, then to create nodes using PBS, or you can also use only PBS without ssh if you are already logged on the frontend. Example below shows how to combine an ssh process to log on the cluster, then a PBS process that reference a local process in order to create nodes on processors requested by PBS.
<jvm name="Jvm2"> <creation> <processReference refid="sshProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="pbsCluster"> <pbsProcess class="org.objectweb.proactive.core.process.pbs.PBSSubProcess"> <processReference refid="jvmProcess"/> <pbsOption> <hostsNumber>4</hostsNumber> <processorPerNode>1</processorPerNode> <bookingDuration>00:15:00</bookingDuration> <outputFile>/home1/rquilici/out.log</outputFile> <scriptPath> <absolutePath value="/usr/plugtest/ProActive/scripts/unix/cluster/pbsStartRuntime.sh"/> </scriptPath> </pbsOption> </pbsProcess> </processDefinition> <processDefinition id="sshProcess"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="frontend"> <processReference refid="pbsCluster"/> </sshProcess> </processDefinition> </processes>Note that not all options are listed here, and some options mentionned in the example are optionnal: hostsNumber represents the number of host requested using pbs(default is 1), processorPerNode represents the number of processor per hosts requested(1 or 2, default is 1), bookingDuration represents the duration of the job(default is 1 minute), outputFile represents the file where to put the ouput of the job(default is specified by pbs), scriptPath represents the location on the frontend_host of the script pbsStartRuntime.sh(default is /user.home/ProActive/scripts/unix/cluster/pbsStartRuntime.sh).
org.objectweb.proactive.core.process.gridengine.GridEngineSubProcess
to create grid engine processes. As explained above you can combine protocols in order for instance to log on the cluster's frontal with ssh, then to create nodes using SGE, or you can also use only SGE without ssh if you are already logged on the frontend. Example below shows how to combine an ssh process to log on the cluster, then a SGE process that reference a local process in order to create nodes on processors requested by SGE.
<jvm name="Jvm2"> <creation> <processReference refid="sshProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="sgeCluster"> <gridengineProcess class="org.objectweb.proactive.core.process.gridengine.GridEngineSubProcess"> <processReference refid="jvmProcess"/> <gridEngineOption> <hostsNumber>4</hostsNumber> <bookingDuration>00:15:00</bookingDuration> <scriptPath> <absolutePath value="/usr/plugtest/ProActive/scripts/unix/cluster/gridEngineStartRuntime.sh"/> </scriptPath> </gridEngineOption> </gridengineProcess> </processDefinition> <processDefinition id="sshProcess"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="frontend"> <processReference refid="sgeCluster"/> </sshProcess> </processDefinition> </processes>As mentionned previously, many options exist, and correspond to the main options specified in an SGE system. ScriptPath represents the location on the frontend_host of the script gridEngineStartRuntime.sh (default is /user.home/ProActive/scripts/unix/cluster/gridEngineStartRuntime.sh).
org.objectweb.proactive.core.process.globus.GlobusProcess
to create globus process. <jvm name="Jvm2"> <creation> <processReference refid="globusProcess"/> </creation> </jvm> ................................................... <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="globusProcess"> <globusProcess class="org.objectweb.proactive.core.process.globus.GlobusProcess" hostname="globus1.inria.fr"> <processReference refid="jvmProcess"/> <environment> <variable name="DISPLAY" value="machine_name0.0"/> </environment> <globusOption> <count>10</count> </globusOption> </globusProcess> </processDefinition> </processes>In this example, Jvm2 will be created using GRAM. An RSL request will be generated with informations provided in the descriptor. For instance, the <environment> tag is not mandatory, but for the globus host to export the DISPLAY on your machine, you can define the value in the descriptor as well as other environment variable, except the classpath(or java path,...) which must be defined in the local process referenced by globusProcess as explained before. <globusOption> is neither manatory. Default value for <count> element is 1. It represents the number of processor requested.
org.objectweb.proactive.core.process.oar.OARSubProcess
to use such protocol.org.objectweb.proactive.core.process.prun.PrunSubProcess
to use such protocol.<virtualNodesDefinition> <virtualNode name="PenguinNode" property="multiple"/> <virtualNodesDefinition/> <deployment> <mapping> <map virtualNode="PenguinNode"> <jvmSet> <vmName value="Jvm1"/> <vmName value="Jvm2"/> <vmName value="Jvm3"/> <vmName value="Jvm4"/> </jvmSet> </map> </mapping> <jvms> <jvm name="Jvm1"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> <jvm name="Jvm2"> <creation> <processReference refid="jvmProcess"/> </creation> </jvm> <jvm name="Jvm3"> <creation> <processReference refid="sshInriaCluster"/> </creation> </jvm> <jvm name="Jvm4"> <creation> <processReference refid="globusProcess"/> </creation> </jvm> </jvms> </deployment> <infrastructure> <processes> <processDefinition id="jvmProcess"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="jvmProcess1"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"> <classpath> <relativePath origin="userHome" value="/ProActive/classes"/> <relativePath origin="userHome" value="/ProActive/lib/bcel.jar"/> <relativePath origin="userHome" value="/ProActive/lib/asm.jar"/> <relativePath origin="userHome" value="/ProActive/lib/jini-core.jar"/> <relativePath origin="userHome" value="/ProActive/lib/jini-ext.jar"/> <relativePath origin="userHome" value="/ProActive/lib/reggie.jar"/> ............. </classpath> <javaPath> <absolutePath value="/usr/local/jdk1.4.0/bin/java"/> </javaPath> <policyFile> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/proactive.java.policy"/> </policyFile> <log4jpropertiesFile> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/proactive-log4j"/> </log4jpropertiesFile> <ProActiveUserPropertiesFile> <absolutePath value="/net/home/rquilici/config.xml"/> </ProActiveUserPropertiesFile> </jvmProcess> </processDefinition> <processDefinition id="bsubInriaCluster"> <bsubProcess class="org.objectweb.proactive.core.process.lsf.LSFBSubProcess"> <processReference refid="jvmProcess1"/> <bsubOption> <hostlist>cluster_group1 cluster_group2<hostlist/> <processor>4</processor> <resourceRequirement value="span[ptile=2]"/> <scriptPath> <absolutePath value="/net/home/rquilici/ProActive/scripts/unix/cluster/startRuntime.sh"/> </scriptPath> </bsubOption> </bsubProcess> </processDefinition> <processDefinition id="sshInriaCluster"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="sea.inria.fr"> <processReference refid="bsubInriaCluster"/> </sshProcess> </processDefinition> <processDefinition id="globusProcess"> <globusProcess class="org.objectweb.proactive.core.process.globus.GlobusProcess" hostname="cluster.inria.fr"> <processReference refid="jvmProcess1"/> <environment> <variable name="DISPLAY" value="machine_name0.0"/> </environment> <globusOption> <count>10</count> </globusOption> </globusProcess> </processDefinition> </processes> </infrastructure> </ProActiveDescriptor>
<?xml version="1.0" encoding="UTF-8"?> <ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../descriptors/DescriptorSchema.xsd"> <componentDefinition> <virtualNodesDefinition> <virtualNode name="VnTest" property="multiple"/> </virtualNodesDefinition> </componentDefinition> <deployment> <mapping> <map virtualNode="VnTest"> <jvmSet> <vmName value="Jvm1"/> <vmName value="Jvm2"/> </jvmSet> </map> </mapping> <jvms> <jvm name="Jvm1"> <acquisition> <serviceReference refid="lookupRMI"/> </acquisition> </jvm> <jvm name="Jvm2"> <acquisition> <serviceReference refid="lookupP2P"/> </acquisition> </jvm> </jvms> </deployment> <infrastructure> <services> <serviceDefinition id="lookupRMI"> <RMIRegistryLookup url="//localhost:2020/PA_JVM1"/> </serviceDefinition> <serviceDefinition id="lookupP2P"> <P2PLookup nodeNumber="2" timeout="70000" lookupFrequence="5000"/> <peerSet> <peer>rmi://localhost:3000</peer> </peerSet> </P2PLookup> </serviceDefinition> </services> </infrastructure> </ProActiveDescriptor>The RMIRegistryLookup service needs only an url to perform the lookup. Many options exists for the P2PLookup service: nodeNumber represents the number of JVMs to acquire, timeout represents the maximum amount of time to wait before accessing the nodes, of course if the number of jvms requested is returned before the timeout, access to those nodes is automatically provided, lookupFrequence represents the amount of time between two consecutive search in the P2P infrastructure, the peer element represents an entry point in the P2P system, many peers can be specifed. See P2P documentation for more informations.
ProActiveDescriptor pad = ProActive.getProActiveDescriptor(String xmlFileLocation);
pad.activateMappings();
--------------------------------------------
--------------------------------------------
--------------------------------------------
pad.killall(false);