The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.

Slides:



Advertisements
Similar presentations
FP62004Infrastructures6-SSA E-infrastructure shared between Europe and Latin America Special Jobs Claudio Cherubino INFN Catania.
Advertisements

EGEE is a project funded by the European Union under contract IST EGEE Tutorial Turin, January Hands on Job Services.
INFSO-RI Enabling Grids for E-sciencE Workload Management System and Job Description Language.
Job Submission The European DataGrid Project Team
Riccardo Bruno, INFN.CT Sevilla, 10-14/09/2007 GENIUS Exercises.
E-infrastructure shared between Europe and Latin America 12th EELA Tutorial for Users and System Administrators Architecture of the gLite.
SEE-GRID-SCI Hands-On Session: Workload Management System (WMS) Installation and Configuration Dusan Vudragovic Institute of Physics.
Special Jobs Claudio Cherubino INFN - Catania. 2 MPI jobs on gLite DAG Job Collection Parametric jobs Outline.
1 Kolkata, Asia Joint CHAIN/EU-IndiaGrid2/EPIKH School for Grid Site Administrators, The EPIKH Project (Exchange Programme.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Special Jobs Matias Zabaljauregui UNLP.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Luciano Díaz ICN-UNAM Based on Domenico.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals GILDA Tutors INFN Catania ICTP/INFM-Democritos Workshop on Porting Scientific.
Enabling Grids for E-sciencE Workload Management System on gLite middleware Matthieu Reichstadt CNRS/IN2P3 ACGRID School, Hanoi (Vietnam)
Nadia LAJILI User Interface User Interface 4 Février 2002.
INFSO-RI Enabling Grids for E-sciencE Workload Management System Mike Mineter
Group 1 : Grid Computing Laboratory of Information Technology Supervisors: Alexander Ujhinsky Nikolay Kutovskiy.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite job submission Fokke Dijkstra Donald.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Using gLite API Vladimir Dimitrov IPP-BAS “gLite middleware Application Developers.
INFSO-RI Enabling Grids for E-sciencE The gLite Workload Management System Elisabetta Molinari (INFN-Milan) on behalf of the JRA1.
SEE-GRID-SCI The SEE-GRID-SCI initiative is co-funded by the European Commission under the FP7 Research Infrastructures contract no.
EGEE-III INFSO-RI Enabling Grids for E-sciencE Feb. 06, Introduction to High Performance and Grid Computing Faculty of Sciences,
Jan 31, 2006 SEE-GRID Nis Training Session Hands-on V: Standard Grid Usage Dušan Vudragović SCL and ATLAS group Institute of Physics, Belgrade.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania Master Class for Life Science, 4-6 May 2010 Singapore.
Job Management DIRAC Project. Overview  DIRAC JDL  DIRAC Commands  Tutorial Exercises  What do you have learned? KEK 10/2012DIRAC Tutorial.
INFSO-RI Enabling Grids for E-sciencE Workflow Management in Giuseppe La Rocca INFN – Catania ICTP/INFM-Democritos Workshop on Porting.
INFSO-RI Enabling Grids for E-sciencE Claudio Cherubino, INFN Catania Grid Tutorial for users Merida, April 2006 Special jobs.
EGEE-III INFSO-RI Enabling Grids for E-sciencE Using gLite API Vladimir Dimitrov IPP-BAS “gLite middleware Application Developers.
INFSO-RI Enabling Grids for E-sciencE Αthanasia Asiki Computing Systems Laboratory, National Technical.
High-Performance Computing Lab Overview: Job Submission in EDG & Globus November 2002 Wei Xing.
INFSO-RI Enabling Grids for E-sciencE Job Workflows with gLite Emidio Giorgio INFN NA4 Generic Applications Meeting 10 January 2006.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Workload management in gLite 3.x - MPI P. Nenkova, IPP-BAS, Sofia, Bulgaria Some of.
INFSO-RI Enabling Grids for E-sciencE Job Submission Tutorial (material from INFN Catania)
Workload Management System Jason Shih WLCG T2 Asia Workshop Dec 2, 2006: TIFR.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMPROXY usage Álvaro Fernández IFIC (CSIC)
EGEE-II INFSO-RI Enabling Grids for E-sciencE Command Line Grid Programming Spiros Spirou Greek Application Support Team NCSR “Demokritos”
INFSO-RI Enabling Grids for E-sciencE EGEE is a project funded by the European Union under contract IST Job sandboxes.
INFSO-RI Enabling Grids for E-sciencE Job Description Language (JDL) Giuseppe La Rocca INFN First gLite tutorial on GILDA Catania,
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals Giuseppe La Rocca INFN – Catania gLite Tutorial at the EGEE User Forum CERN.
E-infrastructure shared between Europe and Latin America FP6−2004−Infrastructures−6-SSA Special Jobs Valeria Ardizzone INFN - Catania.
Enabling Grids for E-sciencE Sofia, 17 March 2009 INFSO-RI Introduction to Grid Computing, EGEE and Bulgarian Grid Initiatives –
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMS tricks & tips – further scripting Giuseppe.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Practical using WMProxy advanced job submission.
Biomed tutorial 1 Enabling Grids for E-sciencE INFSO-RI EGEE is a project funded by the European Union under contract IST JDL Flavia.
User Interface UI TP: UI User Interface installation & configuration.
LCG2 Tutorial Viet Tran Institute of Informatics Slovakia.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMProxy Java API & SEE-GRID File Management.
Job Management Beijing, 13-15/11/2013. Overview Beijing, /11/2013 DIRAC Tutorial2  DIRAC JDL  DIRAC Commands  Tutorial Exercises  What do you.
INFSO-RI Enabling Grids for E-sciencE Padova site report Massimo Sgaravatto On behalf of the JRA1 IT-CZ Padova group.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Advanced Job Riccardo Rotondo
Introduction to Computing Element HsiKai Wang Academia Sinica Grid Computing Center, Taiwan.
Introduction to Job Description Language (JDL) Alessandro Costa INAF Catania Corso di Calcolo Parallelo Grid Computing Catania - ITALY September.
Enabling Grids for E-sciencE Work Load Management & Simple Job Submission Practical Shu-Ting Liao APROC, ASGC EGEE Tutorial.
FESR Trinacria Grid Virtual Laboratory Practical using WMProxy advanced job submission Emidio Giorgio INFN Catania.
Practical using C++ WMProxy API advanced job submission
Workload Management System on gLite middleware
Special jobs with the gLite WMS
Corso di Calcolo Parallelo Grid Computing
Alexandre Duarte CERN Fifth EELA Tutorial Santiago, 06/09-07/09,2006
Workload Management System
The gLite API – Part II Giuseppe LA ROCCA ACGRID-II School
gLite Advanced Job Management
gLite Job Management Amina KHEDIMI CERIST
Certificates Usage and Simple Job Submission
Certificates Usage and Simple Job Submission
gLite Job Management Christos Theodosiou
Job Description Language
GENIUS Grid portal Hands on
Job Description Language (JDL)
Job Submission M. Jouvin (LAL-Orsay)
Presentation transcript:

The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia

W M P r o x y J a v a A P I ver Software Requirements Java Class org.glite.wms.wmproxy.WMProxyAPI Support to cog-jglobus-1.4 Hands-on

Installation guide API JAVA /1 0. Start from a fresh install of Scientific Linux CERN –other platforms are also compatible but yet not properly tested 1.Axis ( where the needed jars available are: –axis jar –axis jar –axis-jaxrpc jar –axis-wsdl4j jar 2. Geronimo J2EE libraries: –geronimo-activation_1.0.2_spec jar –geronimo-j2ee_1.4_spec jar

3. Crypto libraries: –cryptix-asn1.jar –cryptix32.jar –bcprov.jar –puretls.jar 4. gLite libraries: –glite-jdl-api-java.jar –glite-wms-wmproxy-api-java.jar –glite-security-delegation-java.jar –glite-security-trustmanager.jar –glite-security-util-java.ja 5. GLOBUS and other libraries: –cog-jglobus.jar –classad.jar –commons-discovery jar –commons-logging-api-1.1.jar –log4j jar W A R N I N G Make sure all the listed jar(s) are included in your CLASSPATH environment variable !! Installation guide API JAVA /2

Warning!! All the needed gLite packages can be found here All the needed external packages can be found here Installation guide API JAVA /3

The JDL to be matched must contains some mandatory Requirements and Rank attributes; –when using command line interface these are added by default by the UI, but in our case user has to take care to check if his/her JDL file contains them: Requirements = (other.GlueCEStateStatus == "Production"); Rank = (-other.GlueCEStateEstimatedResponseTime); Basic Requirement

The main Java class of this API is: org.glite.wms.wmproxy.WMProxyAPI; A client object can be created using one of these following constructor(s): public WMProxyAPI(String url, String proxyFile) public WMProxyAPI(String url, String proxyFile, String CAcerts) public WMProxyAPI(String url, InputStream proxyStream) public WMProxyAPI(String url, InputStream proxyStream, String CAcerts) org.glite.wms.wmproxy.WMProxyAPI

where: –url: the WMProxy server URL to be contacted (e.g. : /glite_wms_wmproxy_server); –proxyFile: the pathname to a valid user proxy; for the default value (/tmp/x509up_u ) –CAcerts: the path of a local CA directory –proxyStream: a valid proxy passed as input stream;

Therefore, using one of the four constructors WMProxyAPI Client = new WMProxyAPI( … ); a new instance is created. This instance will be created to invoke any other WMProxy services. For example: WMProxyAPI Client = new WMProxyAPI( 01.ct.infn.it:7443/glite_wms_wmproxy_server, “/tmp/x509up_u504”);

In case of failure, one of the following exceptions is thrown: org.glite.wms.wmproxy.AuthenticationFaultType org.glite.wms.wmproxy.JobUnknownFaultType org.glite.wms.wmproxy.AuthorizationFaultType org.glite.wms.wmproxy.NoSuitableResourcesFaultType org.glite.wms.wmproxy.GetQuotaManagementFaultType org.glite.wms.wmproxy.ProxyFileException org.glite.wms.wmproxy.GrstDelegationException org.glite.wms.wmproxy.GenericFaultType org.gridsite.

Before calling submission or list match services, client proxy credentials are requested to be transferred from the client to the server through a delegation process. The following Java code performs this delegation process: The obtained delegation identifier can be reused for several calls to the WMProxy server; Delegation of user credential

The following Java code submits a job and returns a JobID Submit a job to WMProxy

Submission of simple jobs, DAGs, collections and parametric jobs to the WMProxy service requires as input a job description file in which job characteristics and requirements are expressed by means of Condor class-ad-like expressions. In this description the users can specify some files that are needed by the submitted jobs during the execution on the remote Computing Elements. These files are listed in the JDL InputSandbox attribute specifying for each of them the complete URI of its location. If the job does NOT have any file in the InputSandbox to be transferred from the submitting machine to the WMProxy node, the submission can be performed also calling the jobSubmit service: jobId = client.jobSubmit(jdlString, delegationID); Difference between submission and registration /1

Otherwise, these following steps are needed: a preliminary server registration: jobId = client.jobRegister(jdlString, delegationID); transfer of files in the InputSandbox from the client machine to the WMS node; call the jobStart service to trigger the submission: client.jobStart(jobId); Difference between submission and registration /2

In order to allow grid user to invoke, within Java code, the UrlCopy class to copy files from the WMS Server to the UI and vice versa the following Java package is requested cog-jglobus-1.4-bin.tar.gz The above package, with all the needed documentation, can be downloaded from this web page Software Requirements

Executable = "/bin/sh"; Arguments = "start_hostname.sh"; StdOutput = "hostname.out"; StdError = "hostname.err"; InputSandbox = {"start_hostname.sh"}; OutputSandbox = {"hostname.err","hostname.out"}; Requirements = (other.GlueCEStateStatus == “Production”); Rank = (-other.GlueCEStateEstimatedResponseTime); RetryCount = 3; #!/bin/sh sleep 5 hostname -f hostname.jdl start_hostname.sh

$ java WMProxyGetProxyAndSubmit \ \ hostname.jdl start_hostname.sh | grep -v "ERROR" Connecting to the service ====================== glite-wms-job-submission Success ====================== The job has been successfully submitted to the WMProxy Your job identifier is: =============================================================================== Submit a new request to WMProxy /1 Usage : java WMProxyGetProxyAndSubmit -h[elp] java WMProxyGetProxyAndSubmit [ ] where:... the entry point of the WMProxy Server to contact (e.g. : (e.g. : the jdl file to submit to the grid... The list of file(s) to transfer

The script, thanks to the UrlCopy Class, performs the copy of the InputSandbox files to the reduced path of the WMS as you can see: cd /var/glite/SandboxDir/P-/ ll https_3a_2f_2fgilda-wms-01.ct.infn.it_3a9000_2fP-H1wp0RpTnos2qGyQ2ETQ/input/ -rwxrwxr-x 1 gilda001 glite 30 Jan 11 09:05 start_hostname.sh Submit a new request to WMProxy /2

When the job finishs you can retrieve the output file(s) as follow: $ java WMProxyGetOutputAndPurge \ \ \ \ $PWD/ | grep -v "ERROR" Connecting to the service ====================== glite-wms-job-output Success ====================== JOB GET OUTPUT OUTCOME Output sandbox files for the job: have been successfully retrieved and stored in the directory: /home/larocca/Api-Java-WMProxy/ =========================================================================== Retrieve output file(s)

The following Java code cancels a list of jobIDs Cancelling a job

A job can be canceled before it ends using the following Java class: $ java WMProxyCancelJobs \ \ \ | grep -v "ERROR" Connecting to the service ======================== glite-wms-job-cancel Success ============================= The cancellation request has been successfully submitted for the following job(s): - ==================================================================================== Cancelling a job

The following Java code returns a list of CEs available for job submission Listing CE ID(s) that match a job

It is possible to see which CEs are eligible to run a job described by a given JDL using the following Java API: $ java WMProxyGetProxyAndListMatch \ \ hostname.jdl start_hostname.sh | grep -v "ERROR" Connecting to the service COMPUTING ELEMENT IDs LIST ========================================================================== The following CE(s) matching your job requirements have been found: - gilda-01.pd.infn.it:2119/jobmanager-lcgpbs-gilda - gn0.hpcc.sztaki.hu:2119/jobmanager-lcgpbs-gilda - grid010.ct.infn.it:2119/jobmanager-lcgpbs-infinite - grid010.ct.infn.it:2119/jobmanager-lcgpbs-long - grid010.ct.infn.it:2119/jobmanager-lcgpbs-short - grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-gilda - iceage-ce-01.ct.infn.it:2119/jobmanager-lcgpbs-infinite - iceage-ce-01.ct.infn.it:2119/jobmanager-lcgpbs-long - iceage-ce-01.ct.infn.it:2119/jobmanager-lcgpbs-short - ce.hpc.iit.bme.hu:2119/jobmanager-lcgpbs-gilda ========================================================================== Listing CE ID(s) that match a job

Java API Documentation

References Datamat – WMProxy quickstart ProxyClient.QuickStart JDL Attributes guide for WMProxy WMProxy user guide GILDA wiki

Hands-on Connect to the training infrastructure using the information reported in the tutorial sheet Run the hands-on available in this web link: Enjoy! $ cd ${HOME}/Api-Java-WMProxy To compile Java code run: $ source wmproxy.sh Submit and collect results with the two Java classes: WMProxyGetProxyAndSubmit WMProxyGetOutputAndPurge