![Page 1: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/1.jpg)
Member of the ExperTeam Group
Ralf RateringPallas GmbHHermülheimer Straße 1050321 Brühl, Germany
[email protected]://www.unicorepro.com
The UNICOREpro Client
Programming Client Plug-Ins
![Page 2: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/2.jpg)
© Pallas GmbH. No distribution without authorization.
Starting Point: The Lattice Boltzmann Application
Scenario: A site wants to make new application available on the Grid
Example: Lattice Boltzmann
– Simulation of fluent mixing
– Output: a gif animation
– Intermediate sample files are generated
– A control file can change parameters while application is executing
Integrate Boltzmann application into Client GUI with a Plugin!
![Page 3: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/3.jpg)
© Pallas GmbH. No distribution without authorization.
Overview
Step 1
– Use Command Task to run application
– Specify input and output files in import/export panels Step 2
– Write a specialized Boltzmann plugin task Step 3
– Edit and automatically send the input file
– Automatically set output file export Step 4
– Get sample files while application is executing
– Visualize sample files in outcome area
![Page 4: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/4.jpg)
© Pallas GmbH. No distribution without authorization.
Step1: Executing a Command Task
Job Directory
(Uspace)
Input
Output.gif
LocalGridSchool/examples/BoltzmannInput.txt
Output.gif
Boltzmann
Application
Resource
Export
Import
![Page 5: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/5.jpg)
© Pallas GmbH. No distribution without authorization.
Writing Task Plugins
Disadvantages of Command task
– Input file has to be edited outside Client
– Imports and Exports have to be specified manually
– No integrated GUI for parameters
– Results have to be visualized outside client
– No additional functionality possible (sample and control files)
Write a specialized Boltzmann Plugin Task!
![Page 6: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/6.jpg)
© Pallas GmbH. No distribution without authorization.
Task Plugins
Add a new type of task to the Client GUI New task can be integrated into complex jobs Application support: CPMD, Fluent, Gaussian, etc.
Add task
item
Settings
item
Icon
Plugin
info
![Page 7: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/7.jpg)
© Pallas GmbH. No distribution without authorization.
Writing a Task Plugin
Implement 3 Classes
– Main plugin class
– Plugin Container
– JPAPanel Build a Jar Archive named „*Plugin.jar“ Sign the Jar with your Certificate
![Page 8: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/8.jpg)
© Pallas GmbH. No distribution without authorization.
Main Plugin Class
Start and stop plugin
Manage plugin objects Icon Format
![Page 9: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/9.jpg)
© Pallas GmbH. No distribution without authorization.
Plugin Container
Build Abstract Job Object (AJO) Manage imports, exports and execution Hold parameters Keep status Check errors
![Page 10: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/10.jpg)
© Pallas GmbH. No distribution without authorization.
AbstractJob
AJOs and Containers
AJO is the low-level „UNICORE language“ Client containers encapsulate complex AJOs
ActionGroup
IncarnateFiles
MakePortfolio
ExceuteScriptTask
DeletePortfolio
ActionGroup
ImportTask
RenameFile
DeclarePortfolio
ImportTask
RenameFile
ActionGroup
MakePortfolio
ExportTask
RenameFile
MakePortfolio
SpoolTask
![Page 11: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/11.jpg)
© Pallas GmbH. No distribution without authorization.
Container Hierarchy
Add your own container
![Page 12: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/12.jpg)
© Pallas GmbH. No distribution without authorization.
Implementing the Container
![Page 13: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/13.jpg)
© Pallas GmbH. No distribution without authorization.
Using Application Resources
Client NJS
IDBPlugin
APPLICATION Boltzmann 1.0
Description „Boltzmann Simulation“
INVOCATION [
/usr/local/boltzmann/bin/linuxExec.bin
]
END
Memory (64, 128, 32000)
...
APPLICATION Boltzmann 1.0
APPLICATION CPMD 3.1
...
Context MPI
...
Resource Set
Boltzmann resource
available?
Add to AJO UserTask
Display message
![Page 14: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/14.jpg)
© Pallas GmbH. No distribution without authorization.
JPAPanel
Set parameters in container Document/View paradigm Sub class of javax.swing.JPanel Implements interface Applyable Follow Java Look and Feel Design Guidelines
Container JPAPanel
applyValues
resetValues
updateValues
![Page 15: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/15.jpg)
© Pallas GmbH. No distribution without authorization.
Import and Export Panels
Specify file imports and exports from the GUI Use out of the box
New Import
Remove Import
Browse file systems
![Page 16: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/16.jpg)
© Pallas GmbH. No distribution without authorization.
Step 2: Writing the Boltzmann Plugin
Execute the application with an AJO UserTask Specify input file in import panel Specify output file in export panel
1. Unpack Code
2. Compile Code
3. Build Jar
4. Sign Jar
5. Deploy Jar
6. Run Client
GO!
![Page 17: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/17.jpg)
© Pallas GmbH. No distribution without authorization.
Remote Text Editor
Load, edit and save files from remote and local file spaces Use out of the box
public class PluginJPAPanel extends JPAPanel { private PluginContainer container; private RemoteTextEditor textEditor;
private buildComponents() { textEditor = new RemoteTextEditor(); JScrollPane editorScrollPane = new JScrollPane(textEditor); }
public void applyValues() { container.setText(textEditor.getText()); }
public void updateValues(boolean vsiteChanged) { if(vsiteChanged) { textEditor.setVsite(container.getVsite()); } }}
![Page 18: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/18.jpg)
© Pallas GmbH. No distribution without authorization.
File Transfers in the AJO
Storage
Server
USpace Temp
Root
HomeLocal
Spool
Alternate
USpace
IncarnateFiles
![Page 19: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/19.jpg)
© Pallas GmbH. No distribution without authorization.
Step 3: Transferring input and output files
Edit the input file with the RemoteTextEditor Plugin sends the input file with IncarnateFiles User adds output file in export panel
1. Unpack Code
2. Add IncarnateFiles task to execution ActionGroup
3. Compile Code
4. Run Client
GO!
![Page 20: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/20.jpg)
© Pallas GmbH. No distribution without authorization.
Boltzmann Job
USpace
AJO Portfolios
Wrap files in Uspace in portfolios
Pass portfolios between tasks
Plugin
InputIncarnateFiles
UserTask
submit
get outcome
Output.gif
submit
get outcome
GetSample Job
MakePortfolio
CopyPortfolioToOutcomeUSpace
Sample.gif
![Page 21: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/21.jpg)
© Pallas GmbH. No distribution without authorization.
Additional outcome panels
Make your outcome panel a sub class of JPanel Implement interface IPanelProvider in Container Implement interface IApplyable in outcome panel
Use com.pallas.unicore.client.panels.ImagePanel to display sample.gif
![Page 22: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/22.jpg)
© Pallas GmbH. No distribution without authorization.
Step 4: Getting intermediate results
Get sample files with MakePortfolio and CopyPortfolioToOutcome (use GetFilesFromUSpace!)
Visualize sample files in additional outcome panel
1. Unpack Code
2. Add GetFilesFromUspace request
3. Compile Code
4. Run Client
GO!
![Page 23: Member of the ExperTeam Group Ralf Ratering Pallas GmbH Hermülheimer Straße 10 50321 Brühl, Germany ralf.ratering@pallas.com](https://reader035.vdocuments.mx/reader035/viewer/2022062714/56649d5a5503460f94a3a862/html5/thumbnails/23.jpg)
© Pallas GmbH. No distribution without authorization.
Step 5: Free-Style
Write a Boltzmann Wizard
– Add GUI elements to specify input parameters
– Generate input file from GUI entries Automatically export output.gif
– Add a FileExport object in Plugin Code Send Control files to running application
– Add a control panel to outcome area
– Write a SendFilesToUspace request ...???