ninf-g - core gridrpc infrastructure software forum @ ogf19

20
National Institute of Advanced Industrial Science and Technology Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19 Yoshio Tanaka (AIST) On behalf of the Ninf Project

Upload: yen

Post on 14-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19. Yoshio Tanaka (AIST) On behalf of the Ninf Project. Goal of this session. Attendees will understand GridRPC programming model how to develop and run Grid applications using Ninf-G - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

National Institute of Advanced Industrial Science and Technology

Ninf-G - Core GridRPC InfrastructureSoftware Forum @ OGF19

Yoshio Tanaka (AIST)

On behalf of the Ninf Project

Page 2: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Goal of this session

Attendees will understandAttendees will understandGridRPC programming modelhow to develop and run Grid applications using Ninf-Ghow it is easy to develop and run Ninf-G applicationshow Ninf-G is suitable for developing flexible, robust, and efficient Grid applications

flexible: allow dynamic resource allocation/migrationrobust: detect various faults and recover from themefficient: utilize hundreds to thousands of CPUs efficiently.

Interact with usersInteract with usersRequirements?Bug reports?Questions?

Page 3: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Outline

Introduction of GridRPCIntroduction of GridRPCGridRPC: Grid-enabled Remote Procedure Call

Introducition of Ninf-GIntroducition of Ninf-GWhat is Ninf-G?Ninf ProjectHow to use Ninf-G

Programming and execution of Grid-enabled applications

ExamplesExamplesTDDFT long-run on PRAGMA Grid (by Yusuke)Large-scale hybrid QM/MD simulation on Japan-US Grid testbed

Future directionFuture direction

Page 4: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

National Institute of Advanced Industrial Science and Technology

Introduction of GridRPC

Page 5: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

GridRPC: A programming model based on RPC

What is GridRPC?What is GridRPC?Utilize remote procedure call (RPC) on the GridBased on client-server modelThe GridRPC API is published as a proposed recommendation (GFD-R.P 52) at the GGF

Usage scenariosUsage scenariosRemote library call

Executing compute-intensive tasks on a remote high performance computing resource

Task parallel processingExecuting large numbers of independent tasks on distributed computing resources

Remote Library CallTask parallel processing

Page 6: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Server

Server

Server

ClientCompuer

GridRPC ModelClient ComponentClient Component

Caller of GridRPC .Manages remote executables via function handles

Remote ExecutablesRemote ExecutablesCallee of GridRPC. Dynamically generated on remote servers.

Information ManagerInformation ManagerManages and provides interface information for remote executables.

Func. Handle

ClientComponent

・・・・

・・・・

・・・・

・・・・・・・・

・・・・遠隔実行プログラム

Info. Manager

・・・・

・・・・

・・・・

・・・・・・・・

・・・・Remote Executables

Page 7: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Typical scenario 1: desktop supercomputing

Utilize remote supercomputers from Utilize remote supercomputers from your desktop computeryour desktop computer

Reduce cost for maintenance of Reduce cost for maintenance of librarieslibraries

ASP-like approachASP-like approach

Numerical LibrariesApplications

client

server

arguments

results

Page 8: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Typical scenario 2: parameter surevey

Compute independent tasks on Compute independent tasks on distributed resourcesdistributed resources

eg. combinatorial optimization problem solvers

Fault nodes can be discarded/rFault nodes can be discarded/retriedetriedDynamic allocation / release of Dynamic allocation / release of resources is possibleresources is possible

Client

Servers

Page 9: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Typical scenario 3: GridRPC + MPI

Coarse-grained independent parallel (MCoarse-grained independent parallel (MPI) programs are executed on distributePI) programs are executed on distributed clustersd clustersCombine coarse-grained parallelism (by Combine coarse-grained parallelism (by GridRPC) and fine-grained parallelism GridRPC) and fine-grained parallelism (by MPI)(by MPI)Dynamic migration of MPI jobs is possiDynamic migration of MPI jobs is possibleblePractical approach for large-scale compPractical approach for large-scale computationutation

Client

Servers

Page 10: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

GridRPC v.s. MPI GridRPCGridRPCtask paralleltask parallel

client/serverclient/server

GridRPC APIGridRPC API

dispensabledispensable

goodgood

availableavailable

can be dynamiccan be dynamic

easy to gridify existineasy to gridify existing apps.g apps.

parallelismparallelism

modelmodel

APIAPI

co-allocationco-allocation

fault tolerancefault tolerance

private IP private IP

nodes nodes

resourcesresources

othersothers

MPIMPI

data paralleldata parallel

SPMDSPMD

MPIMPI

indispensableindispensable

poor (fatal)poor (fatal)

unavailableunavailable

staticstatic**well knownwell known

seamlessly move seamlessly move

to Gridto Grid

* May be dynamic using process spawning

Page 11: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Sample Program

Parameter SurveyParameter SurveyNo. of surveys: nSurvey function: survey(in1, in2, result)Input Parameters: double in1, int in2Output Value: double result[]

Main ProgramMain Program Survey FunctionSurvey Function

Int main(int argc, char** argv){int i, n, in2; double in1, result[100][100];

Pre_processing();

For(I = 0; I < n, i++){   survey(in1, in2, resul+100*n)}

Post_processing();

survey(double in1, int in2, double* result){・・・ Do Survey・・・

}

Page 12: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Build remote library (server-side operation)

Survey FunctionSurvey Function

survey (double in1, int in2, double* result){・・・ Do Survey・・・

}

Original Program

Callee FunctionCallee Function

survey  (double in1, int in2, int size, double* result)

・・・ Do Survey・・・

}

Specify size of argumentSpecify size of argument

IDL FileIDL File

Module Survey_prog;

Define survey  (IN double in1, IN int in2, IN int size, OUT double* result);

Required “survey.o”Calls “C” survey(in1, in2, size, result);

Client Program CalleeFunction

IDL File

IDL Compiler IDL Compiler

Stub Program InterfaceInfo. LDIF File

Page 13: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Ninfy the original code (client-side)Int main(int argc, char** argv) {int i, n, in2; double in1, result[100][100]; grpc_function_handle_t handle [100];

Pre_processing();

grpc_initialize();for(I = 0; I < n; i++) { handle[i] = grpc_function_handle_init();}

For(I = 0; I < n, i++){   grpc_call_async (handles, in1,in2,100, result+100*n)}grpc_wait_all();

for(I = 0; i<n; i++){ grpc_function_handle_destruct();}grpc_finalize();

Post_processing();

Int main(int argc, char** argv){int i, n, in2; double in1, result[100][100];

Pre_processing();

For(I = 0; I < n, i++){   survey(in1, in2, resul+100*n)}

Post_processing();

Declare func. handlesDeclare func. handles

Init func. handlesInit func. handles

Async. RPCAsync. RPC

Retrieve resultsRetrieve results

Destruct handlesDestruct handles

Page 14: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

National Institute of Advanced Industrial Science and Technology

Ninf-G

Overview and ArchitectureOverview and Architecture

Page 15: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Ninf ProjectStarted in 1994Started in 1994Collaborators from various organizationsCollaborators from various organizations

AISTSatoshi SekiguchiHidemoto NakadaYoshio TanakaAtsuko TakefusaYusuke TanimuraHiroshi Takemiya

University of TsukubaMitsuhisa SatoTaisuke BokuOsamu Tatebe

Tokyo Institute of Technology Satoshi MatsuokaKento Aida

Tokyo Denki UniversityKatsuki Fujisawa

Page 16: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Brief History of Ninf/Ninf-G

1994 1997 2000 2003

Ninf projectlaunched

Release Ninfversion 1

Start collaborationwith NetSolve team

Ninf-G development

Release Ninf-Gversion 0.9

Release Ninf-Gversion 1.0

Standard GridRPCAPI proposed Release Ninf-G

Version 1.1

GridRPCstandaredspecification

Page 17: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Brief History of Ninf/Ninf-G (cont’d)

2003 2004 2005 2006

Draft GridRPC API

1st submission to the GGF

GridRPC API publishedas proposed recommendationGFD-R.P 52

Submittedexperimentaldocument

2nd draft submission

Ninf-G 2.0.0

Ninf-G 2.1.0

Ninf-G 2.2.0

Ninf-G 2.3.0

Ninf-G 2.4.0

Ninf-G in NMI

Ninf-G 4.0.0

Ninf-G 4.1.0

Ninf-G4.2.0

Page 18: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Ninf-G: A Reference Implementation of the GridRPC API

A software package which implements the GA software package which implements the GridRPC API.ridRPC API.Ninf-G includesNinf-G includes

C/C++, Java APIs, libraries for software developmentIDL compiler for stub generationShell scripts to

compile client programbuild and publish remote libraries

sample programs and manual documents

Latest version is 4.2.1Latest version is 4.2.1

Page 19: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Features of Ninf-G Version 4

Enables RPC via Enables RPC via WS GRAM Pre-WS GRAMCondorUnicoreSSHNAREGI SS

Has an interface for working with the other Grid miHas an interface for working with the other Grid middleware for RPC.ddleware for RPC.

E.g. ARC GridFTP Server (Nordu Grid)

Page 20: Ninf-G - Core GridRPC Infrastructure Software Forum @ OGF19

Architecture of Ninf-G4

Client

GRAM /UNICORE /

Condor

Invoke Executable

Connect back

IDL file NumericalLibrary

IDL Compiler

Ninf-GExecutable

Generate Interface Request

Interface Reply

Server side

Client side

MDS Interface InformationLDIF Fileretrieve

Globus-IO

InvokeServer