Data types Function handle – grpc_function_handle_t A structure that contains a mapping between a client and an instance of a remote function Object handle.

Slides:



Advertisements
Similar presentations
National Institute of Advanced Industrial Science and Technology Ninf-G - Core GridRPC Infrastructure Software OGF19 Yoshio Tanaka (AIST) On behalf.
Advertisements

Three types of remote process invocation
Generalized Requests. The current definition They are defined in MPI 2 under the hood of the chapter 8 (External Interfaces) Page 166 line 16 The objective.
MPI Message Passing Interface
1 Computer Science, University of Warwick Accessing Irregularly Distributed Arrays Process 0’s data arrayProcess 1’s data arrayProcess 2’s data array Process.
Constructor. 2 constructor The main use of constructors is to initialize objects. A constructor is a special member function, whose name is same as class.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
RPC Robert Grimm New York University Remote Procedure Calls.
Grid Resource Allocation Management (GRAM) GRAM provides the user to access the grid in order to run, terminate and monitor jobs remotely. The job request.
Remote Procedure Call (RPC)
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
A Computation Management Agent for Multi-Institutional Grids
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Process Control Hua LiSystems ProgrammingCS2690Process Control Page 1 of 41.
Road Map Introduction to object oriented programming. Classes
Chapter 7 - Functions. Functions u Code group that performs single task u Specification refers to what goes into and out of function u Design refers to.
Precept 3 COS 461. Concurrency is Useful Multi Processor/Core Multiple Inputs Don’t wait on slow devices.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
© The McGraw-Hill Companies, 2006 Chapter 5 Arrays.
Terms and Rules Professor Evan Korth New York University (All rights reserved)
1 Chapter 4 Threads Threads: Resource ownership and execution.
Asynchronous Solution Appendix Eleven. Training Manual Asynchronous Solution August 26, 2005 Inventory # A11-2 Chapter Overview In this chapter,
Interprocess Communication. Process Concepts Last class.
Resource Management Reading: “A Resource Management Architecture for Metacomputing Systems”
Students: Nadia Goshmir, Yulia Koretsky Supervisor: Shai Rozenrauch Industrial Project Advanced Tool for Automatic Testing Final Presentation.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
Threaded Applications Introducing additional threads in a Delphi application is easy.
Support for Debugging Automatically Parallelized Programs Robert Hood Gabriele Jost CSC/MRJ Technology Solutions NASA.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 15: More-Advanced Concepts.
Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
Share Memory Program Example int array_size=1000 int global_array[array_size] main(argc, argv) { int nprocs=4; m_set_procs(nprocs); /* prepare to launch.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February Session 11.
CS333 Intro to Operating Systems Jonathan Walpole.
July 11-15, 2005Lecture3: Grid Job Management1 Grid Compute Resources and Job Management.
REQUEST/REPLY COMMUNICATION
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Using Derrick Rapley Maryland CFUG January 8, 2002.
4P13 Week 12 Talking Points Device Drivers 1.Auto-configuration and initialization routines 2.Routines for servicing I/O requests (the top half)
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
National Institute of Advanced Industrial Science and Technology Developing Scientific Applications Using Standard Grid Middleware Hiroshi Takemiya Grid.
1 Configuring Sites Configuring Site Settings Configuring Inter-Site Replication Troubleshooting Replication Maintaining Server Settings.
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
.NET Mobile Application Development XML Web Services.
RPC Model, Stubs and Skeletons Divya Nampalli
Open Science Grid Build a Grid Session Siddhartha E.S University of Florida.
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
Chapter 7 - Functions. Functions u Code group that performs single task u Specification refers to what goes into and out of function u Design refers to.
Kento Aida, Tokyo Institute of Technology Ninf-G: GridRPC System Tokyo Institute of Technology Kento Aida.
Channels. Models for Communications Synchronous communications – E.g. Telephone call Asynchronous communications – E.g. .
Cliff Addison University of Liverpool NW-GRID Training Event 26 th January 2007 SCore MPI Taking full advantage of GigE.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
1 Proposal for Data Management in GridRPC – GGF /03/05 Proposal for Data Management in GridRPC GRAAL Research Team, INRIA, France.
Forge.gridforum.org/projects/gridrpc-wg The End-User and Middleware APIs for GridRPC Keith Seymour, UTK Craig Lee, Aerospace Corp. Frédéric Desprez, INRIA/ENS.
Lesson One – Creating a thread
Do-more Technical Training
Chapter 2: System Structures
Async or Parallel? No they aren’t the same thing!
Resource Sharing Locate
CMSC621: Advanced Operating Systems Advanced Operating Systems
DISTRIBUTED COMPUTING
CS212: Object Oriented Analysis and Design
Presentation transcript:

Data types Function handle – grpc_function_handle_t A structure that contains a mapping between a client and an instance of a remote function Object handle – grpc_object_handle_t_np A structure that contains a mapping between a client and an instance of a remote object Session ID – grpc_sessionid_t Non-nevative integer that identifies a session Session ID can be used for status check, cancellation, etc. of outstanding RPCs. Error and status code – grpc_error_t Integer that describes error and status of GridRPC APIs. All GridRPC APIs return error code or status code.

Initialization / Finalization grpc_error_t grpc_initialize(char *config_file_name) reads the configuration file and initialize client. Any calls of other GRPC APIs prior to grpc_initialize would fail Returns GRPC_OK (success) or GRPC_ERROR (failure) grpc_error_t grpc_finalize() Frees resources (memory, etc.) Any calls of other GRPC APIs after grpc_finalize would fail Returns GRPC_OK (success) or GRPC_ERROR (failure)

Function handles grpc_error_t grpc_function_handle_default( grpc_function_handle_t *handle, char *func_name) Creates a function handle to the default server grpc_error_t grpc_function_handle_init( grpc_function_handle_t *handle, char *host_port_str, char *func_name) Specifies the server explicitly by the second argument. grpc_error_t grpc_function_handle_destruct( grpc_function_handle_t *handle) Frees memory allocated to the function handle

Function handles (cont ’ d) grpc_error_t grpc_function_handle_array_default_np ( grpc_function_handle_t *handle, size_t nhandles, char *func_name) Creates multiple function handles via a single GRAM call grpc_error_t grpc_function_handle_array_init_np ( grpc_function_handle_t *handle, size_t nhandles, char *host_port_str, char *func_name) Specifies the server explicitly by the second argument. grpc_error_t grpc_function_handle_array_destruct_np ( grpc_function_handle_t *handle, size_t nhandles) Specifies the server explicitly by the second argument.

Object handles grpc_error_t grpc_object_handle_default_np ( grpc_object_handle_t_np *handle, char *class_name) Creates an object handle to the default server grpc_error_t grpc_object_handle_init_np ( grpc_function_object_t_np *handle, char *host_port_str, char *class_name) Specifies the server explicitly by the second argument. grpc_error_t grpc_function_object_destruct_np ( grpc_object_handle_t_np *handle) Frees memory allocated to the function handle.

Object handles (cont ’ d) grpc_error_t grpc_object_handle_array_default ( grpc_objct_handle_t_np *handle, size_t nhandles, char *class_name) Creates multiple object handles via a single GRAM call. grpc_error_t grpc_object_handle_array_init_np ( grpc_object_handle_t_np *handle, size_t nhandles, char *host_port_str, char *class_name) Specifies the server explicitly by the second argument. grpc_error_t grpc_object_handle_array_destruct_np ( grpc_object_handle_t_np *handle, size_t nhandles) Frees memory allocated to the function handles.

Synchronous RPC v.s. Asynchronous RPC grpc_call_a sync Client ServerAServerB grpc_call_as ync grpc_wait _all Asynchronous RPC Synchronous RPC Blocking Call Same semantics with a local function call. grpc_call Client ServerA Non-blocking Call Useful for task-parallel applications grpc_call_async(...);grpc_wait_*(…);grpc_call_async(...);grpc_wait_*(…); grpc_call(...);grpc_call(...);

RPC functions grpc_error_t grpc_call ( grpc_function_handle_t *handle, … ) Synchronous (blocking) call grpc_error_t grpc_call_async ( grpc_function_handle_t *handle, grpc_sessionid_t *sessionID, … ) Asynchronous (non-blocking) call Session ID is stored in the second argument.

Ninf-G method invocation grpc_error_t grpc_invoke_np ( grpc_object_handle_t_np *handle, char *method_name, … ) Synchronous (blocking) method invocation grpc_error_t grpc_invoke_async_np ( grpc_object_handle_t_np *handle, char *method_name, grpc_sessionid_t *sessionID, … ) Asynchronous (non-blocking) method invocation session ID is stored in the third argument.

Session control functions grpc_error_t grpc_probe ( grpc_sessionid_t sessionID) probes the job specified by SessionID whether the job has been completed. grpc_error_t grpc_probe_or ( grpc_sessionid_t *idArray, size_t length, grpc_sessionid_t *idPtr) probes whether at least one of jobs in the array has been grpc_error_t grpc_cancel ( grpc_sessionid_t sessionID) Cancels a session grpc_error_t grpc_cancel_all () Cancels all outstanding sessions

Wait functions grpc_error_t grpc_wait ( grpc_sessionid_t sessionID) Waits outstanding RPC specified by sessionID grpc_error_t grpc_wait_and ( grpc_sessionid_t *idArray, size_t length) Waits all outstanding RPCs specified by an array of sessionIDs

Wait functions (cont ’ d) grpc_error_t grpc_wait_or ( grpc_sessionid_t *idArray, size_t length, grpc_sessionid_t *idPtr) Waits any one of RPCs specified by an array of sessionIDs. grpc_error_t grpc_wait_all () Waits until all outstanding RPCs are completed. grpc_error_t grpc_wait_any ( grpc_sessionid_t *idPtr) Waits any one of outstanding RPCs.

National Institute of Advanced Industrial Science and Technology Ninf-G Compile and run

Prerequisite Environment variables GLOBUS_LOCATION NG_DIRPATH ${GLOBUS_LOCATION}/etc/globus-user-env.{csh,sh} ${NG_DIR}/etc/ninfg-user-env.{csh,sh} Globus-level settings User certificate, CA certificate, grid-mapfile test % grid-proxy-init % globus-job-run server.foo.org /bin/hostname

Compile and run Compile the client application using ngcc command % ng_cc – o myapp app.c Create a proxy certificate % grid-proxy-init Prepare a client configuration file Run %./myapp config.cl [args … ]

Client configuration file Specifies runtime environments Available attributes are categorized to sections: INCLUDE section CLIENT section LOCAL_LDIF section FUNCTION_INFO section MDS_SERVER section SERVER section SERVER_DEFAULT section INVOKE_SERVER section

Frequently used attributes section section loglevel refresh_credential section section hostname invoke_server mpi_runNoOfCPUs jobmanager job_startTimeout job_queue heatbeat / heatbeat_timeoutCount redirect_outerr section section session_timeout section section filename

Ninf-G tips How the server can be specified? Server is determined when the function handle is initialized. grpc_function_handle_init(); hostname is given as the second argument grpc_function_handle_default(); hostname is specified in the client configuration file which must be passed as the first argument of the client program. Ninf-G does not provide broker/scheduler/meta-server. Should use LOCAL LDIF rather than MDS. easy, efficient and stable How should I deploy Ninf-G executables? Deploy Ninf-G executables manually Ninf-G provides automatic staging of executables Other functionalities? heatbeating timeout client callbacks attaching to debugger …

National Institute of Advanced Industrial Science and Technology Ninf-G Examples

Examples of Ninf-G Applications Molecular Simulation Replica Exchange Monte-Carlo : Potential survey of a molecule Time Dependent DFT Simulation : Calculating electron status of a molecule QM/MD Hybrid simulation Joint demonstration by TeraGrid/AIST at SC2004 Weather forecasting Simulation S-model : Global weather prediction using ensemble simulation Joint demonstration by TeraGrid/ApGrid/PRAGMA at SC2003 Optimization Problem Traveling salesman problem : Searching shortest path