HOWTO14 How to use COMPSs
|Main||EGI.eu operations services||Support||Documentation||Tools||Activities||Performance||Technology||Catch-all Services||Resource Allocation||Security|
|Documentation menu:||Home •||Manuals •||Procedures •||Training •||Other •||Contact ►||For:||VO managers •||Administrators|
COMPSs is a programming framework, composed of a programming model and an execution runtime which supports it, whose main objective is to ease the development of applications for distributed environments. The COMPSs programming model aims to keep the programmers unaware of the execution environment and parallelization details.
On the other hand, the COMPSs runtime is in charge of optimizing the performance of the application by exploiting its inherent concurrency. The runtime intercepts any call to a selected method creating a representative task and finding the data dependencies with all the previous ones that must be considered along the application run. One important feature of the COMPSs runtime is the ability to exploit the cloud elasticity by adjusting the amount of resources to the current workload. When the number of tasks is higher than the available cores, the runtime turns to the cloud looking for the provider that offers the resources that better fit the requirements of the application with a lower economical cost. Symmetrically, when the runtime detects an excess of resources it powers off unused instances in a cost-efficient way. Such decisions are based on information provided by the user who describes the details of the software images and instance templates available for every cloud provider. In order to make COMPSs interoperable with different providers, a common interface is used, which implements the specific cloud provider API. Currently, there exist connectors for Amazon EC2, Azure and for providers that implement the Open Cloud Computing Interface (OCCI) and the Open Virtualization Format (OVF) specifications for resource management.
Integration of COMPSs in the EGI FedCloud
In order to support the usage of EGI Federated Cloud IaaS resources, a specific connector is adopted to operate with the interfaces and protocols offered by EGI providers. The support for the VM management is implemented using the rOCCI client that transparently interoperates with the rOCCI servers deployed in the testbed on top of the different middlewares. The connector supports different authentication methods, including X509 type through VOMS proxy certificates. To setup each connector instance, the user indicates which virtual images and instance types are offered by the specific provider; thus, when the runtime asks for the creation of a VM, the connector selects the appropriate image and resource template according to the requirements (in terms of cpu, memory, disk, etc) and invokes the rOCCI client through Mixins.
Installing the COMPSs runtime
The COMPSs runtime is available through Debian and RedHat packages. Details for installation can be found here COMPSs packages are also available in the appDB https://appdb.egi.eu/store/software/compss.framework
A Virtual Appliance is also available in the AppDB with a preconfigured installation of COMPSs. A cloud-init script can be used to contextualize the VM.
Developing COMPSs applications
Also, a plugin for the Eclipse Development Environment can be installed to graphically develop COMPSs applications.The BSC Application Repository contains a list of sample applications that can be directly executed in the COMPSs VA (started using the COMPSs flavor)
The COMPSs PMES
The Programming Model Enactment Service (PMES) is a web service that allows the execution of applications programmed through the COMPSs programming model. A client is used to contact an OGF BES compliant endpoint in order to submit the execution of the application. This request is expressed through a JSDL document containing the application name, the input parameters and data references. When a request is received, a virtual machine is requested to the Cloud Provider in order to deploy the application downloading its package from a storage location. Once the runtime machine is deployed the COMPSs application is remotely started. In its turn, the COMPSs runtime will schedule the tasks on a set of machines created on demand. This phase includes the staging of input files from remote locations as specified in the execution request. The COMPSs-PMES service can be also configured to boot a predefined number of VMs on the provider where the service is deployed; this solution allows the serving of requests that involve the execution of smaller operations in a reasonable time avoiding the overhead of VM creation; if the number of requests exceeds the available resources, the service is still able to dynamically deploy new instances in order to cope with the burst of load.
Manual installation of COMPSs PMES
A PMES-COMPSs package is available for Debian and RedHat distributions
Debian based distributions
Checkout the DEB package from: http://compss.bsc.es
Install package dependencies
- sudo apt-get update
- sudo apt-get install gdebi
Install PMES on the system:
- sudo gdebi pmes-compss.deb
- rm -rf pmes-compss.deb
RedHat based distributions (CentOS)
Checkout the RPM package from: http://compss.bsc.es
Install package dependencies
- yum update
Install PMES on the system:
- yum -y install pmes-compss.rpm
- rm -rf pmes-compss.rpm
Deployment of the COMPSs PMES Virtual Appliance from the AppDB
A Virtual Appliance is available in the EGI AppDB appdb.egi.eu/store/vappliance/compss.pmes. This appliance comes with two flavors, set through contextualization scripts: one version offers the PMES service that deploys and starts COMPSs applications, while the COMPSs flavor is used by the COMPSs runtime to create VMs to execute the tasks. The cloud-init script for PMES also starts a Tomcat container from the /home/pmes/apache-tomcat folder.
PMES-COMPSs service certificates
A couple of private-public keys has to be created and stored in a keystore accessible by Tomcat to secure the connection to the service.
Create the PMES-COMPSs private key store:
keytool -genkey -alias your_client_alias -keyalg RSA -keystore /path/to/keystore_file
Create your client's public certificate from PMES-COMPSs private key store:
keytool -export -alias your_client_alias -keystore /path/to/keystore_file -file /path/to/certificate_file
keytool -export -alias pmes -keystore keystore -file pmesCert.cer
Enter keystore password:
Certificate stored in file <pmesCert.cer>
This file has to be imported in the client keystore in order to communicate with the server, as explained in the Testing section
PMES-COMPSs service configuration
The configuration file in the available VA is located at: /home/pmes/conf/PMESConfig.xml
<!-- PMES Configuration -->
<!-- Default SSH key type: DSA -->
<!-- Max allowed time per job (minutes) -->
<!-- Update logs time (minutes) -->
<!-- Job expiration control (minutes) -->
<!-- Resources Configuration -->
<!-- CLOUD Provider Configuration -->
Templates files are used to map the requirements of the applications to the type of resource templates (small, medium, large...) offered by a provider
A proxy file has to be provided to the PMES in order to create the VMs
<!-- Maximum allowed VM creation time in minutes -->
<!-- Application deploy path on provider VM -->
<!-- Shared space mountpoint on virtual instances -->
<!-- Defines a pool of pre-started VMs for speeding up job submissions -->
The static pool is useful to serve those requests that don't involve complex computational runs. In the client a parameter is used to specify if the run is simple or complex. In the latter case the COMPSs runtime is deployed and used to elasticly execute the tasks of the applications.
<span style="line-height: 1.5em;" />
This parameter defines the number of cores managed by the PMES instance'
<!-- Maximum of system cores -->
<!-- Maximum of system memory -->
<span style="line-height: 1.5em;" />
This section is used to specify the location of the COMPSs runtime and the specification of the VM needed to deploy it
<!-- COMPSs Configuration -->
<!-- COMPSs job monitoring frequency (seconds) -->
<!-- Master VM Specs -->
<!-- COMPSs service resources -->
<!-- Storage adaptors map -->
Basic security configuration
The PMES service provides basic authentication through username and password. A users database file has to be created
Add users following the pattern that can be found below:
Hash the default assigned passwords through:
echo -n “mypassword” | md5sum | cut -f1 -d' '
Tomcat http secure channel configuration
In Tomcat service.xml configuration file add:
<Connector port="8443" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
Then start the service:
Testing the PMES endpoint
A simple client to test the availability of a COMPSs-PMES endpoint can be downloaded from
In order to use it the certificate of the service has to be imported in the keystore:
keytool -import -file cesnet-pmes.cer -alias pmes -keystore <your_keystore_path>
Then execute the client specifying the location of the keystore as Java trustStore:
java -jar -Djavax.net.ssl.trustStore=<your_keystore_path> -Djava.endorsed.dirs=endorsed/ pmes-sample-jar-with-dependencies.jar PMESTest https://took25.ics.muni.cz:8443/pmes/factory
If the service is properly working a similar message should be printed:
CHECKING STATUS AT: https://took25.ics.muni.cz:8443/pmes/factory
* Testing System Status:
- System Status: 0 of 36 cores (0%) and 0.0 GB of 135.0 GB of memory (0%) in use
Developing a PMES client
A Java API is available for the development of clients to execute COMPSs applications through the PMES service. The Java Doc is available at bscgrid05.bsc.es/~lezzi/pmes/api/