root/ompi/mca/io/romio321/romio/adio/ad_panfs/ad_panfs_hints.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ADIOI_PANFS_SetInfo

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /* 
   3  *   ad_panfs_hints.c
   4  *
   5  *   Copyright (C) 2001 University of Chicago.
   6  *   See COPYRIGHT notice in top-level directory.
   7  */
   8 
   9 #include "ad_panfs.h"
  10 #include <pan_fs_client_cw_mode.h>
  11 #include "hint_fns.h"
  12 
  13 void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
  14 {
  15 #if defined(MPICH) || !defined(PRINT_ERR_MSG)
  16     static char myname[] = "ADIOI_PANFS_SETINFO";
  17 #endif
  18     int gen_error_code;
  19 
  20     *error_code = MPI_SUCCESS;
  21 
  22     if (fd->info == MPI_INFO_NULL) {
  23             /* This must be part of the open call. can set striping parameters 
  24          * if necessary. 
  25          */ 
  26             MPI_Info_create(&(fd->info));
  27 
  28         /* anticipate concurrent writes in an MPI-IO application */
  29         ADIOI_Info_set (fd->info, "panfs_concurrent_write", "1");
  30 
  31         /* has user specified striping parameters 
  32                and do they have the same value on all processes? */
  33         if (users_info != MPI_INFO_NULL) {
  34 
  35             ADIOI_Info_check_and_install_int(fd, users_info, "panfs_concurrent_write",
  36                     NULL, myname, error_code);
  37 
  38             ADIOI_Info_check_and_install_int(fd, users_info, "panfs_layout_type",
  39                     NULL, myname, error_code);
  40 
  41             ADIOI_Info_check_and_install_int(fd, users_info, "panfs_layout_stripe_unit",
  42                     NULL, myname, error_code);
  43 
  44             /* strange: there was a check "layout_type ==
  45              * PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE, but
  46              * nothing ever touched layout_type  */
  47             ADIOI_Info_check_and_install_int(fd, users_info,
  48                     "panfs_layout_parity_stripe_width", NULL, myname, error_code);
  49 
  50             ADIOI_Info_check_and_install_int(fd, users_info,
  51                     "panfs_layout_parity_stripe_depth", NULL, myname, error_code);
  52 
  53             ADIOI_Info_check_and_install_int(fd, users_info,
  54                     "panfs_layout_total_num_comps", NULL, myname, error_code);
  55             /* this hint used to check for
  56              * PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE or
  57              * PAN_FS_CLIENT_LAYOUT_TYPE__RAID10, but again, layout_type never
  58              * gets updated */
  59             ADIOI_Info_check_and_install_int(fd, users_info,
  60                     "panfs_layout_visit_policy", NULL, myname, error_code);
  61         }
  62     }
  63 
  64     ADIOI_GEN_SetInfo(fd, users_info, &gen_error_code); 
  65     /* If this function is successful, use the error code returned from ADIOI_GEN_SetInfo
  66      * otherwise use the error_code generated by this function
  67      */
  68     if(*error_code == MPI_SUCCESS)
  69     {
  70         *error_code = gen_error_code;
  71     }
  72 }

/* [<][>][^][v][top][bottom][index][help] */