EGEE-III INFSO-RI-222667 Enabling Grids for E-sciencE www.eu-egee.org EGEE and gLite are registered trademarks Programming with the DRMAA OGF Standard.

Slides:



Advertisements
Similar presentations
Lecture 3 Some commonly used C programming tricks. The system command Project No. 1: A warm-up project.
Advertisements

Experiences with GridWay on CRO NGI infrastructure / EGEE User Forum 2009 Experiences with GridWay on CRO NGI infrastructure Emir Imamagic, Srce EGEE User.
CS Lecture 4 Programming with Posix Threads and Java Threads George Mason University Fall 2009.
Chapter 7 Process Environment Chien-Chung Shen CIS, UD
Massive Ray Tracing in Fusion Plasmas on EGEE J.L. Vázquez-Poletti, E. Huedo, R.S. Montero and I.M. Llorente Distributed Systems Architecture Group Universidad.
POSIX: Files Introduction to Operating Systems: Discussion 1 Read Solaris System Interface Guide: Ch. 5.1 Basic File I/O.
INFSO-RI Enabling Grids for E-sciencE Financial Status EGEE Collaboration Board – Athens – April 20 th, Severine Bergerot.
© iPerimeter Ltd Unix and IBM i  AIX and Linux run natively on Power Systems  IBM i can do Unix type things in two ways:  Posix/QShell  Ordinary.
Advanced UNIX progamming Fall 2002 Instructor: Ashok Srinivasan Lecture 5 Acknowledgements: The syllabus and power point presentations are modified versions.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.
3-2.1 Topics Grid Computing Meta-schedulers –Condor-G –Gridway Distributed Resource Management Application (DRMAA) © 2010 B. Wilkinson/Clayton Ferner.
Chapter 0.2 – Pointers and Memory. Type Specifiers  const  may be initialised but not used in any subsequent assignment  common and useful  volatile.
Stuart Wakefield Imperial College London Evolution of BOSS, a tool for job submission and tracking W. Bacchi, G. Codispoti, C. Grandi, INFN Bologna D.
Enabling Grids for E-sciencE EGEE-II INFSO-RI Practical: Porting applications to the GILDA grid Slides from Vladimir Dimitrov, IPP-BAS.
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 EGEE and gLite are registered trademarks S. Natarajan (CSU) C. Martín (UCM) J.L.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks, An Overview of the GridWay Metascheduler.
EGEE-III INFSO-RI Enabling Grids for E-sciencE Nov. 18, EGEE and gLite are registered trademarks gLite Middleware Usage Dusan.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMSMonitor: a tool to monitor gLite WMS/LB.
The GridWay Metascheduler Constantino Vázquez and Eduardo Huedo dsa-research.org Open Grid Forum 22 Boston, February 27, 2008.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks SA2 Quality Plan for EGEE III Geneviève.
Enabling Grids for E- sciencE EGEE and gLite are registered trademarks EGEE-III INFSO-RI Analysis of Overhead and waiting times.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks, Novelties and Features around the GridWay.
Copyright 2005, The Ohio State University 1 Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks VOMS SAML Vincenzo Ciaschini MWSG Zurich,
INFSO-RI Enabling Grids for E-sciencE Workflows in Fusion applications José Luis Vázquez-Poletti Universidad.
Enabling Grids for E-sciencE EGEE-III INFSO-RI EGEE Training Follow-on survey 2009 Conducted on past EGEE training course participants 120 respondents.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Design of an Expert System for Enhancing.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid Web Portal for Chemists M. Sterzel,
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Submission, Monitoring and Control of Jobs.
INFSO-RI Enabling Grids for E-sciencE Ganga 4 – The Ganga Evolution Andrew Maier.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks DSA1.4 – Objectives and Status Ioannis Liabotis.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks PASSTORE: safe certs & password management.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks PSNC – status presentation Rafał Lichwała,
An Introduction to MPI (message passing interface)
Process Management Azzam Mourad COEN 346.
 2008 Pearson Education, Inc. All rights reserved. 1 Arrays and Vectors.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks NA3 – Procedures for Training Event Robin.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Christos Kanellopoulos Activity Manager.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks New Authorization Service Christoph Witzig,
Variables and memory addresses
INFSO-RI Enabling Grids for E-sciencE Pan Compiler C. Loomis (LAL-Orsay) Quattor Workshop (Madrid) October 2007.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks John Gordon SA1 Face to Face CERN, June.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks User traceability and log analysis tools.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Computational chemistry with ECCE on EGEE.
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals Giuseppe La Rocca INFN – Catania gLite Tutorial at the EGEE User Forum CERN.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks C. Martín, A. Lorca (UCM) Introduction to.
INFSO-RI Enabling Grids for E-sciencE gLite C++ Configurator Practical experience gLite Configuration Meeting, March 1, 2005 Peter.
EGEE-II INFSO-RI Enabling Grids for E-sciencE P-GRADE overview and introduction: workflows & parameter sweeps (Advanced features)
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks CharonGUI A Graphical Frontend on top of.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Regional Nagios Emir Imamagic /SRCE EGEE’09,
C is a high level language (HLL)
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Interfacing gLite services with the Kepler.
INFSO-RI Enabling Grids for E-sciencE Ganga 4 Technical Overview Jakub T. Moscicki, CERN.
Enabling Grids for E-sciencE EGEE-III INFSO-RI Workflow management tool for Earth science applications Ladislav Hluchy, Viet Tran Institute of Informatics.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Application Porting Support Gergely Sipos,
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Mining Job Monitoring Data Automatic Error.
1 An unattended, fault-tolerant approach for the execution of distributed applications Manuel Rodríguez-Pascual, Rafael Mayo-García CIEMAT Madrid, Spain.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Astrophysical Cluster Session Claudio Vuerli,
Operating Systems and Middleware Group Hasso – Plattner – Institute, University of Potsdam, Germany DRMAA 1.0.NET Language Mapping Dipl. Inf. Peter Tröger.
Chapter 7 Process Environment Chien-Chung Shen CIS/UD
GGF10 DRMAA Working Group Hrabri Rajic Intel GGF10 Berlin, Germany March, 2004 GLOBALGRIDFORUM.ORG.
Enabling Grids for E-sciencE Work Load Management & Simple Job Submission Practical Shu-Ting Liao APROC, ASGC EGEE Tutorial.
GridWay Overview John-Paul Robinson University of Alabama at Birmingham SURAgrid All-Hands Meeting Washington, D.C. March 15, 2007.
Congreso Cuidad, Spain May 15, 2007 GridWay 1/27, Programming with the DRMAA OGF Standard GridWay Distributed Systems Architecture Group Universidad Complutense.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks MyEGEE David Horat (
Lesson One – Creating a thread
Advanced UNIX progamming
PTHREADS AND SEMAPHORES
Presentation transcript:

EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Programming with the DRMAA OGF Standard José Luis Vázquez-Poletti (UCM) Training the Trainers (CERN) June 2008

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Introduction  Distributed Resource Management Application API   Open Grid Forum Standard  Homogeneous interface to different Distributed Resource Managers (DRM):  SGE  Condor  PBS/Torque  GridWay  C  JAVA  Perl  Ruby  Python What is DRMAA?

Enabling Grids for E-sciencE EGEE-III INFSO-RI Introduction Application Profiles

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Program Structure and Compilation  Include the DRMAA library:  Verify the following environment variable (.bashrc):  Include the compiling and linking options for DRMAA:  Example: #include “drmaa.h” export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GW_LOCATION/lib/ -L $GW_LOCATION/lib -I $G_LOCATION/include -ldrmaa gcc example.c -L $GW_LOCATION/lib \ -I $GW_LOCATION/include -ldrmaa -o example

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI DRMAA Sessions and Template Creation Parameters: –contact: Must be NULL for GridWay –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE –DRMAA_ERRNO_INVALID_CONTACT_STRING –DRMAA_ERRNO_ALREADY_ACTIVE_SESSION Session Initialize int drmaa_init (const char *contact, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI DRMAA Sessions and Template Creation Parameters: –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_NO_ACTIVE_SESSION Other functions: –drmaa_get_contact - gives more information and uses the following:  drmaa_version  drmaa_get_DRM_system  drmaa_get_DRMAA_implementation Session Finalize int drmaa_exit (char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Parameters: –jt: Pointer to Job Template –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE –DRMAA_ERRNO_INVALID_CONTACT_STRING –DRMAA_ERRNO_ALREADY_ACTIVE_SESSION Job Template assignation int drmaa_allocate_job_template (drmaa_job_template_t **jt, char *error_diagnosis, size_t error_diag_len) Template Creation

Enabling Grids for E-sciencE EGEE-III INFSO-RI Template Creation Parameters: –jt: Pointer to Job Template –name: Attribute name –value: Attribute value –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INVALID_ARGUMENT –DRMAA_ERRNO_NO_MEMORY –DRMAA_ERRNO_NO_ACTIVE_SESSION Set scalar attribute int drmaa_set_attribute (drmaa_job_template_t *jt, const char *name, const char *value, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Template Creation Parameters: –jt: Pointer to Job Template –name: Attribute name –value: Attribute value –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INVALID_ARGUMENT –DRMAA_ERRNO_NO_MEMORY –DRMAA_ERRNO_NO_ACTIVE_SESSION Set vector attribute (i.e. string with executable arguments)‏ int drmaa_set_vector_attribute (drmaa_job_template_t *jt, const char *name, const char *value[], char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Submission Parameters: –jobid: Job ID assigned by GridWay –job_id_len: Job ID buffer size –jt: Pointer to Job Template –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INTERNAL_ERROR –DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE –DRMAA_ERRNO_TRY_LATER –DRMAA_ERRNO_NO_ACTIVE_SESSION Simple job submission int drmaa_run_job (char *job_id, size_t job_id_len, drmaa_job_template_t *jt, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Submission Parameters:  jobid: Job ID assigned by GridWay  job_id_out: Done Job ID  job_id_out_len: job_id_out buffer size  stat: job_id_out exit code  timeout: DRMAA_TIMEOUT_WAIT_FOREVER, DRMAA_TIMEOUT_NO_WAIT or n_seconds  rusage: Where remote resource usage values will be stored  error_diagnosis: Buffer where error will be stored  error_diag_len: Error buffer size Returns:  DRMAA_ERRNO_SUCCESS  DRMAA_ERRNO_INVALID_ARGUMENT  DRMAA_ERRNO_INVALID_JOB  DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE  DRMAA_ERRNO_NO_RUSAGE Wait for job execution int drmaa_wait (const char *job_id, char *job_id_out, size_t job_id_out_len, int *stat, signed long timeout, drmaa_attr_values_t **rusage, char *error_diagnosis, size_t error_diag_len)

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Submission Parameters: –exit_status: Where the exit code will be stored –stat: Status code of a done job –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_NO_ACTIVE_SESSION Get exit code int drmaa_wexitstatus (int *exit_status, int stat, char *error_diagnosis, size_t error_diag_len)

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Submission Parameters: –values: Value list –value: Actual value name –value_len: Actual value size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_INVALID_ARGUMENT –DRMAA_ERRNO_NO_ACTIVE_SESSION –DRMAA_ERRNO_NO_MORE_ELEMENTS NOTE: Values must be released with drmaa_release_attr_values Get remote use stats int drmaa_get_next_attr_name (drmaa_attr_names_t *values, char *value, size_t value_len‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Submission Parameters: –jt: Pointer to Job Template –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_NO_ACTIVE_SESSION Delete Job Template int drmaa_delete_job_template (drmaa_job_template_t *jt, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Status Control Parameters: –job_id: Job ID –remote_ps: Actual job status –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INTERNAL_ERROR –DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE –DRMAA_ERRNO_INVALID_JOB –DRMAA_ERRNO_NO_ACTIVE_SESSION Translation of remote_ps: –const char * drmaa_gw_status (int drmaa_state)‏ Get Job Status int drmaa_job_ps (const char *job_id, int *remote_ps, char *error_diagnosis, size_t error_diag_len)‏ remote_ps values:  DRMAA_PS_QUEUED_ACTIVE  DRMAA_PS_RUNNING  DRMAA_PS_USER_ON_HOLD  DRMAA_PS_DONE  DRMAA_PS_FAILED  DRMAA_PS_UNDETERMINED

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Status Control Parameters: –job_ids[]: Job ID list (ends with NULL)‏ –timeout: Max waiting time –dispose: Kill (1) or not (0) the job –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INVALID_ARGUMENT –DRMAA_ERRNO_INVALID_JOB –DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE –DRMAA_ERRNO_NO_ACTIVE_SESSION Wait Job Finalization int drmaa_synchronize (const char *job_ids[], signed long timeout, int dispose, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Status Control Parameters: –job_id: Job ID –action: Control signal –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns:  DRMAA_ERRNO_SUCCESS  DRMAA_ERRNO_INTERNAL_ERROR  DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE  DRMAA_ERRNO_NO_ACTIVE_SESSION  DRMAA_ERRNO_INVALID_ARGUMENT  DRMAA_ERRNO_INVALID_JOB  DRMAA_ERRNO_HOLD_INCONSISTENT_STATE  DRMAA_ERRNO_RELEASE_INCONSISTENT_STATE  DRMAA_ERRNO_RESUME_INCONSISTENT_STATE  DRMAA_ERRNO_SUSPEND_INCONSISTENT_STATE Set Job Control Signals int drmaa_control (const char *jobid, int action, char *error_diagnosis, size_t error_diag_len)‏ Actions:  DRMAA_CONTROL_SUSPEND  DRMAA_CONTROL_RESUME  DRMAA_CONTROL_TERMINATE  DRMAA_CONTROL_HOLD  DRMAA_CONTROL_RELEASE

Enabling Grids for E-sciencE EGEE-III INFSO-RI Contents 1.Introduction 2.Program Structure and Compilation 3.DRMAA Sessions 4.Template Creation 5.Job Submission 6.Job Status and Control 7.Job Arrays

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Arrays Parameters: –jobids: Vector where Job IDs will be stored –jt: Pointer to Job Template –start: First job index –end: Last job index –incr: Increment used for obtaining job total number (GridWay uses 1)‏ –error_diagnosis: Buffer where error will be stored –error_diag_len: Error buffer size Returns:  DRMAA_ERRNO_SUCCESS  DRMAA_ERRNO_INTERNAL_ERROR  DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE  DRMAA_ERRNO_TRY_LATER  DRMAA_ERRNO_NO_ACTIVE_SESSION  DRMAA_ERRNO_NO_MEMORY Submit Job Array int drmaa_run_bulk_jobs (drmaa_job_ids_t **jobids, drmaa_job_template_t *jt, int start, int end, int incr, char *error_diagnosis, size_t error_diag_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Job Arrays Parameters: –values: Job ID list –value: Actual Job ID –value_len: Actual Job ID size Returns: –DRMAA_ERRNO_SUCCESS –DRMAA_ERRNO_INVALID_ARGUMENT –DRMAA_ERRNO_NO_ACTIVE_SESSION –DRMAA_ERRNO_NO_MORE_ELEMENTS Obtain Next Job ID int drmaa_get_next_job_id (drmaa_job_ids_t *values, char *value, size_t value_len)‏

Enabling Grids for E-sciencE EGEE-III INFSO-RI Thank you for your attention!