This section contains functions which access the job management capabilities of HPCPortal.
Version: 1.0
Public calls: growl_jobs
Public modules: libgrowl.a
Other modules required: libbase.a, gSOAP v2.1.4
Date: 2004
Origin: Hand-Knitted Software, R.J. Allan, CCLRC Daresbury Laboratory
Language: C
Conditions on external use: Standard, see separate chapter
This module is used by including the libgrowl.a library or the libjobs.a and libbase.a libraries. Publically callable procedures are listed here.
[frame=single] int growl_runClient(char *sessionId, char *target, char *directory, char *environment, char *executable, char *arguments, char **response)
char *sessionId
On entry: unique session key as returned from growl_getDelegation. See Chapter
.
char *target
On entry: fully qualified dns name of the target computer.
char *directory
On entry: full directory path name in which the executable will run.
char *environment
On entry: any environment variables required to be passed to the target.
char *executable
On entry: full path name of the executable on the remote target.
char *arguments
On entry: and command-line arguments to be passed into tht executable.
char **response
On exit: message from Web service
Integer, 0=success, !0=failure.
SOAP error message if there is a problem.
Workspace: internal workspace is allocated in all these
routines by the gSOAP system for the long return string. This should
be freed by the user when it is no longer required.
Use of globals: none
Other routines called directly: none
Input/ output: none
Restrictions:
Notes:
Parameters to this routine are passed to HPCPortal using a Web service
remote method call. HPCPortal services are wrappers to Globus job
submission (GRAM) which is used to invoke the executable on the target
machine. Typically files should be uploaded first from another remote
server using GridFTP, see Chapter
or from the HPCPortal
server desktop, see Chapter
. The latter includes stdin.txt. After execution is complete stdout.txt and stderr.txt can be retrieved from HPCPortal.
This example runs the command /bin/ls -l on the remote
filesystem tyne.dl.ac.uk:/tmp. Output is put into the stdout.txt file on the HPCPortal desktop and can then be accessed
either via the portal or from GROWL using the Files functions, see
Chapter
.
[frame=single]
#include <stdlib.h>
#include <stdio.h>
#include "growl.h"
int main(int argc, char **argv) {
char *sessionId="f6a6d3fe-1b36-4131-8dbe-dd29a5c483c5";
char *target="tyne.dl.ac.uk";
char *directory="/tmp";
char *environment="";
char *executable="/bin/ls";
char *arguments="-l";
char *response;
int res;
res = growl_runClient(sessionId, target, directory, environment,
executable, arguments, &response);
printf("Service returned: %s\n", response);
free(response);
return 0;
}
Input data
Output data