oshmem: Align OSHMEM API with spec v1.2 (fortran api)
Этот коммит содержится в:
родитель
9942dfdabf
Коммит
50d68cc02e
@ -35,9 +35,10 @@ liboshmem_fortran_la_SOURCES = shmem_finalize_f.c
|
||||
|
||||
if ! OSHMEM_PROFILING
|
||||
liboshmem_fortran_la_SOURCES += \
|
||||
start_pes_f.c \
|
||||
num_pes_f.c \
|
||||
my_pe_f.c \
|
||||
shmem_init_f.c \
|
||||
shmem_global_exit_f.c \
|
||||
shmem_n_pes_f.c \
|
||||
shmem_my_pe_f.c \
|
||||
shmem_barrier_all_f.c \
|
||||
shpalloc_f.c \
|
||||
shpdeallc_f.c \
|
||||
|
@ -27,9 +27,10 @@ headers = prototypes_pshmem.h \
|
||||
defines.h
|
||||
|
||||
nodist_liboshmem_fortran_pshmem_la_SOURCES = \
|
||||
pstart_pes_f.c \
|
||||
pnum_pes_f.c \
|
||||
pmy_pe_f.c \
|
||||
pshmem_init_f.c \
|
||||
pshmem_global_exit_f.c \
|
||||
pshmem_n_pes_f.c \
|
||||
pshmem_my_pe_f.c \
|
||||
pshmem_barrier_all_f.c \
|
||||
pshpalloc_f.c \
|
||||
pshpdeallc_f.c \
|
||||
|
@ -17,11 +17,31 @@
|
||||
* pshmem_* symbols
|
||||
*/
|
||||
|
||||
#define SHMEM_INIT PSHMEM_INIT
|
||||
#define shmem_init_ pshmem_init_
|
||||
#define shmem_init__ pshmem_init__
|
||||
|
||||
#define START_PES PSTART_PES
|
||||
#define start_pes_ pstart_pes_
|
||||
#define start_pes__ pstart_pes__
|
||||
|
||||
#define SHMEM_GLOBAL_EXIT PSHMEM_GLOBAL_EXIT
|
||||
#define shmem_global_exit_ pshmem_global_exit_
|
||||
#define shmem_global_exit__ pshmem_global_exit__
|
||||
|
||||
#define SHMEM_MY_PE PSHMEM_MY_PE
|
||||
#define shmem_my_pe_ pshmem_my_pe_
|
||||
#define shmem_my_pe__ pshmem_my_pe__
|
||||
|
||||
#define MY_PE PMY_PE
|
||||
#define my_pe_ pmy_pe_
|
||||
#define my_pe__ pmy_pe__
|
||||
#define _my_pe_ p_my_pe_
|
||||
|
||||
#define SHMEM_N_PES PSHMEM_N_PES
|
||||
#define shmem_n_pes_ pshmem_n_pes_
|
||||
#define shmem_n_pes__ pshmem_n_pes__
|
||||
|
||||
#define NUM_PES PNUM_PES
|
||||
#define num_pes_ pnum_pes_
|
||||
#define num_pes__ pnum_pes__
|
||||
@ -570,8 +590,4 @@
|
||||
#define shpdeallc_ pshpdeallc_
|
||||
#define shpdeallc__ pshpdeallc__
|
||||
|
||||
#define START_PES PSTART_PES
|
||||
#define start_pes_ pstart_pes_
|
||||
#define start_pes__ pstart_pes__
|
||||
|
||||
#endif /* OSHMEM_FORTRAN_PROFILE_DEFINES_H */
|
||||
|
@ -21,8 +21,12 @@ BEGIN_C_DECLS
|
||||
OSHMEM_DECLSPEC ret lower_name##__ args; \
|
||||
OSHMEM_DECLSPEC ret upper_name args
|
||||
|
||||
PN (void, pshmem_init, PSHMEM_INIT, (void));
|
||||
PN (void, pstart_pes, PSTART_PES, (MPI_Fint npes));
|
||||
PN (void, pshmem_global_exit, PSHMEM_GLOBAL_EXIT, (MPI_Fint npes));
|
||||
PN (MPI_Fint, pshmem_n_pes, PSHMEM_N_PES, (void));
|
||||
PN (MPI_Fint, pnum_pes, PNUM_PES, (void));
|
||||
PN (MPI_Fint, pshmem_my_pe, PSHMEM_MY_PE, (void));
|
||||
PN (MPI_Fint, pmy_pe, PMY_PE, (void));
|
||||
OSHMEM_DECLSPEC MPI_Fint p_my_pe_(void);
|
||||
PN (void, pshmem_barrier_all, PSHMEM_BARRIER_ALL, (void));
|
||||
|
@ -21,8 +21,12 @@ BEGIN_C_DECLS
|
||||
OSHMEM_DECLSPEC ret lower_name##__ args; \
|
||||
OSHMEM_DECLSPEC ret upper_name args
|
||||
|
||||
PN (void, shmem_init, SHMEM_INIT, (void));
|
||||
PN (void, start_pes, START_PES, (MPI_Fint npes));
|
||||
PN (void, shmem_global_exit, SHMEM_GLOBAL_EXIT, (MPI_Fint npes));
|
||||
PN (MPI_Fint, shmem_n_pes, SHMEM_N_PES, (void));
|
||||
PN (MPI_Fint, num_pes, NUM_PES, (void));
|
||||
PN (MPI_Fint, shmem_my_pe, SHMEM_MY_PE, (void));
|
||||
PN (MPI_Fint, my_pe, MY_PE, (void));
|
||||
OSHMEM_DECLSPEC MPI_Fint _my_pe_(void);
|
||||
PN (void, shmem_finalize, SHMEM_FINALIZE, (void));
|
||||
|
33
oshmem/shmem/fortran/shmem_global_exit_f.c
Обычный файл
33
oshmem/shmem/fortran/shmem_global_exit_f.c
Обычный файл
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_GLOBAL_EXIT, shmem_global_exit)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_GLOBAL_EXIT,
|
||||
shmem_global_exit_,
|
||||
shmem_global_exit__,
|
||||
shmem_global_exit_f,
|
||||
(MPI_Fint status),
|
||||
(status) )
|
||||
|
||||
void shmem_global_exit_f(MPI_Fint status)
|
||||
{
|
||||
shmem_global_exit(status);
|
||||
}
|
@ -15,10 +15,24 @@
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INIT, shmem_init)
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(START_PES, start_pes)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_INIT,
|
||||
shmem_init_,
|
||||
shmem_init__,
|
||||
shmem_init_f,
|
||||
(void),
|
||||
() )
|
||||
|
||||
void shmem_init_f(void)
|
||||
{
|
||||
shmem_init();
|
||||
}
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
START_PES,
|
||||
start_pes_,
|
||||
@ -31,4 +45,3 @@ void start_pes_f(MPI_Fint npes)
|
||||
{
|
||||
shmem_init();
|
||||
}
|
||||
|
@ -15,11 +15,27 @@
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_MY_PE, shmem_my_pe)
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(MY_PE, my_pe)
|
||||
#pragma weak _my_pe_ = p_my_pe_
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (MPI_Fint,
|
||||
SHMEM_MY_PE,
|
||||
shmem_my_pe_,
|
||||
shmem_my_pe__,
|
||||
shmem_my_pe_f,
|
||||
(void),
|
||||
() )
|
||||
|
||||
MPI_Fint shmem_my_pe_f(void)
|
||||
{
|
||||
MPI_Fint rc;
|
||||
rc = OMPI_INT_2_FINT(shmem_my_pe());
|
||||
return rc;
|
||||
}
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (MPI_Fint,
|
||||
MY_PE,
|
||||
my_pe_,
|
||||
@ -28,11 +44,6 @@ SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (MPI_Fint,
|
||||
(void),
|
||||
() )
|
||||
|
||||
MPI_Fint _my_pe_(void)
|
||||
{
|
||||
return my_pe_f();
|
||||
}
|
||||
|
||||
MPI_Fint my_pe_f(void)
|
||||
{
|
||||
MPI_Fint rc;
|
||||
@ -40,3 +51,7 @@ MPI_Fint my_pe_f(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
MPI_Fint _my_pe_(void)
|
||||
{
|
||||
return my_pe_f();
|
||||
}
|
@ -15,10 +15,26 @@
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_N_PES, shmem_n_pes)
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(NUM_PES, num_pes)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (MPI_Fint,
|
||||
SHMEM_N_PES,
|
||||
shmem_n_pes_,
|
||||
shmem_n_pes__,
|
||||
shmem_n_pes_f,
|
||||
(void),
|
||||
() )
|
||||
|
||||
MPI_Fint shmem_n_pes_f(void)
|
||||
{
|
||||
MPI_Fint rc;
|
||||
rc = OMPI_INT_2_FINT(shmem_n_pes());
|
||||
return rc;
|
||||
}
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (MPI_Fint,
|
||||
NUM_PES,
|
||||
num_pes_,
|
||||
@ -33,4 +49,3 @@ MPI_Fint num_pes_f(void)
|
||||
rc = OMPI_INT_2_FINT(num_pes());
|
||||
return rc;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user