MPIBlib: MPI Benchmark library

Options for executables


Detailed Description

Since getopt cannot be reused, this module provides an interface for getopt, which can be used as follows:

    X x;
    Y y;
    MPIB_getopt_x_default(&x);
    MPIB_getopt_y_default(&y);
    if (root == 0)
    {
        char options[256] = "";
        strcat(options, MPIB_getopt_x_options());
        strcat(options, MPIB_getopt_y_options());
        while ((c = getopt(argc, argv, options)) != -1)
        {
            MPIB_getopt_x_optarg(c, &x);
            MPIB_getopt_y_optarg(c, &y);
        }
    }
    MPIB_getopt_x_bcast(&x, 0, MPI_COMM_WORLD);
    MPIB_getopt_y_bcast(&y, 0, MPI_COMM_WORLD);

Options are divided into sets, which are managed by the following functions:

  • MPIB_getopt_X_default - fills the parameters by default values
  • MPIB_getopt_X_options - returns a string of the getopt options
  • MPIB_getopt_X_optarg - fills the parameters by the getopt argument
  • MPIB_getopt_X_bcast - broadcasts the parameters (parallel) where X stands for a name of the set.

Typical options for executables are as follows:

  • -h help
  • -v verbose
  • -l S collectives shared library (required: a full path or relative to LD_LIBRARY_PATH)
  • -o S suboptions (comma separated options for the shared library: subopt1,subopt2=value2)
  • -O S collective operation defined in the shared library (required: the name must contain Bcast, Scatter, etc)
  • -t S timing: max, root, global (default: max)
  • -m I minimum message size (default: 0)
  • -M I maximum message size (default: 204800)
  • -S I stride between message sizes (default: 1024)
  • -d D maximum relative difference: 0 < D < 1 (default: 0.1)
  • -s I minimum stride between message sizes (default: 64)
  • -n I maximum number of message sizes (default: 100)
  • -p 0/1 parallel p2p benchmarking (default: 1)
  • -r I minimum number of repetitions (default: 5)
  • -R I maximum number of repetitions (default: 100)
  • -c D confidence level: 0 < D < 1 (default: 0.95)
  • -e D relative error: 0 < D < 1 (default: 0.025)
  • -p I parallel mode or not: 0 / 1 (default: 0)
  • -P I type of P2P experiments: 0 is default, 1 is scatter/gather based P2P: 0 / 1 (default: 0). Note: If using -P 1 you have to be in the <install-dir>/bin directory

where:

  • S - string
  • I - integer
  • D - double