home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / parallel / 2789 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.2 KB  |  59 lines

  1. Newsgroups: comp.parallel
  2. Path: sparky!uunet!gatech!hubcap!fpst
  3. From: pestep@convex.com (Pat Estep)
  4. Subject: Re: PVM's rcvinfo() function.
  5. Message-ID: <1992Dec21.205055.23644@hubcap.clemson.edu>
  6. Apparently-To: hypercube@hubcap.clemson.edu
  7. X-Disclaimer: This message was written by a user at CONVEX Computer
  8.               Corp. The opinions expressed are those of the user and
  9.               not necessarily those of CONVEX.
  10. Sender: usenet@neptune.convex.com (news access account)
  11. Nntp-Posting-Host: rigel.convex.com
  12. Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
  13. References: <1992Dec21.132806.24272@hubcap.clemson.edu>
  14. Date: Mon, 21 Dec 1992 20:12:28 GMT
  15. Approved: parallel@hubcap.clemson.edu
  16. Lines: 41
  17.  
  18. In article <1992Dec21.132806.24272@hubcap.clemson.edu> <ruucp@samsung.com> writes:
  19. >Hi;
  20. >
  21. >In the master program i a doing a >>>>putbytes(image, 262144);
  22. >Then snd() to slave. In the slave when i do rcvinfo() it
  23. >returns message size as 262152. (Possibly 2 ints).
  24. >
  25. >Can anyone explain this? I understand there will be padding/stripping
  26. >at lower levels, but does it reflect at the user level? Do i have
  27. >to strip off some headers etc?
  28. >
  29. >Thanx in advance.
  30. >
  31. >/ajay
  32. >email: kalhan@usl.edu
  33. >
  34.   internally, the putbytes call first puts an integer which indicates
  35.   the number of bytes, then the actual number of bytes specified.
  36.   the integer value is not available to the user.
  37.  
  38.   the kicker is that then it sets the buffer position to a word (4 byte)
  39.   boundary.  this makes it impossible for your application to determine
  40.   exactly how many bytes were put.  you just have to know.
  41.  
  42.   for example, if you did the following:
  43.     putbytes(buffer, 1)
  44.   then rcvinfo would return a length of 8.
  45.  
  46.   similarly, if you did a
  47.     putbytes(buffer, 4)
  48.   then rcvinfo would again return a length of 8.
  49.  
  50.   the moral to the story is that in pvm, you can't query to see what's
  51.   in the incoming buffer or how much is in the buffer.  the receiving
  52.   program has to know.
  53. -- 
  54. Pat Estep                               System Integration and Support
  55. Convex Computer Corporation
  56. 3000 Waterview Parkway                  Email: pestep@convex.com
  57. Richardson, TX 75080                    Voice: (214) 497-4814
  58.  
  59.