ninf-g - core gridrpc infrastructure software forum @ ogf19
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 PresentationTRANSCRIPT
National Institute of Advanced Industrial Science and Technology
Ninf-G - Core GridRPC InfrastructureSoftware Forum @ OGF19
Yoshio Tanaka (AIST)
On behalf of the Ninf Project
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?
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
National Institute of Advanced Industrial Science and Technology
Introduction of GridRPC
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
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
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
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
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
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
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・・・
}
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
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
National Institute of Advanced Industrial Science and Technology
Ninf-G
Overview and ArchitectureOverview and Architecture
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
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
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
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
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)
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