This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12 #include <stdio.h>
13 #include "shmem.h"
14
15 #if !defined(OSHMEM_SPEC_VERSION) || OSHMEM_SPEC_VERSION < 10200
16 #error This application uses API 1.2 and up
17 #endif
18
19 int main(int argc, char* argv[])
20 {
21 int proc, nproc;
22 char name[SHMEM_MAX_NAME_LEN];
23 int major, minor;
24
25 shmem_init();
26 nproc = shmem_n_pes();
27 proc = shmem_my_pe();
28 shmem_info_get_name(name);
29 shmem_info_get_version(&major, &minor);
30
31 printf("Hello, world, I am %d of %d: %s (version: %d.%d)\n",
32 proc, nproc, name, major, minor);
33 shmem_finalize();
34
35 return 0;
36 }