File tree Expand file tree Collapse file tree 4 files changed +10
-25
lines changed Expand file tree Collapse file tree 4 files changed +10
-25
lines changed Original file line number Diff line number Diff line change 22 *
33 * Copyright (c) 2013 Mellanox Technologies, Inc.
44 * All rights reserved.
5- * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
5+ * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
6+ * Copyright (c) 2016 Research Organization for Information Science
7+ * and Technology (RIST). All rights reserved.
68 * $COPYRIGHT$
79 *
810 * Additional copyrights may follow
5254# ifndef OSHMEM_MODULE_DECLSPEC
5355# define OSHMEM_MODULE_DECLSPEC __opal_attribute_visibility__("default")
5456# endif
55- # ifndef OSHMEM_DESTRUCTOR
56- # define OSHMEM_DESTRUCTOR __opal_attribute_destructor__
57- # endif
5857# else
5958# ifndef OSHMEM_DECLSPEC
6059# define OSHMEM_DECLSPEC
6160# endif
6261# ifndef OSHMEM_MODULE_DECLSPEC
6362# define OSHMEM_MODULE_DECLSPEC
6463# endif
65- # ifndef OSHMEM_DESTRUCTOR
66- # define OSHMEM_DESTRUCTOR
67- # endif
6864# endif
6965#endif /* defined(__WINDOWS__) */
7066
Original file line number Diff line number Diff line change 3232# endif
3333#endif
3434
35- #ifndef OSHMEM_DESTRUCTOR
36- # if defined(OPAL_C_HAVE_VISIBILITY) && (OPAL_C_HAVE_VISIBILITY == 1)
37- # define OSHMEM_DESTRUCTOR __attribute__ ((__destructor__))
38- # else
39- # define OSHMEM_DESTRUCTOR
40- # endif
41- #endif
42-
4335#include < pshmemx.h>
4436
4537#if defined(c_plusplus) || defined(__cplusplus)
@@ -59,7 +51,7 @@ OSHMEM_DECLSPEC void pshmem_global_exit(int status);
5951/*
6052 * Finalization routines
6153 */
62- OSHMEM_DECLSPEC void pshmem_finalize (void ) OSHMEM_DESTRUCTOR ;
54+ OSHMEM_DECLSPEC void pshmem_finalize (void );
6355
6456/*
6557 * Query routines
Original file line number Diff line number Diff line change 22 * Copyright (c) 2014-2016 Mellanox Technologies, Inc.
33 * All rights reserved.
44 * Copyright (c) 2014 Intel, Inc. All rights reserved
5+ * Copyright (c) 2016 Research Organization for Information Science
6+ * and Technology (RIST). All rights reserved.
57 * $COPYRIGHT$
68 *
79 * Additional copyrights may follow
4042# endif
4143#endif
4244
43- #ifndef OSHMEM_DESTRUCTOR
44- # if defined(OPAL_C_HAVE_VISIBILITY ) && (OPAL_C_HAVE_VISIBILITY == 1 )
45- # define OSHMEM_DESTRUCTOR __attribute__((__destructor__))
46- # else
47- # define OSHMEM_DESTRUCTOR
48- # endif
49- #endif
50-
5145#include <shmem-compat.h>
5246#include <shmemx.h>
5347
@@ -116,7 +110,7 @@ enum shmem_wait_ops {
116110 * Initialization routines
117111 */
118112OSHMEM_DECLSPEC void shmem_init (void );
119- OSHMEM_DECLSPEC void shmem_finalize (void ) OSHMEM_DESTRUCTOR ;
113+ OSHMEM_DECLSPEC void shmem_finalize (void );
120114OSHMEM_DECLSPEC void shmem_global_exit (int status );
121115
122116/*
Original file line number Diff line number Diff line change 33 * All rights reserved.
44 * Copyright (c) 2015 Los Alamos National Security, LLC.
55 * All rights reserved.
6+ * Copyright (c) 2016 Research Organization for Information Science
7+ * and Technology (RIST). All rights reserved.
68 * $COPYRIGHT$
79 *
810 * Additional copyrights may follow
@@ -50,6 +52,7 @@ void start_pes(int npes)
5052static void shmem_onexit (int exitcode , void * arg )
5153{
5254 oshmem_shmem_globalexit_status = exitcode ;
55+ shmem_finalize ();
5356}
5457
5558static inline void _shmem_init (void )
You can’t perform that action at this time.
0 commit comments