The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci

Slides:



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

EU 2nd Year Review – Jan – Title – n° 1 WP1 Speaker name (Speaker function and WP ) Presentation address e.g.
Job Submission The European DataGrid Project Team
Development of test suites for the certification of EGEE-II Grid middleware Task 2: The development of testing procedures focused on special details of.
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.
GLite L. Stepanova1 Luidmila Stepanova Dubna, Jul 4, 2008 WMProxy Python API tests.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Special Jobs Matias Zabaljauregui UNLP.
Elisabetta Ronchieri - How To Use The UI command line - 10/29/01 - n° 1 How To Use The UI command line Elisabetta Ronchieri by WP1 elisabetta.ronchieri.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.
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
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-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.
Communicating Security Assertions over the GridFTP Control Channel Rajkumar Kettimuthu 1,2, Liu Wantao 3,4, Frank Siebenlist 1,2 and Ian Foster 1,2,3 1.
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,
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.
E-infrastructure shared between Europe and Latin America 1 Workload Management System-WMS Luciano Diaz Universidad Nacional Autónoma de México - UNAM Mexico.
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.
FESR Consorzio COMETA - Progetto PI2S2 WMS - Scripting techniques Fabio Scibilia INFN – Catania, Italy Tutorial per utenti e sviluppo.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Alexandre Duarte CERN IT-GD-OPS UFCG LSD 1st EELA Grid School.
INFSO-RI Enabling Grids for E-sciencE Job Submission Tutorial (material from INFN Catania)
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-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.
User Interface UI TP: UI User Interface installation & configuration.
INFSO-RI Enabling Grids for E-sciencE Flexible Job Submission Using Web Services: The gLite WMProxy Experience Giuseppe Avellino.
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.
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.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Grid Introduction Salma Saber Electronic.
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
Advanced Topics: MPI jobs
Workload Management System on gLite middleware
Special jobs with the gLite WMS
gLite Advanced Job Management
Corso di Calcolo Parallelo Grid Computing
EGEE tutorial, Job Description Language - more control over your Job Assaf Gottlieb Tel-Aviv University EGEE is a project.
Alexandre Duarte CERN Fifth EELA Tutorial Santiago, 06/09-07/09,2006
Workload Management System
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)
Presentation transcript:

The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci INFN Dept. of Catania Joint EPIKH/GISELA Application Porting School Mexico City,

Outline Mexico City, (Mexico) - Joint EPiKH/GISELA School, WMProxy Python API WMProxy C++ API References

WMProxy Python API Mexico City, (Mexico) - Joint EPiKH/GISELA School, Requirements: glite-wms-wmproxy-api-python package In your job submission script, you have to use: from wmproxymethods import Wmproxy from wmproxymethods import JobIdStruct

Delegation Mexico City, (Mexico) - Joint EPiKH/GISELA School, Due to problem with the wms-proxy-delegation API, we had to issue: os.system("/opt/glite/bin/glite-wms-job- delegate-proxy --endpoint er -o wms_proxy --noint -d NAMEOFDELEGATIONID") We have to use the NAMEOFDELAGATIONID to submit a job Then we created a client object via: url= _server client=Wmproxy(url)

Job Submission (1/2) Mexico City, (Mexico) - Joint EPiKH/GISELA School, Declare your JDL: jobjdl="[ requirements = other.GlueCEUniqueID == \""+ii+"\"; RetryCount = 0; JobType = \"parametric\"; Parameters="+str(bulkjobs)+“; ParameterStart=1; ParameterStep=1; Executable=\"salute_field.sh\"; InputSandbox={\"gsiftp://se001.ipp.acad.bg:2811/ pnfs/ipp.acad.bg/seegrid/salute_field.sh\"}; OutputSandbox = {\"std.out\",\"std.err\"}; StdOutput=\"std.out\“; StdError=\"std.err\“; VirtualOrganisation = \"seegrid\“; rank = 1; ]"

Job Submission (2/2) Mexico City, (Mexico) - Joint EPiKH/GISELA School, Register the Job using your delegation and the jobjdl just defined: delegationId = “NAMEOFDELEGATIONID” jobId = client.jobRegister(jobjdl,delegationId) Transfer InputSandbox file to destURI (WMS or Storage Element) (e.g. using GridFTP); Start the Job using the jobId returned by the client.jobRegister function: client.jobStart(jobId)

Get the JobID Mexico City, (Mexico) - Joint EPiKH/GISELA School, You can obtain the jobId string as: jobIdstringform=jobId.getJobId() print jobIdstringform For parametric/collection/DAG jobs: children=jobIds.getChildren() childrenjobs=[] for i in children: childrenjobs.append(i.jobid) print i.jobid

Check the job status and get the output Mexico City, (Mexico) - Joint EPiKH/GISELA School, You can check the job status using the standard gLite Command. WMProxy Python API doesn’t provide a function to check the Job Status. When the Job is DONE, you can download the output files: OutputFileList = getOutputFileList(jobId) This operation returns the list of URIs where the output files created during job execution have been stored in the WMS managed space and the corresponding sizes in bytes.

WMProxy C++ API Mexico City, (Mexico) - Joint EPiKH/GISELA School, Requirements: glite-wms-wmproxy-api-cpp-x.y package The interface is defined in $GLITE_LOCATION/include/glite/wms/wmproxyapi /wmproxy_api.h, so this file must be included always. Other useful methods are defined in $GLITE_LOCATION/include/glite/wms/wmproxyapi /wmproxy_api_utilities.h, its inclusion is so recommended.

Establishing context Mexico City, (Mexico) - Joint EPiKH/GISELA School, Before any call to WM proxy is made, an instance of Config Context has to be created. The first and third parameters are also strings, and could be used to set different paths for the user proxy used to authenticate connection and for the directory of trusted certificates, but if you wish to use the default values, these can be left empty. ConfigContext cfg (""," 01.ct.infn.it:7443/glite_wms_wmproxy_server",""); Second parameter is the WMProxy endpoint; it is suggested not to hardcode it, as shown above, but to pass it either from command line or through an environment variable.

User Credential Delegation Mexico City, (Mexico) - Joint EPiKH/GISELA School, string delId = "myId"; string proxy = grstGetProxyReq(delId, &cfg); // Creates a delegation identifier for proxy grstPutProxy(delId,proxy,&cfg); // binds the delegation identifier created with proxy The obtained delegation identifier can be reused for several calls to WM proxy services; The JDL to be matched against resources or to be submitted must contain some mandatory Requirements and Rank attributes; when using command line client these are added by default, but if using custom clients, as, here, you must care they are present. requirements = (other.GlueCEStateStatus=="Production"); rank = (-other.GlueCEStateEstimatedResponseTime);

Job List Match Mexico City, (Mexico) - Joint EPiKH/GISELA School, jobListMatch calls returns a list of Computing Elements fitting job requirements as described in the JDL provided in input. The JDL must be converted first to ClassAd format, and then parsed as a string. With such parameters properly initialized jobListMatch service can be invoked. string jdlPath=argv[argc -1]; // get the filesystem path to jdl-file from CLI jdl::Ad ad; // declare a new ClassAd ad.fromFile (jdlPath); // initialize the ClassAd with file content string jdlString (ad.toString()); // convert AD to String and save it in jdlString /* call jobListMatch */ vector > matchingCEs = jobListMatch(jdlString, delegationId, &cfg);

Job Submission (1/2) Mexico City, (Mexico) - Joint EPiKH/GISELA School, Job submission through API can be divided in three steps: job registration; input sandbox file(s) transfer; job start. The Job Registration is a preliminary step, where WM proxy server is contacted, the job registered and if operation succeeds, a job identifier is returned: JobIdApi jobId = jobRegister(jdlString, delegationId, &cfg); The job id is returned on a struct of type JobIdApi containing also other useful infos on the request. For example, if the jdl expresses a compound job as DAG or Collection, JobIdApi contains the Node Name and the list of job IDs contained in the request.

Job Submission (2/2) Mexico City, (Mexico) - Joint EPiKH/GISELA School, After job registration, it needs to be checked whether the file has Input Sandbox or not. If not, you can easily proceed by invoking jobStart method which triggers job execution from WM Proxy server. jobStart(jobId.jobid, &cfg);

Upload the InputSandbox Mexico City, (Mexico) - Joint EPiKH/GISELA School, This method takes as input the source paths of file, and the destination URI, and it's here provided within library libglite_wmproxytest_utils.so. if (ad->hasAttribute(jdl::JDL::INPUTSB)){ vector dest_uris; vector > to_bcopied; string errors; // get local paths to transferring file vector paths = ad->getStringValue (jdl::JDL::INPUTSB); // from JobID obtain the destination bare URI where to copy files. The //vector returned has an element for each supported protocol, used is the //second (https) dest_uris = getSandboxDestURI(jobId.jobid, &cfg); // fill in a vector with all pairs source-destination jdl::toBcopied(jdl::JDL::INPUTSB, paths, to_bcopied,dest_uris[1],""); // perform file transfer if (curlTransfer (to_bcopied, errors,&cfg) < 0) { jobCancel(jobId.jobid, &cfg); exit(-1); }

References Mexico City, (Mexico) - Joint EPiKH/GISELA School, WMProxy Python API: wm/api_docwmproxy_python/wmproxymethods.htmlhttp://egee-jra1-wm.mi.infn.it/egee-jra1- wm/api_docwmproxy_python/wmproxymethods.html WMProxy API C++: wm/api_doc/api_docwmproxy_cpp/index.htmlhttp://egee-jra1-wm.mi.infn.it/egee-jra1- wm/api_doc/api_docwmproxy_cpp/index.html WMProxy API Samples and Utilities: wmproxy-api-examples.tar.gz WMProxy API Wiki: MProxyAPI.APIDocumentation

Mexico City, (Mexico) - Joint EPiKH/GISELA School, Thank you very much!