Java standalone version

Slides:



Advertisements
Similar presentations
Building Portals to access Grid Middleware National Technical University of Athens Konstantinos Dolkas, On behalf of Andreas Menychtas.
Advertisements

INFSO-RI Enabling Grids for E-sciencE Workload Management System and Job Description Language.
MPI support in gLite Enol Fernández CSIC. EMI INFSO-RI CREAM/WMS MPI-Start MPI on the Grid Submission/Allocation – Definition of job characteristics.
FESR Consorzio COMETA - Progetto PI2S2 Using MPI to run parallel jobs on the Grid Marcello Iacono Manno Consorzio COMETA
DIRAC API DIRAC Project. Overview  DIRAC API  Why APIs are important?  Why advanced users prefer APIs?  How it is done?  What is local mode what.
The SAM-Grid Fabric Services Gabriele Garzoglio (for the SAM-Grid team) Computing Division Fermilab.
DIANE Overview Germán Carrera, Alfredo Solano (CNB/CSIC) EMBRACE COURSE Monday 19th of February to Friday 23th. CNB-CSIC Madrid.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Special Jobs Matias Zabaljauregui UNLP.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Hostname-portlet Template Riccardo Rotondo
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Tools and Utilities for parallel and serial codes in ENEA-GRID environment CRESCO Project: Salvatore Raia SubProject I.2 C.R. ENEA-Portici. 11/12/2007.
K. Harrison CERN, 20th April 2004 AJDL interface and LCG submission - Overview of AJDL - Using AJDL from Python - LCG submission.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) MPI Applications with the Grid Engine Riccardo Rotondo
Grid Computing I CONDOR.
:: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: :: GridKA School 2009 MPI on Grids 1 MPI On Grids September 3 rd, GridKA School 2009.
1 HeMoLab - Porting HeMoLab's SolverGP to EELA glite Grid Environment FINAL REPORT Ramon Gomes Costa - Paulo Ziemer.
Nadia LAJILI User Interface User Interface 4 Février 2002.
INFSO-RI Enabling Grids for E-sciencE Workload Management System Mike Mineter
E-science grid facility for Europe and Latin America E2GRIS1 Gustavo Miranda Teixeira Ricardo Silva Campos Laboratório de Fisiologia Computacional.
Java Portals and Portlets Submitted By: Rashi Chopra CIS 764 Fall 2007 Rashi Chopra.
E-science grid facility for Europe and Latin America Using Secure Storage Service inside the EELA-2 Infrastructure Diego Scardaci INFN (Italy)
Nguyen Tuan Anh. VN-Grid: Goals  Grid middleware (focus of this presentation)  Tuan Anh  Grid applications  Hoai.
Interactive Workflows Branislav Šimo, Ondrej Habala, Ladislav Hluchý Institute of Informatics, Slovak Academy of Sciences.
Satellital Image Clasification with neural networks Step implemented – Final Report Susana Arias, Héctor Gómez UNIVERSIDAD TÉCNICA PARTICULAR DE LOJA ECUADOR.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Development of e-Science Application Portal on GAP WeiLong Ueng Academia Sinica Grid Computing
INFSO-RI Enabling Grids for E-sciencE Charon Extension Layer. Modular environment for Grid jobs and applications management Jan.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Development of test suites for the certification of EGEE-II Grid middleware Task 2: The development of testing procedures focused on special details of.
E-infrastructure shared between Europe and Latin America FP6−2004−Infrastructures−6-SSA Special Jobs Valeria Ardizzone INFN - Catania.
3/12/2013Computer Engg, IIT(BHU)1 MPI-1. MESSAGE PASSING INTERFACE A message passing library specification Extended message-passing model Not a language.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Practical using WMProxy advanced job submission.
Cliff Addison University of Liverpool NW-GRID Training Event 26 th January 2007 SCore MPI Taking full advantage of GigE.
Tutorial on Science Gateways, Roma, Catania Science Gateway Framework Motivations, architecture, features Riccardo Rotondo.
Development of portlets for special jobs: parametric, collections, workflows Mario Torrisi National Institute of Nuclear Physics.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa Joint CHAIN/EUMEDGRID- Support/EPIKH School for.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Advanced Job Riccardo Rotondo
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
FESR Consorzio COMETA - Progetto PI2S2 Using MPI to run parallel jobs on the Grid Marcello Iacono Manno Consorzio Cometa
Development of portlets for special jobs: parametric, collections, workflows Mario Torrisi Istituto Nazionale di Fisica Nucleare.
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.
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.
Grid Engine Africa Joint CHAIN/EUMEDGRID-Support/EPIKH School for Application Porting to Science Gateways Elisa Ingrà – Consortium GARR
Stephen Childs Trinity College Dublin
MPI Applications with the Grid Engine
Advanced Topics: MPI jobs
INVESTIGATING A SCIENCE GATEWAY FOR AN AGENT-BASED
SparkBWA: Speeding Up the Alignment of High-Throughput DNA Sequencing Data - Aditi Thuse.
gLite MPI Job Amina KHEDIMI CERIST
Special jobs with the gLite WMS
Design rationale and status of the org.glite.overlay component
Workload Management System ( WMS )
GWE Core Grid Wizard Enterprise (
and Alexandre Duarte OurGrid/EELA Interoperability Meeting
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
MPI Applications with the Grid Engine
CRESCO Project: Salvatore Raia
Special Jobs: MPI Alessandro Costa INAF Catania
NGS computation services: APIs and Parallel Jobs
gLite Advanced Job Management
Elisa Ingrà – Consortium GARR
Module 01 ETICS Overview ETICS Online Tutorials
gLite Job Management Christos Theodosiou
Working in The IITJ HPC System
Presentation transcript:

Java standalone version MPI application Java standalone version Valeria Ardizzone Tutorial su integrazione applicazioni sui Science Gateway, Roma, 23-27.01.2012

GRID opportunities Grid allows users to access resources not available locally Pro: users have a bigger storage and computational power Con: configuration and run-time errors are difficult to identify gLite provides several tools to manage parallel applications on Grid An application can be separated in several jobs for trivial parallel problems or requires a single parallel job Nome Cognome Occasione, Luogo, gg.mm.anno

MPI overview Execution of parallel jobs is an essential issue for modern informatics and applications. Most used library for parallel jobs support is MPI (Message Passing Interface) At the state of the art, parallel jobs can run inside single Computing Elements (CE) only; several projects are involved into studies concerning the possibility of executing parallel jobs on Worker Nodes (WNs) belonging to different Ces. The source code must have been compiled with mpicc libraries Nome Cognome Occasione, Luogo, gg.mm.anno

MPI on Grid MPI differs from a normal application MPI applications require contemporary access to distribute resources through a special software library. The Grid software has to control the resources access in relation with the MPI requirements Different implementation of MPI library are available Applications can use only one library Actually, the MPI is bounded inside a CE Nome Cognome Occasione, Luogo, gg.mm.anno

MPI-Start Specifies a unique interface to the upper layer to run a MPI job Allow the support of new MPI implementations without modifications in the Grid middleware Support of “simple” file distribution Provide some support for the user to help manage his data Grid Middleware MPI-START MPI Resources 6 6

MPI-Start mpi-start is a recommended solution to hide the implementation details for jobs submission. The design of mpi-start was focused in making the MPI job submission as transparent as possible from the cluster details! Using the mpi-start system requires the user to define a wrapper script that set the environment variables and a set of hooks. It was developed inside the Int.EU.Grid project 7 7

MPI-Start design goals Portable The program must be able to run under any supported operating system Modular and extensible architecture Plugin/Component architecture Relocatable Must be independent of absolute path, to adapt to different site configurations Remote “injection” of mpi-start along with the job “Remote” debugging features It was developed inside the Int.EU.Grid project 8

MPI JAVA STANDALONE CODE Nome Cognome Occasione, Luogo, gg.mm.anno

Introduction While developing a Grid Application the user needs to identify: 1. The Grid services to specify 2. The input and ouput files 3. The executable The three steps above can be easily identified, then written and tested with a small set of GridEngine API calls. This set of instructions can be used then inside the portlet concentrating the user to deal with the interface while developing the portlet Nome Cognome Occasione, Luogo, gg.mm.anno

Required files to submit on Grid An init script and a wrapper in order to submit an MPI application to the Grid: mpi-start-wrapper.sh mpi-hooks.sh Another file needed is the one representing the application to execute on Grid: cpi.c Nome Cognome Occasione, Luogo, gg.mm.anno

Required JAVA files to submit on Grid jobmanager.java: application that manages executed jobs via the GridEngine mi_mpi_standalone.java: standalone jobSubmission code in Multi Infrastructure mode Nome Cognome Occasione, Luogo, gg.mm.anno

mi_mpi-standalone.java (1) Main code just instanciate the submission object and calls the submitJob methid. public static void main(String[] Args) { mi_mpi_standalone mihs = new mi_mpi_standalone(); mihs.prepareAndSubmitJob(); System.out.println("Done!"); } Infrastructure information class stores: class Info_Infrastructure { String nameInfrastructure; String acronymInfrastructure; String bdiiHost; String wmsHosts; String pxServerHost; String pxServerPort; String pxServerSecure; String pxRobotId; String pxRobotVO; String pxRobotRole; String pxRobotRenewalFlag; It was developed inside the Int.EU.Grid project 13

mi_mpi-standalone.java (2) App_Input is a class where collect all job sumbission values: class App_Input { // Filename for application input file String inputFileName; // Text for application input file String inputFileText; // User' given job identifier String jobIdentifier; // Content of an uploaded file String inputSandbox_inputFile; // Some user level information String username; String timestamp; It was developed inside the Int.EU.Grid project The init values will be read from portlet.xml class App_Init { Class used to store the values of portlet preferences: class App_Preferences { 14

mi_mpi-standalone.java (3) Prepare and Submit: public void prepareAndSubmitJob() { // Simulate the application init parameters appInit.sciGwyUserTrackingDB_Database="userstracking"; appInit.sciGwyUserTrackingDB_Username="tracking_user”; appInit.sciGwyUserTrackingDB_Password="usertracking"; // Simulate application preferences appPreferences.logLevel="info"; appPreferences.setNumInfrastructures("1"); appPreferences.paneInfrastucture=1; Info_Infrastructure[] infoInfra = new Info_Infrastructure[1]; infoInfra[0]=new Info_Infrastructure(); infoInfra[0].nameInfrastructure="EUMEDGRID-Support infrastructure"; … appPreferences.infoInfra = infoInfra; appPreferences.pxUserProxy=""; appPreferences.sciGwyAppId="9"; appPreferences.jobRequirements="Member(\"MPI-START\", other.GlueHostApplicationSoftwareRunTimeEnvironment);"+ "Member(\"MPICH\”, other.GlueHostApplicationSoftwareRunTimeEnvironment)”; It was developed inside the Int.EU.Grid project 15

mi_mpi-standalone.java (4) Prepare and Submit: … // Application input object App_Input appInput=new App_Input(); appInput.inputFileName="input_file.txt"; //Filename for appl input file appInput.inputFileText="Text input file"; // Text for appl input file appInput.jobIdentifier="Standalone mpi-job id"; // User' given job identifier // This variable contains the content of an uploaded file appInput.inputSandbox_inputFile="application_input_file.txt"; appInput.username="test"; SimpleDateFormat dateFormat = new SimpleDateFormat(tsFormat); String timestamp = dateFormat.format(Calendar.getInstance().getTime()); appInput.timestamp=timestamp; // Submit job submitJob(appInput); } It was developed inside the Int.EU.Grid project 16

mi_mpi-standalone.java (5) SUBMITJOB method: void submitJob(App_Input appInput) { int numInfras=appPreferences.getNumInfrastructures(); if(numInfras >0) { MultiInfrastructureJobSubmission miJobSubmission = new MultiInfrastructureJobSubmission("jdbc:mysql://localhost/” +appInit.sciGwyUserTrackingDB_Database, appInit.sciGwyUserTrackingDB_Username, appInit.sciGwyUserTrackingDB_Password); InfrastructureInfo infrastructures[] = new InfrastructureInfo[numInfras]; for(int i=0; i<numInfras; i++) { int j=i+1; String wmsHostList[]=null; if( null != appPreferences.infoInfra[i].wmsHosts && !appPreferences.infoInfra[i].wmsHosts.equals("")) { wmsHostList = appPreferences.infoInfra[i].wmsHosts.split(";"); log.info(LS+"wmsHostList"); for(int k=0; k<wmsHostList.length; k++) log.info(LS+wmsHostList[k]); } infrastructures[i] = new InfrastructureInfo( appPreferences.infoInfra[i].acronymInfrastructure, appPreferences.infoInfra[i].bdiiHost, wmsHostList, appPreferences.infoInfra[i].pxServerHost, appPreferences.infoInfra[i].pxServerPort, appPreferences.infoInfra[i].pxRobotId, appPreferences.infoInfra[i].pxRobotRole, appPreferences.infoInfra[i].pxRobotVO); miJobSubmission.addInfrastructure(infrastructures[i]); _log.info(LS+appPreferences.dumpInfrastructure(j));} It was developed inside the Int.EU.Grid project 17

mi_mpi-standalone.java (6) Sumbit method job details: … String executable="/bin/sh"; //Application executable String cpunumber="4"; //cpunumber (default) String arguments ="mpi-start-wrapper.sh cpi mpich2"; String outputPath="/tmp/"; // Output Path String outputFile="mpi-Output.txt"; //application standard output String errorFile ="mpi-Error.txt"; // application standard error String inputSandbox= appServerPath+"/WEB-INF/job/cpi.c”+","+appServerPath+"/WEB-INF/job/mpi-hooks.sh”+","+appServerPath+"/WEB-INF/job/mpi-start-wrapper.sh”+","+appInput.inputSandbox_inputFile; String outputSandbox=""; It was developed inside the Int.EU.Grid project 18

mi_mpi-standalone.java (7) Submit method job Requirements: … String jdlRequirements[] = appPreferences.jobRequirements.split(";"); int numRequirements=0; for(int i=0; i<jdlRequirements.length; i++) { if(!jdlRequirements[i].equals("")) { jdlRequirements[numRequirements] = "JDLRequirements=( "+jdlRequirements[i]+")"; numRequirements++; } _log.info("Requirement[”+"]='"+jdlRequirements[i]+"'"); } // for each jobRequirement It was developed inside the Int.EU.Grid project 19

mi_mpi-standalone.java (8) Submit method miJobSubmission object: miJobSubmission.setExecutable(executable); miJobSubmission.setTotalCPUCount(cpunumber); miJobSubmission.setArguments(arguments); miJobSubmission.setOutputPath(outputPath); if(outputSandbox.compareTo("")!=0) { miJobSubmission.setOutputFiles(outputSandbox) } miJobSubmission.setJobOutput(outputFile); miJobSubmission.setJobError(errorFile); If( null != inputSandbox && inputSandbox.length() > 0) miJobSubmission.setInputFiles(inputSandbox); if(numRequirements > 0) miJobSubmission.setJDLRequirements(jdlRequirements); // Submit Job miJobSubmission.submitJobAsync(username, hostUTDB, applicationId, appInput.jobIdentifier); It was developed inside the Int.EU.Grid project 20

Final step At the end launch the command for the submission. Manage job execution sent by the GridEngine API calls For the java code responsible for monitoring the status of the job and getting the output you can refer to the https://gilda.ct.infn.it/wikimain/-/wiki/Main/GridEngineStandaloneCode This java file is exactly the same used for the normal job. Nome Cognome Occasione, Luogo, gg.mm.anno

Grid Option in mpi-portlet.java References Gilda Training Material: http://gilda.ct.infn.it/wikimain Science Gateway developer page: http://gilda.ct.infn.it/wikimain/- /wiki/Main/Science%20Gateway%20Developer%20Pag es MPI Standalone wiki:http://gilda.ct.infn.it/wikimain/- /wiki/Main/GridEngineMPIStandaloneCode How to run GridEngine Standalone Code: https://gilda.ct.infn.it/wikimain/- /wiki/Main/GridEngineStandaloneCode It was developed inside the Int.EU.Grid project 25