1INITSEND(3PVM) PVM Version 3.4 INITSEND(3PVM)
2
3
4
6 pvm_initsend - Clear default send buffer and specify message encoding.
7
8
10 C int bufid = pvm_initsend( int encoding )
11
12 Fortran call pvmfinitsend( encoding, bufid )
13
14
16 encoding
17 Integer specifying the next message's encoding scheme.
18 Options in C are:
19 Encoding value MEANING
20 PvmDataDefault 0 XDR
21 PvmDataRaw 1 no encoding
22 PvmDataInPlace 2 data left in place
23
24 Option names are in Fortran are:
25 Encoding value MEANING
26 PVMDEFAULT 0 XDR
27 PVMRAW 1 no encoding
28 PVMINPLACE 2 data left in place
29
30 bufid Integer returned containing the message buffer identifier.
31 Values less than zero indicate an error.
32
33
35 The routine pvm_initsend clears the send buffer and prepares it for
36 packing a new message. The encoding scheme used for the packing is set
37 by encoding. XDR encoding is used by default because PVM can not know
38 if the user is going to add a heterogeneous machine before this message
39 is sent. If the user knows that the next message will only be sent to
40 a machine that understands the native format, then he can use Pvm‐
41 DataRaw encoding and save on encoding costs.
42
43 PvmDataInPlace encoding specifies that data be left in place during
44 packing. The message buffer only contains the sizes and pointers to
45 the items to be sent. When pvm_send is called the items are copied
46 directly out of the user's memory. This option decreases the number of
47 times a message is copied at the expense of requiring the user to not
48 modify the items between the time they are packed and the time they are
49 sent.
50
51 If pvm_initsend is successful, then bufid will contain the message buf‐
52 fer identifier. If some error occurs then bufid will be < 0.
53
54
56 PvmDataInPlace allows only dense (stride = 1) data in version 3.3. It
57 cannot be used on shared memory (*MP) architectures; a PvmNotImpl error
58 will occur at send time.
59
60
62 C:
63 bufid = pvm_initsend( PvmDataDefault );
64 info = pvm_pkint( array, 10, 1 );
65 msgtag = 3 ;
66 info = pvm_send( tid, msgtag );
67
68 Fortran:
69 CALL PVMFINITSEND(PVMRAW, BUFID)
70 CALL PVMFPACK( REAL4, DATA, 100, 1, INFO )
71 CALL PVMFSEND( TID, 3, INFO )
72
73
75 These error conditions can be returned by pvm_initsend
76
77 PvmBadParam
78 giving an invalid encoding value
79
80 PvmNoMem
81 Malloc has failed. There is not enough memory to create the buf‐
82 fer
83
85 pvm_mkbuf(3PVM)
86
87
88
89 30 August, 1993 INITSEND(3PVM)