2013-09-10 15:34:09 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2013-09-10 15:34:09 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2013-09-10 15:34:09 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "oshmem_config.h"
|
|
|
|
|
|
|
|
#include "opal/runtime/opal_cr.h"
|
|
|
|
|
|
|
|
#include "oshmem/constants.h"
|
|
|
|
#include "oshmem/include/shmem.h"
|
|
|
|
#include "oshmem/runtime/runtime.h"
|
|
|
|
|
2014-05-14 13:13:30 +00:00
|
|
|
#if OSHMEM_PROFILING
|
|
|
|
#include "oshmem/include/pshmem.h"
|
|
|
|
#pragma weak shmem_finalize = pshmem_finalize
|
|
|
|
#include "oshmem/shmem/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2014-10-15 20:30:37 +03:00
|
|
|
extern int oshmem_shmem_globalexit_status;
|
2014-09-27 02:07:02 +03:00
|
|
|
|
2014-04-16 18:01:17 +00:00
|
|
|
void shmem_finalize(void)
|
2013-09-10 15:34:09 +00:00
|
|
|
{
|
|
|
|
OPAL_CR_FINALIZE_LIBRARY();
|
2014-10-15 20:30:37 +03:00
|
|
|
if (oshmem_shmem_globalexit_status != 0)
|
2014-09-27 02:07:02 +03:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2014-04-16 18:01:17 +00:00
|
|
|
oshmem_shmem_finalize();
|
2013-09-10 15:34:09 +00:00
|
|
|
}
|
|
|
|
|