next up previous contents
Next: Detailed Examples Up: The Case of OOC Previous: Dealing with OOC index-arrays   Contents


Irregular distribution

As in the case of in-core data (Subsection [*]), the library also provides an out-of-core version of the partitioner . The irregular out-of-core mapping is achieved by a LIP_create_hilbert_distribution_OOC call as shown in the Fig. [*]. In comparison to in-core version of data remapping, there is no need to call communication routines explicitly in order to redistribute data. Instead, one can call LIP_remap_OOC with a respective flag. The rest of the pseudocode is similar to that from Fig. [*].


Figure: Simplified C code that shows the use of parallel computation on irregularly distributed out-of-core data array with the use of lip .

  MPI_Init( /* ... */ );
  LIP_Setup( /* ... */ );

  /* Generate index array describing
   * relationships between user data */

  /*Create of the irregular distribution*/  
  LIP_create_hilbert_distribution_OOC(
                          datamap,...);
  
  /*Actually move data*/
  LIP_remap_ooc(datamap,...);
  
  /* Perform irregular computation
   * on the data */
  for ( /* ... */ )
  {
    /* read i-section's indices 
     * from a file */

    /* Inspector Phase (computes 
     * optimized communication 
     * and disk-memory mapping pattern)*/
    LIP_Localize(datamap,schedule,... );
    LIP_OOC_Localize(schedule,IObufmap,...);
    
    /* Create MPI derived datatypes  
     * for moving data between
     * the memory and the disk */
    LIP_IObufmap_get_datatype(IOBufmap,...);

    
    /* Executor Phase (performs 
       communication and computation) */
    
    /* Exchange data between disk and memory 
     * in order to store in the memory
     * the data that will be needed
     * in this i-section */ 
    MPI_File_write( /* ... */ );
    MPI_File_read( /* ... */ );
    
    /* gather non-local irregular data */
    LIP_Gather(schedule,...);

    /* perform computation on data */
    for ( i = /* ... */ )
    {
      k = edge[i];
      y[k] = f( x[k] );
    }

    /* scatterer non-local
     * irregular data (results) */
    LIP_Scatter(schedule,... );
  }

  /* Get MPI derived datatypes for moving    
   * the data obtained in the last 
   * iteration from the memory
   * to the disk  */
  LIP_IObufmap_get_datatype(IOBufmap,... );
  
  /* Store the data on a disk */
  MPI_File_write( /* ... */ );

  LIP_Exit( /* ... */ );
  MPI_Finalize( /* ... */ );


next up previous contents
Next: Detailed Examples Up: The Case of OOC Previous: Dealing with OOC index-arrays   Contents
Created by Katarzyna Zając