source: trunk/docs/kernel/hpc.rst @ 950

Last change on this file since 950 was 917, checked in by djay, 5 years ago

Merge prototype-v0 branch in trunk

  • Property svn:keywords set to Id
File size: 14.0 KB

Optional HPC support

The optional ZOO-Kernel HPC support gives you the opportunity to use OGC WPS for invoking remote execution of OTB applications. The current implementation rely on OpenSSH and the Slurm scheduler.

Note

Slurm logo Slurm is an acronym for Simple Linux Utility for Resource Management. Learn more on official website.

For executing an OGC WPS Service using this HPC support, one should use the OGC WPS version 2.0.0 and asynchornous request. Any tentative to execute synchronously a HPC service will fail with the message "The synchronous mode is not supported by this type of service". The ZOO-Kernel is not the only responsible for the execution and will wait for the execution on the HPC server to end before being able to continue its execution. Also, transfering the data from the WPS server to the cluster and downloading the data produced by the execution will take time. Hence, when OGC WPS Client will request for GetCapabilities or DescribeProcess only the "async-execute" mode will be present in the jobControlOptions attribute for the HPC services.

You can see in the sequence diagram below the interactions between the OGC WPS Server (ZOO-Kernel), the mail daemon (running on the OGC WPS server), the Callback Service and, the HPC Server during an execution of a HPC Service. The dashed lines represent the behavior in case the optional callback service invocation has been activated. These invocations are made asynchronously for lowering their impact over the whole process in case of failure of the callback service for instance.

By now, the callback service is not a WPS service but an independent server.

HPC Support schema

Installation and configuration

Follow the step described below in order to activate the ZOO-Project optional HPC support.

Prerequisites

Installation steps

ZOO-Kernel

Compile ZOO-Kernel using the configuration options as shown below:

Error: Failed to load processor guess
No macro or processor named 'guess' found

Optionally, you can ask your ZOO-Kernel to invoke a callback service which is responsible to record execution history and data produced. In such a case you can add the --with-callback=yes option to the configure command.

Note

In case you need other languages to be activated, such as Python for exemple, please use the corresponding option(s).

FinalizeHPC WPS Service

For being informed that the remote OTB application ends on the cluster, one should invoke the FinalizeHPC service. It is responsible to connect using SSH to the HPC server to run an sacct command for extracting detailled informations about the sbatch that has been run. If the sacct command succeed, and the service is no more running on the cluster, then the informations are stored in a local conf file containing a [henv] section definition, the service connect to unix domain socket (opened by the ZOO-Kernel that has initially schedduled the service through Slurm) to inform about the end of the service run on the cluster. This makes the initial ZOO-Kernel to continue its execution by downloading output data produced over the execution of the OTB application on the cluster. So, this service should be build and deployed on your WPS server. You can use the following commands to do so.

Error: Failed to load processor guess
No macro or processor named 'guess' found

You should also copy the .. note:

FinalizeHPC should be called from a daemon, responsible for reading
mails sent by the cluster to the WPS server.

Configuration steps

Main configuration file

When HPC support is activated, you can use different HPC configuration by adding confId to your usual serviceType=HPC in your zcfg file. For being able to find which configuration a service should use, the ZOO-Kernel require to know what are the options for creating the relevant sbatch.

Also, you can define multiple configuration to run the OTB application on the cluster(s) depending on the size of the inputs. You should define in the section corresponding to your ServiceType the treshold for both raster (preview_max_pixels) and vector (preview_max_features) input. In case the raster or the vector dataset is upper the defined limit, then the fullres_conf will be used, in other case the preview_conf will be.

For each of this configurations, you will have define the parameters to connect the HPC server, by providing ssh_host, ssh_port, ssh_user and, ssh_key. Also, you should set where the input data will be stored on the HPC server, by defining remote_data_path (the default directory to store data), remote_presistent_data_path (the directory to store data considerated as shared data, see below) and, remote_work_path the directory used to store the SBATCH script created locally then, uploaded by the ZOO-Kernel.

Also, there are multiple options you can use to run your applications using SBATCH. You can define them using jobscript_header, jobscript_body and jobscript_footer or by using sbatch_options_<SBATCH_OPTION> where <SBATCH_OPTION> should be replaced by a real option name, like workdir in the following example. For creating the SBATCH file, the ZOO-Kernel create a file starting with the content of the file pointed by jobscript_header (if any, a default header is set in other case), then, any option defined in sbatch_options_* and a specific one: job-name, then, jobscript_body is added (if any, usually to load required modules), then the ZOO-Kernel add the invocation of the OTB application then, optionally the jobscript_footer is added, if any.

Finally, remote_command_opt should contains all the informations you want to be extracted by the sacct command run by the FinalizeHPC service. billing_nb_cpu is used for billing purpose to define a cost for using a specific option (preview or fullres).

In addition to the specific HPC_<ID> section and the corresponding fullres and preview ones, you should define in the [security] section using the shared parameter to set the URLs from where the downloaded data should be considerated as shared, meaning that even if this ressources requires authentication to be accessed, any authenticated user will be allowed to access the cache file even if it was created by somebody else. Also, this shared cache won't contain any authentication informations in the cache file name as it is usually the case.

Error: Failed to load processor guess
No macro or processor named 'guess' found

You can see below an example of jobscript_header file.

Error: Failed to load processor guess
No macro or processor named 'guess' found

You can see below an example of jobscript_body file.

Error: Failed to load processor guess
No macro or processor named 'guess' found

In casse you have activated the callback service, then you should also have a [callback] section, in which you will define url to invoke the callback service, prohibited to list the services that should not require invocation of the callback sercvice if any and, template pointing to the local updateExecute.xsl file used to replace any inputs provided by value to the reference to the locally published OGC WFS/WCS web services. This execute request is provided to the callback service.

Error: Failed to load processor guess
No macro or processor named 'guess' found

OGC WPS Services metadata

To produce the zcfg files corresponding to the metadata definition of the WPS services, you can use the otb2zcfg tool to produce them. You will need to replace serviceType=OTB by serviceType=HPC and, optionally, add one line containing confId=HPC_Sample for instance.

Please refer to otb2zcfg documentation to know how to use this tool.

Using the HPC support, when you define one output, there will be automatically 1 to 3 inner outputs created for the defined output:

download_link
URL to download to generated output
wms_link
URL to access the OGC WMS for this output (only in case useMapserver=true)
wcs_link/wfs_link
URL to access the OGC WCS or WFS for this output (only in case useMapserver=true)

You can see below an example of Output node resulting of the definition of one output named out and typed as geographic imagery.

Error: Failed to load processor guess
No macro or processor named 'guess' found
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png