Salome HOME
47a420dbb116f918bfa1db94a10dd63471ca2bbe
[modules/jobmanager.git] / doc / resource.rst
1 Managing SALOME resources with the JOBMANAGER
2 =============================================
3
4 The JOBMANAGER provides a GUI to manage SALOME resources.
5 Later in the chapter, we use resource for SALOME resource.
6
7 Definition of a SALOME resource
8 +++++++++++++++++++++++++++++++
9
10 A resource is the SALOME abstraction for computer.
11 A resource contains three different kinds of information:
12
13 - A name.
14 - A physical description of the computer.
15 - A description of a SALOME installation in the computer.
16
17 A resource's name could be different from the computer name since 
18 different SALOME installation could coexist in the computer.
19
20 Types and usage of SALOME resources
21 -----------------------------------
22
23 In SALOME, resources can be used in two different ways:
24
25 - Resources can be used to launch containers, either semi-automatically with
26   YACS or directly by calling the method GiveContainer of the Container
27   Manager (service provided by the KERNEL).
28 - Resources can be used to launch jobs, either with the JOBMANAGER module or
29   with the underlying Launcher service (provided by the KERNEL).
30
31 Those two kinds of resources are both managed by the Resource Manager (KERNEL
32 service). They can both be created and edited with the resource management
33 interface of the JOBMANAGER. This is why some informations describing the
34 resources (e.g. CPU clock) are in fact not used at all by the JOBMANAGER to
35 launch jobs. If you just want to create a resource to launch jobs, you can
36 safely ignore those parameters.
37
38 Physical description of the computer
39 ------------------------------------
40
41 A resource contains a physical description of the computer.
42 These informations are used by the Resource Manager to choose and use a
43 resource when a container (in YACS) or a job (in JOBMANAGER) has to be
44 launched.
45
46 The description of each attribute is given in the table below. 
47
48 **Warning:** The *mandatory* part is for using the resource with the JOBMANAGER.
49
50 ========================== ================ =============================================================
51 **Attribute**              **Mandatory**    **Description**
52 ========================== ================ =============================================================
53 **hostname**               Yes              Network name of the computer. If the computer is a cluster,
54                                             you have to give the head node name.
55 **protocol**               Yes              Network protocol to use for creating connections 
56                                             (ssh or rsh).
57 **username**               Yes              User login on the computer.
58 **Batch Manager**          No               Type of batch manager installed in the resource. Use *None*
59                                             if the resource is a single computer. Some batch managers are
60                                             indicated with "limited support". This means that their
61                                             support in JOBMANAGER is either new and experimental or
62                                             old and obsolete. In both cases, they have not been fully
63                                             validated in this version and thus can be buggy or even not
64                                             work at all.
65 **iprotocol**              Yes              Internal protocol to use on a cluster (i.e. the command used
66                                             to launch processes on other nodes of the cluster).
67 **mpiImpl**                No               MPI implementation to use.
68 **OS**                     No               Operating system name, e.g.: Linux, Windows (not used by
69                                             JOBMANAGER)
70 **nb_node**                No               Number of nodes in the computer (not used by JOBMANAGER)
71 **nb_proc_per_node**       No               Number of processors or cores in each node (only used with
72                                             PBS batch manager)
73 **mem_mb**                 No               Memory per node in megabytes (not used by JOBMANAGER)
74 **cpu_clock**              No               Clock rate in gigahertz of the computer's processor(s) (not
75                                             used by JOBMANAGER)
76 **Is Cluster Head**        Yes              Indicate if the resource is a cluster managed by a batch
77                                             manager
78 **Working Directory**      No               Base working directory for the resource. The working
79                                             directories for the jobs will by default be created as
80                                             subdirectories of this directory.
81 ========================== ================ =============================================================
82
83 SALOME installation description
84 -------------------------------
85
86 A resource could contain a SALOME installation description.
87 The description of each attribute is given in the table below.
88
89 **Warning:** Attribute **applipath** is *mandatory* with JOBMANAGER SALOME related type of job.
90
91 ========================== =============================================================
92 **Attribute**              **Description**
93 ========================== =============================================================
94 **applipath**              Directory of the SALOME application to use on the resource
95 **componentList**          List of the SALOME components available in the SALOME 
96                            application (not used by JOBMANAGER)
97 ========================== =============================================================
98
99 Where is the resource file?
100 ---------------------------
101
102 Resources are located into a XML resource file. SALOME tries to find this file
103 in three different locations:
104
105 1. If **USER_CATALOG_RESOURCES_FILE** env file is defined, SALOME uses this file.
106 2. If not, in the SALOME application directory: $APPLIPATH/CatalogResources.xml.
107 3. If not, in the directory of the installation of SALOME KERNEL: 
108    $KERNEL_ROOT_DIR/share/salome/resources/kernel/CatalogResources.xml.
109
110 By default, the resource manager creates a resource with the name and the hostname of the user computer.
111
112 JOBMANAGER resource management GUI
113 ++++++++++++++++++++++++++++++++++
114
115 The JOBMANAGER provides a panel to manage user's resources. This panel is shown in the 
116 figure :ref:`figure_jobmanager_resource_1`. The panel provides some buttons and a list
117 that shows the available resources. You have to select one resource to enable some buttons.
118
119 .. _figure_jobmanager_resource_1:
120
121 .. figure:: images/jobmanager_resource_1.png
122   :align: center
123
124   **JOBMANAGER resource management panel**
125
126 The description of each button is given in the table below.
127
128 ========================== =============================================================
129 **Button**                  **Description**
130 ========================== =============================================================
131 **Refresh Resource List**  Resource file is read to refresh the list.
132 **Show**                   Show the selected resource.
133 **Edit**                   Edit the selected resource. The resource is saved is **Ok** 
134                            is clicked. If the resource name is changed, a new resource
135                            is added.
136 **Add**                    Add a new resource.
137 **Remove**                 Remove the selected resource.
138 ========================== =============================================================
139
140 The figure :ref:`figure_jobmanager_resource_2` shows the panel of a resource. This panel
141 shows all the information of a resource.
142
143 .. _figure_jobmanager_resource_2:
144
145 .. figure:: images/jobmanager_resource_2.png
146   :align: center
147
148   **JOBMANAGER resource panel**
149
150 Two usage scenarios of SALOME's resource with the JOBMANAGER
151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
152
153 This section describes to common scenarios for understanding how to describe
154 a resource for the JOBMANAGER.
155
156 Using a single machine
157 ----------------------
158
159 In this scenario, you need to launch a job on your computer or another single computer
160 available in your network.
161
162 To launch a **command** job you need to fill the following attributes:
163
164 - **hostname**
165 - **protocol** = *ssh*
166 - **username**
167 - **Batch Manager** = *None*
168 - **Is Cluster Head** = *false*
169
170 **Warning:** You have to configure ssh for allowing ssh commands without asking 
171 interactive password (RSA or DSA keys).
172
173 To launch a **SALOME** type of job, you also need to fill the following attributes:
174
175 - **applipath**
176
177 Using a cluster managed by a batch system
178 -----------------------------------------
179
180 In this scenario, you need to launch a job into a cluster managed by a batch system.
181
182 To launch a **command** job you need to fill the following attributes:
183
184 - **hostname**
185 - **protocol**
186 - **username**
187 - **Batch Manager**
188 - **iprotocol**
189 - **nb_proc_per_node** (only with PBS batch manager)
190 - **Is Cluster Head** = *true*
191
192 **Warning:** You have to configure ssh for allowing ssh commands without asking 
193 interactive password (RSA or DSA keys) between your computer and the cluster and
194 eventually between the cluster's nodes.
195
196 To launch a **SALOME** command job you also need to fill the following attributes:
197
198 - **applipath**