 
  
  
  
  
 
The basic mailer manipulation commands (such as g1_grid_open()) require the specification of process lists, currently as ordered pairs of nodes and process IDs packaged within a ZIP_ADDRESSEES structure. For application convenience, we supply optional commands to support the creation of such collections. One common collection is a cohort, a set of processes with the same process ID, distributed across a number of nodes. A cohort is often used to formulate a single-program, multiple-data (SPMD) calculation.
Cohort list creation:
    ZIP_ADDRESSEES *addressees = 
        zip_new_cohort(int N,          
              /* number of processes involved */
              int node_bias,  
              /* node number of zeroth entry in list */
              int cohort_pid, 
              /* process ID of entire collection of processes */
              int host_flag); 
              /* flags whether host process participates */
Additionally, we provide a Zipcode-level spawn mechanism:
    int result = zip_spawn(
                 char *prog_name,            
                 /* ASCII name of program to spawn */
                 ZIP_ADDRESSEES *addressees, 
                 /* addressee list to spawn */
                 void *state,                
                 /* future expansion */
                 int pm_flag);               
                 /* flags if program is spawned on zeroth 
                    addressee */
where result is nonzero on failure.  Most implementations
require  that this spawning function be effected in the host process,
although the original CE/R system did not make this restriction.  A
compatible zip_kill() is also defined:
result = zip_kill(addressees);With the addition of these functions, Zipcode specifies an entire programming environment that can be completely divorced, if desired, from its original foundations in the CE/RK. This is possible so long as one can emulate appropriate CE/RK functions for Zipcode to use. This has been accomplished in release 2.0 of nCUBE's 6400 system software, for instance.