File: app.c

package info (click to toggle)
prrte 3.0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,128 kB
  • sloc: ansic: 80,431; sh: 4,289; perl: 3,195; makefile: 1,829; lex: 352; python: 239
file content (33 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <pmix.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    int pause = 0;
    if (argc > 1) {
        pause = atoi(argv[1]);
    }

    pmix_proc_t proc;
    pmix_status_t rc = PMIX_ERROR;

    rc = PMIx_Init(&proc, NULL, 0);
    if (rc != PMIX_SUCCESS) {
        fprintf(stderr, "PMIx_Init failed: %s\n", PMIx_Error_string(rc));
        return EXIT_FAILURE;
    }

    printf("Hello\n");

    sleep(pause);

    printf("Bye\n");

    rc = PMIx_Finalize(NULL, 0);
    if (rc != PMIX_SUCCESS) {
        fprintf(stderr, "PMIx_Finalize failed: %s\n", PMIx_Error_string(rc));
        return EXIT_FAILURE;
    }
    return EXIT_SUCCESS;
}