The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) MPI Applications with the Grid Engine Riccardo Rotondo

Slides:



Advertisements
Similar presentations
Generic MPI Job Submission by the P-GRADE Grid Portal Zoltán Farkas MTA SZTAKI.
Advertisements

© 2007 IBM Corporation IBM Global Engineering Solutions IBM Blue Gene/P Job Submission.
Setting up Small Grid Testbed
Greg Thain Computer Sciences Department University of Wisconsin-Madison Condor Parallel Universe.
1 Generic logging layer for the distributed computing by Gene Van Buren Valeri Fine Jerome Lauret.
Using the Argo Cluster Paul Sexton CS 566 February 6, 2006.
Setting up of condor scheduler on computing cluster Raman Sehgal NPD-BARC.
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.
EGI-InSPIRE RI EGI-InSPIRE EGI-InSPIRE RI Ejecución con MPI e interactividad en el Grid Ejercicios Prácticos 1.
Southgreen HPC system Concepts Cluster : compute farm i.e. a collection of compute servers that can be shared and accessed through a single “portal”
ISG We build general capability Job Submission on the Olympus Cluster J. DePasse; S. Brown, PhD; T. Maiden Pittsburgh Supercomputing Center Public Health.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Supporting MPI Applications on EGEE Grids Zoltán Farkas MTA SZTAKI.
Sun Grid Engine Grid Computing Assignment – Fall 2005 James Ruff Senior Department of Mathematics and Computer Science Western Carolina University.
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.
ISG We build general capability Purpose After this tutorial, you should: Be comfortable submitting work to the batch queuing system of olympus and be familiar.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Supporting MPI applications on the EGEE Grid.
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,
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Hostname-portlet Template Riccardo Rotondo
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Grid Engine Riccardo Rotondo
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci
EGEE is a project funded by the European Union under contract IST Input from Generic and Testing Roberto Barbera NA4 Generic Applications Coordinator.
LOGO Scheduling system for distributed MPD data processing Gertsenberger K. V. Joint Institute for Nuclear Research, Dubna.
Bigben Pittsburgh Supercomputing Center J. Ray Scott
March 3rd, 2006 Chen Peng, Lilly System Biology1 Cluster and SGE.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
OGF 25/EGEE User Forum Catania, March 2 nd 2009 Meta Scheduling and Advanced Application Support on the Spanish NGI Enol Fernández del Castillo (IFCA-CSIC)
Grid Computing I CONDOR.
:: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: ::::: :: GridKA School 2009 MPI on Grids 1 MPI On Grids September 3 rd, GridKA School 2009.
Introduction to Using SLURM on Discover Chongxun (Doris) Pan September 24, 2013.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) GISELA Additional Services Diego Scardaci
Stuart Wakefield Imperial College London Evolution of BOSS, a tool for job submission and tracking W. Bacchi, G. Codispoti, C. Grandi, INFN Bologna D.
E-science grid facility for Europe and Latin America gLite MPI Tutorial for Grid School Daniel Alberto Burbano Sefair, Universidad de Los.
Interactive Workflows Branislav Šimo, Ondrej Habala, Ladislav Hluchý Institute of Informatics, Slovak Academy of Sciences.
How to for compiling and running MPI Programs. Prepared by Kiriti Venkat.
Software Tools Using PBS. Software tools Portland compilers pgf77 pgf90 pghpf pgcc pgCC Portland debugger GNU compilers g77 gcc Intel ifort icc.
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 Charon Extension Layer. Modular environment for Grid jobs and applications management Jan.
Int.eu.grid: Experiences with Condor to Run Interactive and Parallel Applications on the Grid Elisa Heymann Department of Computer Architecture and Operating.
E-infrastructure shared between Europe and Latin America FP6−2004−Infrastructures−6-SSA Special Jobs Valeria Ardizzone INFN - Catania.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
Advanced topics Cluster Training Center for Simulation and Modeling September 4, 2015.
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.
Wouter Verkerke, NIKHEF 1 Using ‘stoomboot’ for NIKHEF-ATLAS batch computing What is ‘stoomboot’ – Hardware –16 machines, each 2x quad-core Pentium = 128.
EGI-InSPIRE RI EGI-InSPIRE EGI-InSPIRE RI Parallel jobs with MPI Hands-on tutorial Enol Fernández del Castillo Instituto.
Advanced gLite job management Paschalis Korosoglou, AUTH/GRNET EPIKH Application Porting School 2011 Beijing, China Paschalis Korosoglou,
1 An unattended, fault-tolerant approach for the execution of distributed applications Manuel Rodríguez-Pascual, Rafael Mayo-García CIEMAT Madrid, Spain.
The Finite Difference Time Domain Method FDTD By Dr. Haythem H. Abdullah Researcher at ERI, Electronics Research Institute, Microwave Engineering Dept.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarksEGEE-III INFSO-RI MPI on the grid:
Grid Initiatives for e-Science virtual communities in Europe and Latin America Elisa Ingrà
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Advanced Job Riccardo Rotondo
LA 4 CHAIN GISELA EPIKH School SPECFEM3D on Science Gateway.
Parallel jobs with MPI and hands on tutorial Enol Fernández del Castillo Instituto de Física de Cantabria.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Special Topics: MPI jobs Maha Dessokey (
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Indian Institute of Technology Kharagpur EPIKH Workshop Kolkata,
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) How to Run MPI-enabled Applications on the EUMEDGRID Infrastructure.
Stephen Childs Trinity College Dublin
MPI Applications with the Grid Engine
Advanced Topics: MPI jobs
gLite MPI Job Amina KHEDIMI CERIST
Special jobs with the gLite WMS
Java standalone version
Using Paraguin to Create Parallel Programs
MPI Applications with the Grid Engine
Special Topics: MPI jobs
Paul Sexton CS 566 February 6, 2006
CCR Advanced Seminar: Running CPLEX Computations on the ISE Cluster
Quick Tutorial on MPICH for NIC-Cluster
Working in The IITJ HPC System
Presentation transcript:

The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) MPI Applications with the Grid Engine Riccardo Rotondo Joint CHAIN/EUMEDGRID-Support/EPIKH School to Science Gateways Amman, Jordan

2 2 Outline What is MPI ? MPI Challenges on GRID MPI Interface MPI embedded in your GRID Engine MPI Portlet Development 2 Outline

3 3 Message Passing Interface What is MPI ?  A standard defining a syntax and semantics useful for righting message-passing appications. Why MPI ?  Heavy usage of CPU power in HPC;  Development of portable and scalable large parallel applications. 3 3

4 4 There is no standard way of starting an MPI application No common syntax for mpirun, mpiexec support optional The cluster where the MPI job is supposed to run doesn't have a shared file system How to distribute the binary and input files? How to gather the output? Different clusters over the Grid are managed by different Local Resource Management Systems (PBS, LSF, SGE,…) Where is the list of machines that the job can use? What is the correct format for this list? How to compile MPI program? How can a physicist working on Windows workstation compile his code for/with an Itanium MPI implementation? MPI in GRID 4 4

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 MPI-Start 5 5 Grid Middleware MPI-START ResourcesMPI

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. MPI-Start 6 6

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 MPI-Start design goals 7 7

MPI-Start Architecture 8 8 CORE Execution Open MPI MPICH2 LAM PACX Scheduler PBS/Torque SGE LSF Hooks Local User Compiler File Dist.

MPI-Start Flow 9 9 Do we have a scheduler plugin for the current environment? Trigger pre-run hooks Ask Scheduler plugin for a machinefile in default format Activate MPI Plugin Start mpirun Do we have a plugin for the selected MPI? Prepare mpirun Trigger post-run hooks START EXIT Dump Env NO Scheduler Plugin Execution Plugin Hooks Plugins

Interface with environment variables:  I2G_MPI_APPLICATION: The executable  I2G_MPI_APPLICATION_ARGS: The parameters to be passed to the executable  I2G_MPI_TYPE: The MPI implementation to use (e.g openmpi,...)  I2G_MPI_VERSION: Specifies which version of the the MPI implementation to use. If not defined the default version will be used Using MPI-Start 10

More variables:  I2G_MPI_PRECOMMAND Specifies a command that is prepended to the mpirun (e.g. time).  I2G_MPI_PRE_RUN_HOOK Points to a shell script that must contain a “pre_run_hook” function. This function will be called before the parallel application is started (usage: compilation of the executable)  I2G_MPI_POST_RUN_HOOK Like I2G_MPI_PRE_RUN_HOOK, but the script must define a “post_run_hook” that is called after the parallel application finished (usage: upload of results). Using MPI-Start 11

Using MPI-Start 12 ~]$ cat test2mpistart.sh #!/bin/sh # This is a script to show how mpi-start is called # Set environment variables needed by mpi- start export I2G_MPI_APPLICATION=/bin/hostname export I2G_MPI_APPLICATION_ARGS= export I2G_MPI_NP=2 export I2G_MPI_TYPE=openmpi export I2G_MPI_FLAVOUR=openmpi export I2G_MPI_JOB_NUMBER=0 export I2G_MPI_STARTUP_INFO=/home/imain179 export I2G_MPI_PRECOMMAND=time export I2G_MPI_RELAY= export I2G_MPI_START=/opt/i2g/bin/mpi-start # Execute mpi-start $I2G_MPI_START ~]$ cat test2mpistart.sh.o Scientific Linux CERN SLC release 4.5 (Beryllium) lflip30.lip.pt lflip31.lip.pt ~]$ qsub -S /bin/bash -pe openmpi 2 -l allow_slots_egee=0./test2mpistart.sh [lflip31] /home/imain179 > cat test2mpistart.sh.e Scientific Linux CERN SLC release 4.5 (Beryllium) real 0m0.731s user 0m0.021s sys 0m0.013s The submission (in SGE): The StdOut: The StdErr: The script: MPI commands are transparent to the user – No explicit mpiexec/mpirun instruction – Start the script via normal LRMS submission

Wrapper Script for MPI Start 13 #!/bin/bash # Pull in the arguments. MY_EXECUTABLE=`pwd`/$1 MPI_FLAVOR=$2 # Convert flavor to lowercase for passing to mpi-start. MPI_FLAVOR_LOWER=`echo $MPI_FLAVOR | tr '[:upper:]' '[:lower:]'` # Pull out the correct paths for the requested flavor. eval MPI_PATH=`printenv MPI_${MPI_FLAVOR}_PATH` # Ensure the prefix is correctly set. Don't rely on the defaults. eval I2G_${MPI_FLAVOR}_PREFIX=$MPI_PATH export I2G_${MPI_FLAVOR}_PREFIX # Touch the executable. #It exist must for the shared file system check. # If it does not, then mpi-start may try to distribute the executable # when it shouldn't. touch $MY_EXECUTABLE # Setup for mpi-start. export I2G_MPI_APPLICATION=$MY_EXECUTABLE export I2G_MPI_APPLICATION_ARGS= export I2G_MPI_TYPE=$MPI_FLAVOR_LOWER export I2G_MPI_PRE_RUN_HOOK=mpi-hooks.sh export I2G_MPI_POST_RUN_HOOK=mpi-hooks.sh # If these are set then you will get more debugging information. export I2G_MPI_START_VERBOSE=1 #export I2G_MPI_START_DEBUG=1 # Invoke mpi-start. $I2G_MPI_START The script takes 2 argument the executable name and the MPI flavor The script refers to the Hooks scripts

Wrapper Script for MPI Start 14 #!/bin/bash # Pull in the arguments. MY_EXECUTABLE=`pwd`/$1 MPI_FLAVOR=$2 # Convert flavor to lowercase for passing to mpi-start. MPI_FLAVOR_LOWER=`echo $MPI_FLAVOR | tr '[:upper:]' '[:lower:]'` # Pull out the correct paths for the requested flavor. eval MPI_PATH=`printenv MPI_${MPI_FLAVOR}_PATH` # Ensure the prefix is correctly set. Don't rely on the defaults. eval I2G_${MPI_FLAVOR}_PREFIX=$MPI_PATH export I2G_${MPI_FLAVOR}_PREFIX # Touch the executable. #It exist must for the shared file system check. # If it does not, then mpi-start may try to distribute the executable # when it shouldn't. touch $MY_EXECUTABLE # Setup for mpi-start. export I2G_MPI_APPLICATION=$MY_EXECUTABLE export I2G_MPI_APPLICATION_ARGS= export I2G_MPI_TYPE=$MPI_FLAVOR_LOWER export I2G_MPI_PRE_RUN_HOOK=mpi-hooks.sh export I2G_MPI_POST_RUN_HOOK=mpi-hooks.sh # If these are set then you will get more debugging information. export I2G_MPI_START_VERBOSE=1 #export I2G_MPI_START_DEBUG=1 # Invoke mpi-start. $I2G_MPI_START The script takes 2 argument the executable name and the MPI flavor The script refers to the Hooks scripts

Outline 15 worker node Resource Manager

MPI Portlet 16 MPI Portlet Develop

cpunumber in mpi_portlet.java 17 String cpunumber; // Number of cpu will execute the mpi script in parallel A global variable representing the number or the cpu can be set by user public void getInputForm(ActionRequest request) {... List items = upload.parseRequest(request);... cpunumber=item.getString(); // or cpunumber=(String)request.getParameter("cpunumber");... } Reading the CPU number from the user request

cpunumber in mpi_portlet.java 18 public void submitJob() {... String arguments="mpi-start-wrapper.sh cpi mpich2";... JSagaJobSubmission tmpJSaga = new JSagaJobSubmission();... tmpJSaga.setTotalCPUCount(cpunumber);... } Using the cpunumber submitting the job:

cpunumber input.jsp 19 " method="post">... Insert cpu number 4... Using the cpunumber submitting the job:

mpi-start, mpi-hooks, mpi-app 20 public void submitJob() {... String executable="/bin/sh"; String arguments="mpi-start-wrapper.sh cpi mpich2";... String inputSandbox= appServerPath+"/WEB- INF/job/pilot_script.sh” +","+appServerPath+"/WEB-INF/job/cpi.c" +","+appServerPath+"/WEB-INF/job/mpi-hooks.sh" +","+appServerPath+"/WEB-INF/job/mpi-start-wrapper.sh" +","+inputSandbox_inputFile;... } Setting the location of the mpi scripts and mpi application.

Grid Option in portlet.xml 21 mpi-portlet it.infn.ct.mpi_portlet... init_JobRequirements Member("MPI-START", other.GlueHostApplicationSoftwareRunTimeEnvironment); Member("MPICH", other.GlueHostApplicationSoftwareRunTimeEnvironment)... In portlet.xml can set some default preferences that can be recall in the java code:

Grid Option in mpi-portlet.java 22 private void getPreferences( ActionRequest actionRequest, RenderRequestrenderRequest) {... pref_JobRequirements=prefs.getValue("pref_JobRequirements ",init_JobRequirements);... } First we need to get the value from portlet preferences:

Grid Option in mpi-portlet.java 23 public void submitJob() {... String jdlRequirements[] = pref_JobRequirements.split(";"); int numRequirements=0; for(int i=0; i<jdlRequirements.length; i++) { if(!jdlRequirements[i].equals("")) { jdlRequirements[numRequirements] = "JDLRequirements=("+jdlRequirements[i]+")"; numRequirements++;... tmpJSaga.setJDLRequirements(jdlRequirements);... } Now set the Job Requirements in java code to submit the job:

24 References Gilda Trainin Material: – Science Gateway developer page: – /wiki/Main/Science%20Gateway%20Developer%2 0Pageshttp://gilda.ct.infn.it/wikimain/- /wiki/Main/Science%20Gateway%20Developer%2 0Pages MPI Standalone wiki: – /wiki/Main/GridEngineMPIStandaloneCodehttp://gilda.ct.infn.it/wikimain/- /wiki/Main/GridEngineMPIStandaloneCode References

Thank you for your attention Special thanks to Mario Reale 25