next up previous contents index
Next: B.5 Header-Datei ERROR.h Up: B Header Dateien und Previous: B.3 PVM C Header

B.4 PVM Definition Modul

(* ----------------------------------------------------------------------------
 * Id: pvm33.md,v 1.1 1994/10/06 14:13:39 kredel Exp
 * ----------------------------------------------------------------------------
 * Copyright (c) 1993 - 1994 Universitaet Mannheim
 * ----------------------------------------------------------------------------
 * Log: pvm33.md,v
 * Revision 1.1  1994/10/06  14:13:39  kredel
 * Intermediate pvm33 interface
 *
 * ----------------------------------------------------------------------------
 *)
 
FOREIGN MODULE pvm33;

(* PVM Version 3.3 Foreign Module. *)

FROM KSR1 IMPORT int; 

FROM SYSTEM IMPORT ADDRESS;


CONST rcsid = "$Id: pvm33.md,v 1.1 1994/10/06 14:13:39 kredel Exp $";
CONST copyright = "Copyright (c) 1993 - 1994 Universitaet Mannheim";


(*For the definitions compare pvm3.3/include/pvm3.h  *)

(* Data packing styles for pvm_initsend *) 

CONST   PvmDataDefault  = 0;
CONST   PvmDataRaw      = 1;
CONST   PvmDataInPlace  = 2;
CONST   PvmDataFoo      = 3;


(* pvm_spawn options *)

CONST   PvmTaskDefault  = 0;
CONST   PvmTaskHost     = 1;    (* specify host *)
CONST   PvmTaskArch     = 2;    (* specify architecture *)
CONST   PvmTaskDebug    = 4;    (* start task in debugger *)
CONST   PvmTaskTrace    = 8;    (* process generates trace data *)
(* for MPP ports *)
CONST	PvmMppFront	= 16;	(* spawn task on service node *)
CONST	PvmHostCompl	= 32;	(* complement host set *)


(* pvm_notify types *)

CONST   PvmTaskExit     = 1;    (* on task exit *)
CONST   PvmHostDelete   = 2;    (* on host fail/delete *)
CONST   PvmHostAdd      = 3;    (* on host startup *)


(* for pvm_setopt and pvm_getopt *)

CONST	PvmRoute	= 1;	(* routing policy *)
CONST	PvmDontRoute	= 1;	(* don't allow direct task-task links *)
CONST	PvmAllowDirect	= 2;	(* allow direct links, but don't request *)
CONST	PvmRouteDirect	= 3;	(* request direct links *)
CONST	PvmDebugMask	= 2;	(* debugmask *)
CONST	PvmAutoErr	= 3;	(* auto error reporting *)
CONST	PvmOutputTid	= 4;	(* stdout destination for children *)
CONST	PvmOutputCode	= 5;	(* stdout message tag *)
CONST	PvmTraceTid	= 6;	(* trace destination for children *)
CONST	PvmTraceCode	= 7;	(* trace message tag *)
CONST	PvmFragSize	= 8;	(* message fragment size *)
CONST	PvmResvTids	= 9;	(* allow reserved message tids and codes *)
CONST	PvmSelfOutputTid  = 10;	(* stdout destination for task *)
CONST	PvmSelfOutputCode = 11;	(* stdout message tag *)
CONST	PvmSelfTraceTid	  = 12;	(* trace destination for task *)
CONST	PvmSelfTraceCode  = 13;	(* trace message tag *)


(* for pvm_[sg]ettmask *)

CONST	PvmTaskSelf	= 0;	(* this task *)
CONST	PvmTaskChild	= 1;	(* (future) child tasks *)


(* Libpvm error codes *)

CONST   PvmOk           = 0;    (* okay *)
                                (* reserve -1 *)
CONST   PvmBadParam     = -2;   (* bad parameter (neg msg id, etc) *)
CONST   PvmMismatch     = -3;   (* barrier count mismatch *)
CONST   PvmNoData       = -5;   (* read past end of buffer *)
CONST   PvmNoHost       = -6;   (* no such host *)
CONST   PvmNoFile       = -7;   (* no such executable *)
CONST   PvmNoMem        = -10;  (* can't get memory *)
CONST   PvmBadMsg       = -12;  (* received msg can't be decoded *)
CONST   PvmSysErr       = -14;  (* can't contact our pvmd/some system error *)
CONST   PvmNoBuf        = -15;  (* no current buffer *)
CONST   PvmNoSuchBuf    = -16;  (* bad message id *)
CONST   PvmNullGroup    = -17;  (* null group name is illegal *)
CONST   PvmDupGroup     = -18;  (* already in group *)
CONST   PvmNoGroup      = -19;  (* no group with name *)
CONST   PvmNotInGroup   = -20;  (* task not in group *)
CONST   PvmNoInst       = -21;  (* no such instance in group *)
CONST   PvmHostFail     = -22;  (* host failed *)
CONST   PvmNoParent     = -23;  (* no parent task *)
CONST   PvmNotImpl      = -24;  (* function not implemented *)
CONST   PvmDSysErr      = -25;  (* pvmd system error *)
CONST   PvmBadVersion   = -26;  (* pvmd-pvmd protocol version mismatch *)
CONST   PvmOutOfRes     = -27;  (* out of resources *)
CONST   PvmDupHost      = -28;  (* host already configured *)
CONST   PvmCantStart    = -29;  (* failed to exec new slave pvmd *)
CONST   PvmAlready      = -30;  (* already doing operation *)
CONST   PvmNoTask       = -31;  (* no such task *)
CONST   PvmNoEntry      = -32;  (* no such name, index pair *)
CONST   PvmDupEntry     = -33;  (* name, index pair already exists *)


(* Data types for pvm_reduce(), pvm_psend(), pvm_precv() *)

CONST	PVM_STR		=  0;	(* string *)
CONST	PVM_BYTE	=  1;	(* byte *)
CONST	PVM_SHORT	=  2;	(* short *)
CONST	PVM_INT		=  3;	(* int *)
CONST	PVM_FLOAT	=  4;	(* real *)
CONST	PVM_CPLX	=  5;	(* complex *)
CONST	PVM_DOUBLE	=  6;	(* double *)
CONST	PVM_DCPLX	=  7;	(* double complex *)
CONST	PVM_LONG	=  8;	(* long integer *)
CONST	PVM_USHORT	=  9;	(* unsigned short int *)
CONST	PVM_UINT	= 10;	(* unsigned int *)
CONST	PVM_ULONG	= 11;	(* unsigned long int *)


(* PVM type definitions *) 

TYPE pvmhostinfo = RECORD         (* returned by pvm_config *)
     hi_tid   : int;              (* pvmd tid *)
     hi_name  : POINTER TO CHAR;  (* host name *)
     hi_arch  : POINTER TO CHAR;  (* host arch *)
     hi_speed : int;              (* cpu relative speed *)
                END; 

TYPE pvmtaskinfo = RECORD         (* returned by pvm_tasks *)
     ti_tid   : int;              (* task id *)
     ti_ptid  : int;              (* parent tid *)
     ti_host  : int;              (* pvmd tid *)
     ti_flag  : int;              (* status flags *)   
     ti_a_out : POINTER TO CHAR;  (* a.out name *)
     ti_pid   : int;              (* task (O/S dependent) process id *)
                END; 

TYPE compfunc = PROCEDURE ((*mid:*) int, (*tid:*) int, (*msgtag:*) int): int; 
(* comparison function to accept messages *) 

TYPE redufunc = PROCEDURE ( VAR (*datatype:*) int,
                            VAR (*x:*) ADDRESS, VAR (*y:*) ADDRESS,
                            VAR (*num:*) int, VAR (*info:*) int ); 
(* function for pvm_reduce *) 

TYPE ptrtchr = POINTER TO CHAR; 

(* PVM functions *)

PROCEDURE pvm_addhosts   ( names: ADDRESS; count: int; svp: ADDRESS ): int;
PROCEDURE pvm_archcode   ( xx: ptrtchr ): int;
PROCEDURE pvm_barrier    ( group: ptrtchr; count: int ): int;
PROCEDURE pvm_bcast      ( group: ptrtchr; msgtag: int ): int;
PROCEDURE pvm_bufinfo    ( mid: int; VAR len: int; VAR msgtag: int; 
                           VAR tid: int ): int;
PROCEDURE pvm_catchout   ( (* VAR ff: FILE *) ): int;
PROCEDURE pvm_config     ( VAR nhost: int; VAR narchp: int; VAR hostp: ADDRESS ): int;
PROCEDURE pvm_delete     ( name: ptrtchr; req: int ): int;
PROCEDURE pvm_delhosts   ( names: ADDRESS; count: int; svp: ADDRESS ): int;
PROCEDURE pvm_exit       ( ): int;
PROCEDURE pvm_freebuf    ( mid: int ): int;
PROCEDURE pvm_gather     ( x1: ADDRESS; x2: ADDRESS; i1: int; i2: int; i3: int; 
                           s: ptrtchr; i4: int): int;
PROCEDURE pvm_getfds     ( VAR x: ADDRESS ): int;
PROCEDURE pvm_getinst    ( group: ptrtchr; tid: int ): int;
PROCEDURE pvm_getmwid    ( i: int ): int;
PROCEDURE pvm_getopt     ( what: int ): int;
PROCEDURE pvm_getrbuf    ( ): int;
PROCEDURE pvm_getsbuf    ( ): int;
PROCEDURE pvm_gettid     ( group: ptrtchr; inst: int ): int;
PROCEDURE pvm_gsize      ( group: ptrtchr ): int;
PROCEDURE pvm_halt       ( ): int;
PROCEDURE pvm_hostsync	 ( host: int; VAR clk: ADDRESS (*struct timeval*);
                           VAR delta: ADDRESS (*struct timeval*) ): int;
PROCEDURE pvm_initsend   ( encod: int ): int;
PROCEDURE pvm_insert     ( name: ptrtchr; req: int; data: int ): int;
PROCEDURE pvm_joingroup  ( group: ptrtchr ): int;
PROCEDURE pvm_kill       ( tid: int ): int;
PROCEDURE pvm_lookup     ( name: ptrtchr; req: int; VAR datap: int ): int;
PROCEDURE pvm_lvgroup    ( group: ptrtchr ): int;
PROCEDURE pvm_mcast      ( tids: ADDRESS; count: int; msgtag: int ): int;
PROCEDURE pvm_mkbuf      ( encod: int ): int;
PROCEDURE pvm_mstat      ( host: ptrtchr ): int;
PROCEDURE pvm_mytid      ( ): int;
PROCEDURE pvm_notify     ( what: int; msgtag: int; count: int; vals: ADDRESS ): int;
PROCEDURE pvm_nrecv      ( tid: int; msgtag: int ): int;
PROCEDURE pvm_parent     ( ): int;
PROCEDURE pvm_perror     ( msg: ptrtchr ): int;

PROCEDURE pvm_packf      ( cp: ptrtchr (* ... *) ): int;
PROCEDURE pvm_pkbyte     ( cp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkcplx     ( xp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkdcplx    ( zp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkdouble   ( dp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkfloat    ( fp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkint      ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pklong     ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkshort    ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkstr      ( cp: ptrtchr ): int;
PROCEDURE pvm_pkuint     ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkulong    ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_pkushort   ( np: ADDRESS; cnt: int; std: int ): int;

PROCEDURE pvm_precv      ( tid: int; msgtag: int;
                           VAR buf: ADDRESS; len: int; datatype: int; 
                           VAR sid: int; VAR atag: int; VAR alen: int ): int;
PROCEDURE pvm_probe      ( tid: int; msgtag: int ): int;
PROCEDURE pvm_psend      ( tid: int; msgtag: int;
                           VAR buf: ADDRESS; len: int; datatype: int ): int;
PROCEDURE pvm_pstat      ( tid: int ): int;
PROCEDURE pvm_recv       ( tid: int; msgtag: int ): int;
PROCEDURE pvm_recvf      ( new: compfunc ): compfunc;
PROCEDURE pvm_reduce     ( func: redufunc; 
                           VAR data: ADDRESS; count: int; datatype: int;
                           msgtag: int; group: ptrtchr; root: int ): int;
PROCEDURE PvmMax         ( VAR datatype: int; VAR x: ADDRESS; VAR y: ADDRESS;
                           VAR num: int; VAR info: int ); 
PROCEDURE PvmMin         ( VAR datatype: int; VAR x: ADDRESS; VAR y: ADDRESS;
                           VAR num: int; VAR info: int ); 
PROCEDURE PvmSum         ( VAR datatype: int; VAR x: ADDRESS; VAR y: ADDRESS;
                           VAR num: int; VAR info: int ); 
PROCEDURE PvmProduct     ( VAR datatype: int; VAR x: ADDRESS; VAR y: ADDRESS;
                           VAR num: int; VAR info: int ); 
PROCEDURE pvm_reg_hoster ( ): int;
PROCEDURE pvm_reg_rm     ( VAR hi: ADDRESS (* pvmhostinfo *) ): int;
PROCEDURE pvm_reg_tasker ( ): int;
PROCEDURE pvm_scatter    ( x1: ADDRESS; x1: ADDRESS; i1: int; i2: int; i3: int; 
                           s: ptrtchr; i4: int): int;
PROCEDURE pvm_send       ( tid: int; msgtag: int ): int;
PROCEDURE pvm_sendsig    ( tid: int; signum: int ): int;
PROCEDURE pvm_setmwid    ( x: int; y: int ): int;
PROCEDURE pvm_setopt     ( what: int; val: int ): int;
PROCEDURE pvm_setrbuf    ( mid: int ): int;
PROCEDURE pvm_setsbuf    ( mid: int ): int;
PROCEDURE pvm_spawn      ( file: ptrtchr; argv: ADDRESS; flags: int; where: ptrtchr; 
                           count: int; tids: ADDRESS ): int;
PROCEDURE pvm_start_pvmd ( argc: int; argv: ADDRESS ): int;
PROCEDURE pvm_tasks      ( where: int; VAR ntaskp: int; VAR taskp: ADDRESS ): int;
PROCEDURE pvm_tickle     ( narg: int; VAR argp: int; nresp: ADDRESS; 
                           VAR resp: int ): int;
PROCEDURE pvm_tidtohost  ( tid: int ): int;
PROCEDURE pvm_trecv      ( tid: int; msgtag: int; VAR tim: ADDRESS (*timeval*) ): int;

PROCEDURE pvm_unpackf    ( cp: ADDRESS (* ... *) ): int;
PROCEDURE pvm_upkbyte    ( cp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkcplx    ( xp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkdcplx   ( zp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkdouble  ( dp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkfloat   ( fp: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkint     ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upklong    ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkshort   ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkstr     ( cp: ptrtchr ): int;
PROCEDURE pvm_upkuint    ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkulong   ( np: ADDRESS; cnt: int; std: int ): int;
PROCEDURE pvm_upkushort  ( np: ADDRESS; cnt: int; std: int ): int;

PROCEDURE pvm_version    ( ): ptrtchr;


END pvm33.
(* -EOF- *)



parallel@rz.uni-mannheim.de
Mon Okt 28 14:38:25 PST 1996