-
Notifications
You must be signed in to change notification settings - Fork 868
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2102 from ggouaillardet/topic/oshCC
oshmem: add C++ wrapper compilers
- Loading branch information
Showing
7 changed files
with
173 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2014 Mellanox Technologies, Inc. | ||
* All rights reserved. | ||
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. | ||
* Copyright (c) 2017 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
#include <iostream> | ||
#include "shmem.h" | ||
|
||
#if !defined(OSHMEM_SPEC_VERSION) || OSHMEM_SPEC_VERSION < 10200 | ||
#error This application uses API 1.2 and up | ||
#endif | ||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
int proc, nproc; | ||
char name[SHMEM_MAX_NAME_LEN]; | ||
int major, minor; | ||
|
||
shmem_init(); | ||
nproc = shmem_n_pes(); | ||
proc = shmem_my_pe(); | ||
shmem_info_get_name(name); | ||
shmem_info_get_version(&major, &minor); | ||
|
||
std::cout << "Hello, world, I am " << proc << " of " << nproc << ": " << name | ||
<< " (version: " << major << "." << minor << ")" << std::endl; | ||
|
||
shmem_finalize(); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.