next up previous contents index
Next: 16.3.4 Fortran Interface Up: 16.3 High-Level Primitives Previous: 16.3.2 Packing and Unpacking

16.3.3 The Packed-Message Functions

As may be apparent, many packs are followed almost immediately by sends, while corresponding receives are followed closely by unpacks. Not only is this notationally somewhat tedious, but it also limits the optimizations that can be done by Zipcode. To create a more flexible system, Zipcode provides the capability to do both the pack and communications in a single call. For instance,

 
g3_pack_send(ZIP_MAILER *g3mailer, int d1, d2, d3,
Zip_Invoice
	     *invoice)
takes care of creating the letter, packing the invoice, and sending it to grid location specified by {d1,d2,d3}. Whenever possible, use pack_send-style routines, as they will generally be more run time optimizable than pack calls followed by send calls.

Packed versions of collective operations are also provided. Here is the specific syntax for the G2, two-dimensional-grid pack combine:

    
int g2_pack_combine(ZIP_MAILER *g2mlr, Zip_Invoice *invoice, 
                    void (*func()) )



Guy Robinson
Wed Mar 1 10:19:35 EST 1995