Minutes from 2. session of SAGA-RG at GGF17

Meeting of SAGA-RG at GGF17 2nd meeting, may 10, 3:45 - 5:15 Session chaired by Andre Merzky Notes taken by Andre Merzky, Thilo Kielmann Agenda: - agenda bashing - questions (misc.) to the SAGA group - GridRPC interface - SAGA look-and-feel document Andre opens the session, circulates the sign-up sheet, referring to GGF's IPR policy. agenda bashing: --------------- the agenda is accepted "as is" by the participants questions (misc.) to the SAGA group: ------------------------------------ Q: what do i need for saga? globus + saga package a,b,c ?? -> check acs+cddlm groups -> saga cookbook Q: relation with other ggf groups? -> see requirements doc ----------------------------------------------------------------------------- GridRPC interface: ------------------ - open problems with rpc in SAGA: - config file imple specific - still open, follow up on list - error returned either on init or on call - same in other places in SAGA, so no problem - needs clean up in SAGA eventually? - Ninf-G allows to bind handle to multiple methods ('module') - delay for later iterations, of no concern right now - variable parameter list - no issue, define list of char^, and allow language binding to do vararg some detailed comments in the code below ---------------------------------------- The SAGA rpc proposal: ---------------------- namespace saga { ///////////////////////////////////////////////////////// // // rpc // class rpc { public: rpc (session const & s, const std::string & name); rpc (const std::string & name); ~rpc (void); // call void call (std::list <char *>); }; // rpc } ---------------------------------------------------------- // most trivial example, controversity about config file, as that // is implementation specific. Two options: // - if the config file is not needed to be changed by the end // user, hide its existence in the implementation // - if the config file needs to be changed by the end user // (during runtime), provide it to the constructor as optional // URL parameter - that URL could be obtained by a resource // discovery later. #include <saga.hpp> int main () { try { saga::rpc handle ("dgesv", uri); // see comment above } catch ( const saga::exception & e ) { std::cerr << "Error creating function handle: " << e.what () << std::endl; } } ---------------------------------------------------------- ---------------------------------------------------------- // This bases on a sample program for Ninf-G, calculating pi // it shows the syncroneous version of call. #include <saga.h> std::string func_name = "pi/pi_trial"; std::string config_file = "client.conf"; int port = 0; int main (int argc, char *argv[]) { if ( argc != 2 ) { std::cerr << "\n\tUSAGE: " << argv[0] << " <times>\n\n"; exit (2); } long times = atol (argv[1]); try { // Initialize Function handle saga::rpc handle (func_name); // Synchronous call, here using varargs long answer; handle.call (0, times, &answer); // Compute and display pi std::cout << "PI = " << 4.0 * ((double) answer / times)) << std::endl; } catch ( const saga::exception & e ) { std::cerr << "Catched saga error: " << e.what () << std::endl; exit (2); } return (0); } ---------------------------------------------------------- ---------------------------------------------------------- // similar example, but use async calls #include <saga.hpp> string func_name = "pi/pi_trial"; int main (int argc, char *argv[]) { if ( argc != 2 ) { std::cout << "\n\t"; std::cout << "USAGE: " << argv[0] << " TIMES\n"; exit (2); } // initialize vars from CL arguments long times = atol (argv[1]); std::vector <std::string> hosts; try { // create result vector and task container std::vector <long> count; saga::task_container tc; for ( int i = 0; i < times; i++ ) { // create rpc handle saga::rpc handle (func_name); // perform async call, returns task in Runnning state saga::task t = handle.call <saga::async> (i, &count[i]); // add task to task container tc.add (t); } // wait tasks (for ever, for all) std::list <saga::task> finished = tc.wait (-1.0, saga::task::All); // the same would be (default parameters): // std::list <saga::task> finished = tc.wait (); // Compute and display pi. As all tasks are done (error test // missing!), we can use the output vars int sum = 0; for ( i = 0; i < times; i++ ) { sum += count[i]; } std::cout << "PI = " << 4.0 * (sum / ((double) times))) << std::endl; } catch ( const saga::exception & e ) { std::cerr << "Found saga error: " << e.what () << std::endl; exit (2); } return (0); } comments to this example: - Q: what is the life time of task? A: defined by runtime of task, or limited by cancel - Q: does cancel guarantee resource de-allocation? A: No, right now it does not block, and implementation is doing best effort, but no guarantees - after some discussion we agreed to add a timeout to cancel(), with -1 meaning forever, to allow to wait for guaranteed resource deallocation on task cancelation. Default will be no timout (0.0). ---------------------------------------------------------- - TODO items: - clean up strawman - post on lists - re-iterate on the config file problem - implement - done :-) ------------------------------------------------------------------------------ SAGA look-and-feel document: ---------------------------- scope of a look&feel document: - object - tasks - error/ tasks - session/context - attributes everything non-functional - coherent naming At 5:10, the session is closed.
participants (1)
-
Thilo Kielmann