oshmem: Align OSHMEM API with spec v1.2 (change examples)
Этот коммит содержится в:
родитель
2dc2159b4c
Коммит
af6ce46f6b
@ -15,13 +15,18 @@
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int proc, nproc;
|
||||
char name[SHMEM_MAX_NAME_LEN];
|
||||
int major, minor;
|
||||
|
||||
start_pes(0);
|
||||
nproc = _num_pes();
|
||||
proc = _my_pe();
|
||||
shmem_init();
|
||||
nproc = shmem_n_pes();
|
||||
proc = shmem_my_pe();
|
||||
shmem_info_get_name(name);
|
||||
shmem_info_get_version(&major, &minor);
|
||||
|
||||
printf("Hello, world, I am %d of %d\n",
|
||||
proc, nproc);
|
||||
printf("Hello, world, I am %d of %d: %s (version: %d.%d)\n",
|
||||
proc, nproc, name, major, minor);
|
||||
shmem_finalize();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,11 +13,17 @@ program hello_oshmem
|
||||
include 'shmem.fh'
|
||||
|
||||
integer proc, nproc
|
||||
integer my_pe, num_pes
|
||||
integer shmem_my_pe, shmem_n_pes
|
||||
integer major, minor, len
|
||||
character(len=SHMEM_MAX_NAME_LEN) name
|
||||
|
||||
call START_PES(0)
|
||||
proc = MY_PE()
|
||||
nproc = NUM_PES()
|
||||
call SHMEM_INIT()
|
||||
proc = SHMEM_MY_PE()
|
||||
nproc = SHMEM_N_PES()
|
||||
call SHMEM_INFO_GET_VERSION(major, minor)
|
||||
call SHMEM_INFO_GET_NAME(name)
|
||||
|
||||
write(*, '("Hello, world, I am ", i2, " of ", i2, ": (version: ", i0, ".", i0, ")")') proc, nproc, major, minor
|
||||
call SHMEM_FINALIZE()
|
||||
|
||||
write(*, '("Hello, world, I am ", i2, " of ", i2)') proc, nproc
|
||||
end program hello_oshmem
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user