Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 8fa79b4a2852fdddefdcdb92d68b9c09 > files > 133

lib64openmpi-devel-2.1.1-4.1.mga6.x86_64.rpm

/*
 * Copyright (c) 2014-2016 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>

int main(void)
{
    long *x;

    shmem_init();

    x = (long *) shmem_malloc(sizeof(*x));

    shmem_free(x);

    shmem_finalize();
}