Www.see-grid-sci.eu SEE-GRID-SCI The SEE-GRID-SCI initiative is co-funded by the European Commission under the FP7 Research Infrastructures contract no.

Slides:



Advertisements
Similar presentations
EGEE is a project funded by the European Union under contract IST EGEE Tutorial Turin, January Hands on Job Services.
Advertisements

INFSO-RI Enabling Grids for E-sciencE Workload Management System and Job Description Language.
SEE-GRID-SCI User Interface (UI) Installation and Configuration Branimir Ackovic Institute of Physics Serbia The SEE-GRID-SCI.
SEE-GRID-SCI Hands-On Session: Workload Management System (WMS) Installation and Configuration Dusan Vudragovic Institute of Physics.
INFSO-RI Enabling Grids for E-sciencE EGEE Middleware The Resource Broker EGEE project members.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Grid Services Abderrahman El Kharrim
Special Jobs Claudio Cherubino INFN - Catania. 2 MPI jobs on gLite DAG Job Collection Parametric jobs Outline.
Basic Grid Job Submission Alessandra Forti 28 March 2006.
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.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci
The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals GILDA Tutors INFN Catania ICTP/INFM-Democritos Workshop on Porting Scientific.
INFSO-RI Enabling Grids for E-sciencE Logging and Bookkeeping and Job Provenance Services Ludek Matyska (CESNET) on behalf of the.
Enabling Grids for E-sciencE Workload Management System on gLite middleware Matthieu Reichstadt CNRS/IN2P3 ACGRID School, Hanoi (Vietnam)
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Workload Management System + Logging&Bookkeeping Installation.
Nadia LAJILI User Interface User Interface 4 Février 2002.
INFSO-RI Enabling Grids for E-sciencE Workload Management System Mike Mineter
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) GISELA Additional Services Diego Scardaci
Group 1 : Grid Computing Laboratory of Information Technology Supervisors: Alexander Ujhinsky Nikolay Kutovskiy.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Using gLite API Vladimir Dimitrov IPP-BAS “gLite middleware Application Developers.
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.
Programming API(s) for gLite services Giuseppe LA ROCCA INFN Catania Joint EGEE and SEE-GRID Summer.
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.
1 Grid2Win: porting of gLite middleware to Windows Dario Russo INFN Catania
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.
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.
1 DIRAC Job submission A.Tsaregorodtsev, CPPM, Marseille LHCb-ATLAS GANGA Workshop, 21 April 2004.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMPROXY usage Álvaro Fernández IFIC (CSIC)
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid2Win : gLite for Microsoft Windows Roberto.
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 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.
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.
EGEE 3 rd conference - Athens – 20/04/2005 CREAM JDL vs JSDL Massimo Sgaravatto INFN - Padova.
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.
Consorzio COMETA - Progetto PI2S2 UNIONE EUROPEA Grid2Win : gLite for Microsoft Windows Elisa Ingrà - INFN.
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.
Introduction to Computing Element HsiKai Wang Academia Sinica Grid Computing Center, Taiwan.
Enabling Grids for E-sciencE Work Load Management & Simple Job Submission Practical Shu-Ting Liao APROC, ASGC EGEE Tutorial.
SEE-GRID-SCI WRF-ARW model: Grid usage The SEE-GRID-SCI initiative is co-funded by the European Commission under the FP7 Research Infrastructures.
FESR Trinacria Grid Virtual Laboratory Practical using WMProxy advanced job submission Emidio Giorgio INFN Catania.
Practical using C++ WMProxy API advanced job submission
Grid2Win Porting of gLite middleware to Windows XP platform
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
Certificates Usage and Simple Job Submission
Certificates Usage and Simple Job Submission
EGEE Middleware: gLite Information Systems (IS)
gLite Job Management Christos Theodosiou
Job Description Language
Job Description Language (JDL)
Job Submission M. Jouvin (LAL-Orsay)
Presentation transcript:

SEE-GRID-SCI The SEE-GRID-SCI initiative is co-funded by the European Commission under the FP7 Research Infrastructures contract no Grid programming basics Branko Marovic RCUB - UoB Meteo VO Training, Belgrade June 2008

Application Gridification2/27 Software/Job Management Software installation management using ESM tools Experiment Software Installation in LCG-2  ion SEEGRID Wiki “SEE-GRID ESM Software Installation Guide”  GRID_ESM_Software_Installation_Guide  Site configuration  Using ESM tools  Example JDL and shell scripts for installation, validation, and removal Job management EDG WMS API (LCG-2) – C++ & Java  api-index.html Exec/spawn of shell scripts that create and submit JDL – simple, but no direct feedback on jobs gLite  index.shtml

Application Gridification3/27 WMProxy Java API ver Overview of the WMProxy Java API  Software Requirements  Class org.glite.wms.wmproxy.WMProxyAPI  An use case

Application Gridification4/27 Workload Management System Helps the user accessing computing resources  resource brokering  management of input and output  management of complex workflows Support for MPI job even if the file system is not shared between CE and Worker Nodes (WN) – easy JDL extensions Web Service interface via WMProxy

Application Gridification5/27 WMProxy WMProxy is a SOAP Web service providing access to the Workload Management System (WMS) Job characteristics specified via JDL  jobRegister  create id  map to local user and create job dir  register to L&B  return id to user  input files transfer  jobStart  register sub-jobs to L&B  map to local user and create sub-job dirs  unpack sub-job files  deliver jobs to WM

Application Gridification6/27 The WMProxy The WMProxy is the service responsible to provide access to the WMS functionality through a Web Service Interface The gLite WMProxy Server can be either accessed directly through the published WSDL, the C++ command line interface, or the API In these two links you can find a guide about how to interact with the main services exposed by the WMProxy through the provided API Java and C++ API

Application Gridification7/27 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.) Install needed rpm(s) following versions:  take the rpm(s) as usual from S

Application Gridification8/27 Installation guide API JAVA /2 Axis ( where the needed jars available are: axis-ant.jar axis.jar jaxrpc.jar commons-discovery-0.2.jar commons-logging jar log4j jar log4j.properties saaj.jar wsdl4j jar dcache-client i586.rpm

Application Gridification9/27 Installation guide API JAVA /3 BouncyCastle ( where the needed jar is: bcprov-jdk jar glite-essentials-java _EGEE W A R N I N G Make sure all the listed jar(s) are included in your CLASSPATH environment variable !!

Application Gridification10/27 Installation guide API JAVA /4 2.) Install the following component(s) from the latest gLite release ( glite-security-test-utils glite-security-util-java glite-security-delegation-java glite-security-trustmanager glite-wms-wmproxy-api-java

Application Gridification11/27 Verify that your User Interface (UI) or workstation contains the following rpm package(s): glite-wms-wmproxy-api-java _N noarch.rpm glite-wms-ui-api-java _N i386.rpm glite-security-util-java _N noarch.rpm glite-security-trustmanager _N noarch.rpm glite-security-delegation-java _N noarch.rpm If these rpm package(s) are not installed you can downloaded them from this web page Software Requirements /1

Application Gridification12/27 Download and extract, from here the two tarball : glite-jdl-api-java-3.1.1_bin.tar.gz glite-wms-wmproxy-api-java-3.1.0_src.tar.gz Software Requirements /2

Application Gridification13/27 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-api-java

Application Gridification14/27 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; org.glite.wms.wmproxy-api-java

Application Gridification15/27 org.glite.wms.wmproxy-api-java 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( “ ”, “ /x509up_u504 ” ); proxy = client.grstGetProxyReq (delegationID); client.grstPutProxy(delegationID, proxy); jobIDs = client.jobSubmit(jdlString, delegationID);

Application Gridification16/27 org.glite.wms.wmproxy-api-java 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.InvalidArgumentFaultType 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.

Application Gridification17/27 Basic Requirements 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);

Application Gridification18/27 Authorization The client must be properly authorized when interacts with the WMProxy service.  This means that either the FQAN or the DN (in case of globus-style proxies) of the client must be properly listed and authorized in the glite_wms_wmproxy.gacl file on the WMProxy machine. etc]# cat glite_wms_wmproxy.gacl bio/Role=NULL

Application Gridification19/27 Delegation of user credential 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 : String delegationId = “ larocca ” ; WMProxyAPI client = new WMProxyAPI wmproxy_url,user_proxy,CAcertsPath); /*Get a proxy identified by the delegationID String*/ proxy = client.grstGetProxyReq (delegationId); /* Allows delegating user ’ s credential to the WMProxy */ client.grstPutProxy(delegationId, proxy); The obtained delegation identifier can be reused for several calls to the WMProxy server;

Application Gridification20/27 Difference between submission and registration /1 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: jobIds = client.jobSubmit(jdlString, delegationId);

Application Gridification21/27 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

Application Gridification22/27 Software Requirements /3 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

Application Gridification23/27 Sample Scripts 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

Application Gridification24/27 Submit a new request to WMProxy java WMProxyGetProxyAndSubmit WMProxyGetProxyAndSubmit.java "A simple client to interact with the WMProxy Server." Author: Giuseppe La Rocca I.N.F.N. - Sez. of Catania - ITALY Via S.Sofia, Catania Phone: Usage : java WMProxyGetProxyAndSubmit -h[elp] java WMProxyGetProxyAndSubmit [CAs paths (optional)] where:... the file containing the user's credentials... the string used to save the user's delegation... the entry point of the WMProxy Server to contact (e.g. : The list of file(s) to transfer to the WMProxy Server... the jdl file to submit to the grid... the path location of the directory containing all the Certificate Authorities files Contacting... with the proxy.. /tmp/x509up_u512 Your job has been successfully submitted. jobID = [ ]

Application Gridification25/27 String jobID_String = (String) jobID.getId(); InputSandboxURI = client.getSandboxDestURI(jobID_String, "gsiftp"); //Convert listURI into a String. String[] reduced_path = InputSandboxURI.getItem(); // Creation of the "toURL" link to copy the file(s). int pos = (reduced_path[0]).indexOf("2811"); int length = (reduced_path[0]).length(); String front = (reduced_path[0]).substring(0, pos); String rear = (reduced_path[0]).substring(pos + 4, length); for (int index = 0; index < InputSandboxFiles.length; index++) { String toURL = front + “ 2811 ” + rear; toURL = toURL + "/" + InputSandboxFiles[index]; fromURL = "file:///" + InputSandboxFiles[index]; try { GlobusURL from = new GlobusURL(fromURL); GlobusURL to = new GlobusURL(toURL); UrlCopy uCopy = new UrlCopy(); uCopy.setDestinationUrl(to); uCopy.setSourceUrl(from); uCopy.setUseThirdPartyCopy(true); uCopy.copy(); } catch (Exception e) {System.err.println(e.getMessage());} } UrlCopy class performs the copy of the InputSandbox files to the WMS Copy file(s) from the UI to the Resource Broker Specify the Destination and Source URL(s) Submit a new request to WMProxy

Application Gridification26/27 Retrieve output file(s) With the job finishs you can retrieve the output file(s) as follow: java WMProxyGetOutputAndPurge Usage : java WMProxyGetOutputAndPurge -h[elp] java WMProxyGetOutputAndPurge [CAs paths (optional)] WMProxy URL = [ proxyFile = [/tmp/x509up_u512] JobID = [ dirPath = [/home/larocca/API/] CA certs = [/etc/grid-security/certificates/] Start downloading output file(s).. file n name = [gsiftp://glite-rb2.ct.infn.it:2811/var/glite/SandboxDir/XA/https_3a_2f_2fglite- rb2.ct.infn.it_3a9000_2fXAoY7FZgLJjgCp4U9grsBw/output/hostname.err] size = [0] file n name = [gsiftp://glite-rb2.ct.infn.it:2811/var/glite/SandboxDir/XA/https_3a_2f_2fglite- rb2.ct.infn.it_3a9000_2fXAoY7FZgLJjgCp4U9grsBw/output/hostname.out] size = [28] List of file(s) retrieved from to the Resource Broker to the user’s account

Application Gridification27/27 Retrieve output file(s) //Use the "gsiftp" transfer protocols to retrieve the list of files produced by the jobs. result = client.getOutputFileList(jobId, "gsiftp"); if ( result != null ) { // list of files+their size list = (StringAndLongType[ ]) result.getFile(); size = list.length; if (list != null) { for (int i=0; i<size ; i++){ // Creation of the "fromURL" link from where download the file(s). int pos = (list[i].getName()).indexOf("2811"); String front = (list[i].getName()).substring(0, pos); String rear = (list[i].getName()).substring(pos + 4, (list[i].getName()).length()); String fromURL = front + "2811/" + rear; int pos_output = (list[i].getName()).indexOf("output"); String filename = (list[i].getName()).substring(pos_output + 7, length); // Creation of the "toURL" link where to download the file(s). toURL = toURL = "file:///" + dirPath + filename; try { // Retrieve the file(s) from the WMProxy Server. GlobusURL from = new GlobusURL(fromURL); GlobusURL to = new GlobusURL(toURL); UrlCopy uCopy = new UrlCopy(); uCopy.setDestinationUrl(to); uCopy.setSourceUrl(from); uCopy.setUseThirdPartyCopy(true); uCopy.copy(); } catch (Exception e) {System.err.println(e.getMessage());} } } else System.out.println ("No output files for this job!"); } else System.out.println ("An empty list has been received"); // Purge output file(s) from the WMProxy Server. client.jobPurge(jobId);

Application Gridification28/27 References API Documentation Datamat – WMProxy quickstart nt.QuickStart JDL Attributes guide for WMProxy WMProxy user guide