Commit 08273c86 authored by Antonio J. Pena's avatar Antonio J. Pena
Browse files

Add weak symbol support for clang 3.2. Fixes #1815



In general, added weak symbol support for compilers supporting
__attribute__((weak,alias)) instead of #pragma weak.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
Signed-off-by: default avatarWilliam Gropp <wgropp@illinois.edu>
parent 27f63405
......@@ -338,9 +338,7 @@ if test -n "$pragma_extra_message" ; then
fi
dnl
])
if test "$pac_cv_prog_c_weak_symbols" = "no" ; then
ifelse([$2],,:,[$2])
else
if test "$pac_cv_prog_c_weak_symbols" != "no" ; then
case "$pac_cv_prog_c_weak_symbols" in
"pragma weak") AC_DEFINE(HAVE_PRAGMA_WEAK,1,[Supports weak pragma])
;;
......@@ -349,7 +347,6 @@ else
"pragma _CRI") AC_DEFINE(HAVE_PRAGMA_CRI_DUP,1,[Cray style weak pragma])
;;
esac
ifelse([$1],,:,[$1])
fi
AC_CACHE_CHECK([whether __attribute__ ((weak)) allowed],
pac_cv_attr_weak,[
......@@ -366,6 +363,14 @@ AC_CACHE_CHECK([whether __attribute__((weak,alias(...))) allowed],
pac_cv_attr_weak_alias,[
AC_TRY_COMPILE([int foo(int) __attribute__((weak,alias("__foo")));],[int a;],
pac_cv_attr_weak_alias=yes,pac_cv_attr_weak_alias=no)])
if test "$pac_cv_attr_weak_alias" = "yes" ; then
AC_DEFINE(HAVE_WEAK_ATTRIBUTE,1,[Attribute style weak pragma])
fi
if test "$pac_cv_prog_c_weak_symbols" = "no" -a "$pac_cv_attr_weak_alias" = "no" ; then
ifelse([$2],,:,[$2])
else
ifelse([$1],,:,[$1])
fi
])
#
......
......@@ -1814,7 +1814,12 @@ if test $enable_weak_symbols = "yes" ; then
# Check for the ability to support multiple weak symbols
if test "$pac_cv_prog_c_weak_symbols" = "pragma weak" ; then
PAC_PROG_C_MULTIPLE_WEAK_SYMBOLS(AC_DEFINE(HAVE_MULTIPLE_PRAGMA_WEAK,1,[Define if multiple weak symbols may be defined]))
else
if test "$pac_cv_prog_c_weak_symbols" = "no" -a "$pac_cv_attr_weak_alias" = "yes"; then
MPICH_ATTR_WEAK_ALIAS_DEFINITION="__attribute__((weak,alias(fname)))"
fi
fi
AC_SUBST(MPICH_ATTR_WEAK_ALIAS_DEFINITION)
fi
export NEEDSPLIB
......
......@@ -1269,6 +1269,33 @@ sub print_profiling_block {
#else\
#pragma _CRI duplicate ${lcprefix}${lcname}_ as p${lcprefix}${lcname}_\
#endif\
\
#elif defined(HAVE_WEAK_ATTRIBUTE)
#if defined(F77_NAME_UPPER)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "P${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "P${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "P${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "P${ucprefix}${ucname}" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_2USCORE)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "p${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "p${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "p${lcprefix}${lcname}__" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_USCORE)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "p${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "p${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "p${lcprefix}${lcname}_" );
print $OUTFD "
#else\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "p${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "p${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "p${lcprefix}${lcname}" );
print $OUTFD "
#endif
#endif /* HAVE_PRAGMA_WEAK */\
#endif /* USE_WEAK_SYMBOLS */\
/* End MPI profiling block */\n\n";
......@@ -1300,7 +1327,8 @@ sub print_name_map_block {
print $OUTFD "
/* Map the name to the correct form */
#ifndef MPICH_MPI_FROM_PMPI
#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK)
#if defined(USE_WEAK_SYMBOLS)
#if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
/* Define the weak versions of the PMPI routine*/
#ifndef F77_NAME_UPPER\n";
&print_weak_decl( $OUTFD, "P${ucprefix}$ucname", $args, $lcname );
......@@ -1330,7 +1358,31 @@ sub print_name_map_block {
#pragma weak p${lcprefix}${lcname}__ = p${lcprefix}${lcname}
#pragma weak p${lcprefix}${lcname}_ = p${lcprefix}${lcname}
#endif /* Test on name mapping */
#endif /* Use multiple pragma weak */
#elif defined(HAVE_WEAK_ATTRIBUTE)
#if defined(F77_NAME_UPPER)\n";
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}__", $args, $lcname, "P${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}_", $args, $lcname, "P${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}", $args, $lcname, "P${ucprefix}${ucname}" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_2USCORE)\n";
&print_weak_decl( $OUTFD, "P${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}_", $args, $lcname, "p${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}", $args, $lcname, "p${lcprefix}${lcname}__" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_USCORE)\n";
&print_weak_decl( $OUTFD, "P${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}__", $args, $lcname, "p${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}", $args, $lcname, "p${lcprefix}${lcname}_" );
print $OUTFD "
#else\n";
&print_weak_decl( $OUTFD, "P${ucprefix}$ucname", $args, $lcname, "p${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}__", $args, $lcname, "p${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "p${lcprefix}${lcname}_", $args, $lcname, "p${lcprefix}${lcname}" );
print $OUTFD "
#endif /* Test on name mapping */
#endif /* HAVE_MULTIPLE_PRAGMA_WEAK */
#endif /* USE_WEAK_SYMBOLS */
#ifdef F77_NAME_UPPER
#define ${lcprefix}${lcname}_ P${ucprefix}${ucname}
......@@ -1696,17 +1748,21 @@ sub print_weak_decl {
my $name = $_[1];
my $args = $_[2];
my $lcname = $_[3];
my $weak_alias = $_[4];
my $basename = lc($name);
$basename =~ s/_*$//;
if (defined($altweak{$basename})) {
print $OUTFD "extern FORT_DLL_SPEC $altweakrtype{$basename} FORT_CALL $name($altweak{$basename});\n";
print $OUTFD "extern FORT_DLL_SPEC $altweakrtype{$basename} FORT_CALL $name($altweak{$basename})";
}
else {
print $OUTFD "extern FORT_DLL_SPEC $returnType FORT_CALL $name";
&print_args( $OUTFD, $args, 1, $lcname );
print $OUTFD ";\n";
}
if (defined($weak_alias)) {
print $OUTFD " __attribute__((weak,alias(\"$weak_alias\")))";
}
print $OUTFD ";\n";
}
#
# --------------------------------------------------------------------------
......@@ -5354,11 +5410,23 @@ sub HelperForRegister_datarep {
for use as the conversion function for MPI_Register_datarep.
Like the attribute null functions, we provide multiple weak versions
of this if possible */
#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK)
#if defined(USE_WEAK_SYMBOLS) && (defined(HAVE_MULTIPLE_PRAGMA_WEAK) || defined(HAVE_WEAK_ATTRIBUTE))
extern FORT_DLL_SPEC int FORT_CALL mpi_conversion_fn_null_ ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr );
extern FORT_DLL_SPEC int FORT_CALL mpi_conversion_fn_null__ ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr );
extern FORT_DLL_SPEC int FORT_CALL mpi_conversion_fn_null ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr );
extern FORT_DLL_SPEC int FORT_CALL MPI_CONVERSION_FN_NULL ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr );
extern FORT_DLL_SPEC int FORT_CALL mpi_conversion_fn_null__ ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr )
#ifndef MPICH_MPI_FROM_PMPI
MPICH_ATTR_WEAK_ALIAS(\"mpi_conversion_fn_null_\")
#endif
;
extern FORT_DLL_SPEC int FORT_CALL mpi_conversion_fn_null ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr )
#ifndef MPICH_MPI_FROM_PMPI
MPICH_ATTR_WEAK_ALIAS(\"mpi_conversion_fn_null_\")
#endif
;
extern FORT_DLL_SPEC int FORT_CALL MPI_CONVERSION_FN_NULL ( void*v1, MPI_Fint*v2, MPI_Fint*v3, void*v4, MPI_Offset*v5, MPI_Fint *v6, MPI_Fint*v7, MPI_Fint *ierr )
#ifndef MPICH_MPI_FROM_PMPI
MPICH_ATTR_WEAK_ALIAS(\"mpi_conversion_fn_null_\")
#endif
;
/* */
#ifndef MPICH_MPI_FROM_PMPI
#pragma weak mpi_conversion_fn_null__ = mpi_conversion_fn_null_
......@@ -5622,8 +5690,8 @@ sub AddFwrapWeakName {
print $OUTFD "
/* These definitions are used only for generating the Fortran wrappers */
#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK) && \\
defined(USE_ONLY_MPI_NAMES)\n";
#if defined(USE_WEAK_SYMBOLS) && defined(USE_ONLY_MPI_NAMES)
#if defined(HAVE_MULTIPLE_PRAGMA_WEAK)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname );
......@@ -5646,6 +5714,33 @@ sub AddFwrapWeakName {
#pragma weak ${lcprefix}${lcname}__ = ${lcprefix}${lcname}
#pragma weak ${lcprefix}${lcname}_ = ${lcprefix}${lcname}
#endif
#elif defined(HAVE_WEAK_ATTRIBUTE)
#if defined(F77_NAME_UPPER)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "${ucprefix}${ucname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "${ucprefix}${ucname}" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_2USCORE)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "${lcprefix}${lcname}__" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "${lcprefix}${lcname}__" );
print $OUTFD "
#elif defined(F77_NAME_LOWER_USCORE)\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "${lcprefix}${lcname}_" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname, "${lcprefix}${lcname}_" );
print $OUTFD "
#else\n";
&print_weak_decl( $OUTFD, "${ucprefix}$ucname", $args, $lcname, "${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}__", $args, $lcname, "${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}_", $args, $lcname, "${lcprefix}${lcname}" );
&print_weak_decl( $OUTFD, "${lcprefix}${lcname}", $args, $lcname );
print $OUTFD "
#endif
#endif
#endif
";
......
This diff is collapsed.
......@@ -116,122 +116,122 @@ typedef int MPI_Fint;
/* Section 9.2 */
/* Begin Prototypes */
int MPI_File_open(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh);
int MPI_File_close(MPI_File *fh);
int MPI_File_delete(const char *filename, MPI_Info info);
int MPI_File_set_size(MPI_File fh, MPI_Offset size);
int MPI_File_preallocate(MPI_File fh, MPI_Offset size);
int MPI_File_get_size(MPI_File fh, MPI_Offset *size);
int MPI_File_get_group(MPI_File fh, MPI_Group *group);
int MPI_File_get_amode(MPI_File fh, int *amode);
int MPI_File_set_info(MPI_File fh, MPI_Info info);
int MPI_File_get_info(MPI_File fh, MPI_Info *info_used);
int MPI_File_open(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh) MPICH_ATTR_WEAK_ALIAS("PMPI_File_open");
int MPI_File_close(MPI_File *fh) MPICH_ATTR_WEAK_ALIAS("PMPI_File_close");
int MPI_File_delete(const char *filename, MPI_Info info) MPICH_ATTR_WEAK_ALIAS("PMPI_File_delete");
int MPI_File_set_size(MPI_File fh, MPI_Offset size) MPICH_ATTR_WEAK_ALIAS("PMPI_File_set_size");
int MPI_File_preallocate(MPI_File fh, MPI_Offset size) MPICH_ATTR_WEAK_ALIAS("PMPI_File_preallocate");
int MPI_File_get_size(MPI_File fh, MPI_Offset *size) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_size");
int MPI_File_get_group(MPI_File fh, MPI_Group *group) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_group");
int MPI_File_get_amode(MPI_File fh, int *amode) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_amode");
int MPI_File_set_info(MPI_File fh, MPI_Info info) MPICH_ATTR_WEAK_ALIAS("PMPI_File_set_info");
int MPI_File_get_info(MPI_File fh, MPI_Info *info_used) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_info");
/* Section 9.3 */
int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype,
const char *datarep, MPI_Info info);
const char *datarep, MPI_Info info) MPICH_ATTR_WEAK_ALIAS("PMPI_File_set_view");
int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype,
char *datarep);
char *datarep) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_view");
/* Section 9.4.2 */
int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_at");
int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void * buf, int count,
MPI_Datatype datatype, MPI_Status *status)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_at_all");
int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void * buf, int count,
MPI_Datatype datatype, MPI_Status *status)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_at");
int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int count,
MPI_Datatype datatype, MPI_Status *status)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_at_all");
/* nonblocking calls currently use MPIO_Request, because generalized
requests not yet implemented. For the same reason, MPIO_Test and
MPIO_Wait are used to test and wait on nonblocking I/O requests */
int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype,
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iread_at");
int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count,
MPI_Datatype datatype, MPIO_Request *request)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iwrite_at");
/* Section 9.4.3 */
int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read");
int MPI_File_read_all(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_all");
int MPI_File_write(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write");
int MPI_File_write_all(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_all");
/* nonblocking calls currently use MPIO_Request, because generalized
requests not yet implemented. For the same reason, MPIO_Test and
MPIO_Wait are used to test and wait on nonblocking I/O requests */
int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iread");
int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iwrite");
int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence);
int MPI_File_get_position(MPI_File fh, MPI_Offset *offset);
int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp);
int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) MPICH_ATTR_WEAK_ALIAS("PMPI_File_seek");
int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_position");
int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_byte_offset");
/* Section 9.4.4 */
int MPI_File_read_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_shared");
int MPI_File_write_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_shared");
int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype,
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iread_shared");
int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_iwrite_shared");
int MPI_File_read_ordered(MPI_File fh, void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_ordered");
int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, MPI_Datatype datatype,
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence);
int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset);
MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_ordered");
int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) MPICH_ATTR_WEAK_ALIAS("PMPI_File_seek_shared");
int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_position_shared");
/* Section 9.4.5 */
int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, int count,
MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
int MPI_File_read_at_all_end(MPI_File fh, void *buf, MPI_Status *status);
MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_at_all_begin");
int MPI_File_read_at_all_end(MPI_File fh, void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_at_all_end");
int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, const void *buf, int count,
MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5);
int MPI_File_write_at_all_end(MPI_File fh, const void *buf, MPI_Status *status);
MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_at_all_begin");
int MPI_File_write_at_all_end(MPI_File fh, const void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_at_all_end");
int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, MPI_Datatype datatype)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_all_begin");
int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_all_end");
int MPI_File_write_all_begin(MPI_File fh, const void *buf, int count, MPI_Datatype datatype)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_File_write_all_end(MPI_File fh, const void *buf, MPI_Status *status);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_all_begin");
int MPI_File_write_all_end(MPI_File fh, const void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_all_end");
int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, MPI_Datatype datatype)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_ordered_begin");
int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_read_ordered_end");
int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, MPI_Datatype datatype)
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4);
int MPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status);
MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_ordered_begin");
int MPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status) MPICH_ATTR_WEAK_ALIAS("PMPI_File_write_ordered_end");
/* Section 9.5.1 */
int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent);
int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_type_extent");
/* Section 9.5.3 */
int MPI_Register_datarep(const char *datarep, MPI_Datarep_conversion_function *read_conversion_fn,
MPI_Datarep_conversion_function *write_conversion_fn,
MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state);
MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) MPICH_ATTR_WEAK_ALIAS("PMPI_Register_datarep");
/* Section 9.6.1 */
int MPI_File_set_atomicity(MPI_File fh, int flag);
int MPI_File_get_atomicity(MPI_File fh, int *flag);
int MPI_File_sync(MPI_File fh);
int MPI_File_set_atomicity(MPI_File fh, int flag) MPICH_ATTR_WEAK_ALIAS("PMPI_File_set_atomicity");
int MPI_File_get_atomicity(MPI_File fh, int *flag) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_atomicity");
int MPI_File_sync(MPI_File fh) MPICH_ATTR_WEAK_ALIAS("PMPI_File_sync");
/* Section 4.13.3 */
#ifndef MPICH
/* MPICH provides these definitions */
int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler);
int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler);
int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) MPICH_ATTR_WEAK_ALIAS("PMPI_File_set_errhandler");
int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) MPICH_ATTR_WEAK_ALIAS("PMPI_File_get_errhandler");
#endif
/* End Prototypes */
......@@ -261,8 +261,8 @@ int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsi
#endif
#endif
/* above needed for some versions of mpi.h in MPICH!! */
MPI_File MPI_File_f2c(MPI_Fint file);
MPI_Fint MPI_File_c2f(MPI_File file);
MPI_File MPI_File_f2c(MPI_Fint file) MPICH_ATTR_WEAK_ALIAS("PMPI_File_f2c");
MPI_Fint MPI_File_c2f(MPI_File file) MPICH_ATTR_WEAK_ALIAS("PMPI_File_c2f");
#ifndef HAVE_MPI_GREQUEST
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment