2013-10-25 09:25:41 +04:00
|
|
|
/*
|
2014-04-19 09:03:44 +04:00
|
|
|
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
2013-10-25 09:25:41 +04:00
|
|
|
* All rights reserved.
|
2015-05-04 17:47:53 +03:00
|
|
|
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
2013-10-25 09:25:41 +04:00
|
|
|
* $COPYRIGHT$
|
2015-05-04 17:47:53 +03:00
|
|
|
*
|
2013-10-25 09:25:41 +04:00
|
|
|
* Additional copyrights may follow
|
2015-05-04 17:47:53 +03:00
|
|
|
*
|
2013-10-25 09:25:41 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "shmem.h"
|
|
|
|
|
2015-11-24 13:20:58 +03:00
|
|
|
#if !defined(OSHMEM_SPEC_VERSION) || OSHMEM_SPEC_VERSION < 10200
|
|
|
|
#error This application uses API 1.2 and up
|
|
|
|
#endif
|
|
|
|
|
2013-10-25 09:25:41 +04:00
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
int proc, nproc;
|
2015-11-19 17:34:15 +03:00
|
|
|
char name[SHMEM_MAX_NAME_LEN];
|
|
|
|
int major, minor;
|
2014-02-27 18:02:30 +04:00
|
|
|
|
2015-11-19 17:34:15 +03:00
|
|
|
shmem_init();
|
|
|
|
nproc = shmem_n_pes();
|
|
|
|
proc = shmem_my_pe();
|
|
|
|
shmem_info_get_name(name);
|
|
|
|
shmem_info_get_version(&major, &minor);
|
2013-10-25 09:25:41 +04:00
|
|
|
|
2015-11-19 17:34:15 +03:00
|
|
|
printf("Hello, world, I am %d of %d: %s (version: %d.%d)\n",
|
|
|
|
proc, nproc, name, major, minor);
|
|
|
|
shmem_finalize();
|
2013-10-25 09:25:41 +04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|