Exemple #1
0
static void handle_help_request_and_exit(int argi, int argc, char **argv)
{
    int i, n, *ids=0;;
    FILE *outFILE = (isatty(2) ? stderr : stdout);

    MACSIO_IFACE_GetIds(&n, &ids);
    for (i = 0; i < n; i++)
    {
        const MACSIO_IFACE_Handle_t *iface = MACSIO_IFACE_GetById(ids[i]);
        if (iface->processArgsFunc)
        {
            fprintf(outFILE, "\nOptions specific to the \"%s\" I/O plugin\n", iface->name);
            (*(iface->processArgsFunc))(argi, argc, argv);
        }
    }
#ifdef HAVE_MPI
    {   int result;
        if ((MPI_Initialized(&result) == MPI_SUCCESS) && result)
            MPI_Finalize();
    }
#endif
    exit(0);
}
Exemple #2
0
MACSIO_IFACE_Handle_t const *MACSIO_IFACE_GetByName(char const *name)
{
    int id = MACSIO_IFACE_GetId(name);
    if (id < 0) return 0;
    return MACSIO_IFACE_GetById(id);
}