New features since version for tdaq-01-07-00:
No direct support for non-templated applications.
Uses dal layer for representing OKS classes (no dynamic class generation).
Uses config package to read and write configuration databases (no XML manipulation).
It now generates only one L2PUTemplateApplication and PTTemplateApplication.
The segments and tdaqpartition modules does not return tuples anymore.
Added command line script to generate a partition based on already existent segments.
Added option to create a partition where each segment goes to a different file.
Now it is posible to create partitions with any segment structure, and specifying exactly which nodes will be used for an specific segment (rack support).
Not TDAQPartition only receives the number of applciations to run on each node. The number of nodes to use is taken from FarmScanner.
Created helper function to set FarmScanner nodes for a segment structure and functions.
New features since version for tdaq-01-07-00:
The class now stores ComputerObjects directly.
insertNetInfo method removed.
removeNodes method removed.
getNumApps method removed.
Add nodes always receives a list either of node names or dal.Computer objects.
You can create a segment structure specifying in which segment(s) a node will be placed, and which task it will perform.
Added methods to cope with segment assignment of nodes.
Imagine that we want to create a full chain, localhost, partition, with the following options:
1 Readout System (ROS)
3 RoBs per ROSE (ROB)
1 LVL2 Supervisor (L2SV)
1 LVL2 Processing Unit (L2PU) with 1 Worker Thread (WT)
1 Sub Farm Input (SFI)
1 Event Filter Application (EFD) with one Processing Task (PT)
1 Sub Farm Output (SFO)
TCP network protocol, since we have the ROS and the LVL2 Result Handler in the same node.
You don't need to specify the use of LVL2 Result Handler or a Dataflow Manager (DFM), since the PartitionMaker automatically insert them as needed. So, let's imagine that we want to generate our localhost partition on the pcatb123 node. To start, after login on the pcatb123 node, just call, from the command line, the PartitionMaker integrated environment by typing pmaker.
Next, after the environment is opened, just type the following commands:
cluster = pm.farmscanner.FarmScanner(localHostNode = 'pcatb123.cern.ch')
cluster = pm.tdaqpartition.distributeNodes(cluster, nROS=1, nL2SV=1, nL2PU=1, nSFI=1, nEFD=1, nSFO=1)
robMap = pm.rossegment.genDummyRobMap(1, 3)
part = pm.tdaqpartition.TDAQPartition(cluster, name='part_lh', robMap=robMap, useTCP=True)
pm.project.quickGenerate(part.getPartition(), 'part_lh.data.xml', part.getIncludes())
After these 5 commands, a partition file named 'part_lh.data.xml' will be created in your local directory. Below follows the explanation of each of the above typed commands.
This command creates a cluster containing just one node (pcatb123) already set for localhost operation.
This command takes this single node, and creates a segment structure, so the TDAQPartition class will know how many segments to generate for each top segment (ROS, L2, etc). To this method we specifies the number of NODES for each function (ROS, L2PU, etc) The number of applciations running on each node is passed via the TDAQPArtition constructor.
Generates a dummy ROB to ROS python map to be used by the PartitionMaker. the TDAQPartition class gets the information about number of ROSs and number of ROBs per ROS from this map.
Initializes the class that will, at the end, return an OKS Partition object fully configured, based on the parameters passed to its constructor. Just note that, since we are explicitly typing the parameter name and value ('useTCP=True', for instance), they can be in any order, so that it would not be an error place the 'useTCP=True' parameter before the parameter 'robMap=robMap' for instance.
Generates the partition file, by receiving the OKS components returned by the method part.getPartition. The second parameter is the partition file name. The last one is a list of files used by the TDAQPartition to generate the partition structure. The files defined here will appear in the include section of your partition file. If no file is included, then any object coming from a missed include file will be printed in your final partition file. desired partition. The files .
The above partition was created using the integrated environment. If desired by the user, the above code could be placed into a script file ('my_part.py'), and be executed by doing pmaker my_part.py. The final result is the same.
IMPORTANT NOTE: the PartitionMaker follows the python's syntax, so, for instance, you must not insert spaces in the left side of the above typed commands. More information can be found here.
For more information on parameters settings, helper functions, other functionalities, users are invited to take a look at the PartitionMaker TWiki page