1
1
openmpi/examples/oshmem_shmalloc.c
Igor Ivanov 07e79441b3 oshmem: Align OSHMEM API with spec v1.2 (change examples)
ring_oshmem_c.c and hello_oshmem_c.c support new api
other examples support legacy api but warning message
is provided during compilation
2015-11-24 18:58:28 +02:00

31 строка
544 B
C

/*
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This sample allocates (shmalloc) symmetric memory (1 long integer),
* and then frees it. Success of allocation is not checked.
*
* Produces no output.
*/
#include <shmem.h>
#warning This application uses deprecated API see http://www.open-mpi.org/
int main(void)
{
long *x;
start_pes(0);
x = (long *) shmalloc(sizeof(*x));
shfree(x);
}