Commit 8d6744af authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix superfluous check for MPI_Comm_f2c.

parent 561fbe95
......@@ -324,16 +324,7 @@ AS_IF([test x"$enable_MPI" = xno],
enable_MPI=no],[MPI_Waitall],[mpi mpich],,,dnl
[AC_MSG_WARN([Cannot link C MPI programs.])
enable_MPI=no])
AS_IF([test x"$enable_MPI" = xyes],
[save_CFLAGS="$CFLAGS"
CFLAGS="$MPI_C_INCLUDE $CFLAGS"
save_LIBS="$LIBS"
LIBS="$MPI_C_LIB $LIBS"
AC_CHECK_FUNCS([MPI_Comm_f2c])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
],
[test x"$force_enable_MPI" = xyes],
AS_IF([test x"$enable_MPI" != xyes -a x"$force_enable_MPI" = xyes],
[AC_MSG_ERROR([user-requested MPI support unavailable.])])
])
AS_IF([test x"$enable_MPI" = xyes],
......
......@@ -68,7 +68,7 @@ MPI_COMM_WORLD
static void
PPM_set_default_comm_f(MPI_Fint *comm_f)
{
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
int flag = 0;
MPI_Comm comm_c = (MPI_Initialized(&flag) == MPI_SUCCESS && flag)?
MPI_Comm_f2c(*comm_f):PPM_default_comm;
......@@ -84,7 +84,7 @@ void
PPM_set_default_comm(MPI_Comm comm)
{
MPI_Fint comm_f;
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
comm_f = MPI_Comm_c2f(comm);
#else
comm_f = comm;
......@@ -101,7 +101,7 @@ static void
PPM_abort_f(MPI_Fint *comm_f, const char *msg, const char *source, int line)
{
MPI_Comm comm_c;
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
int flag = 0;
if (MPI_Initialized(&flag) == MPI_SUCCESS && flag)
comm_c = MPI_Comm_f2c(*comm_f);
......@@ -156,7 +156,7 @@ static void
PPM_abort_default_f(MPI_Fint *comm_f, const char *msg, const char *source,
int line)
{
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
int flag = 0;
MPI_Comm comm_c = (MPI_Initialized(&flag) == MPI_SUCCESS && flag)?
MPI_Comm_f2c(*comm_f):PPM_default_comm;
......@@ -194,7 +194,7 @@ static void
abort_ppm_handler_wrapper(MPI_Comm *comm, const char msg[],
const char source[], int line)
{
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
int flag = 0;
MPI_Fint comm_f = (MPI_Initialized(&flag) == MPI_SUCCESS && flag)?
MPI_Comm_c2f(*comm):(MPI_Fint)0;
......
......@@ -59,7 +59,7 @@ PPM_set_mpi_abort_handler(MPI_Comm comm)
static void
PPM_set_mpi_abort_handler_f(MPI_Fint *comm_f)
{
#ifdef HAVE_MPI_COMM_F2C
#ifdef USE_MPI
MPI_Comm comm_c = MPI_Comm_f2c((MPI_Fint)*comm_f);
#else
MPI_Comm comm_c = *comm_f;
......
......@@ -441,7 +441,7 @@ static void
initIRand_f(MPI_Fint *comm_f, int *random_seed)
{
MPI_Comm comm_c;
#if defined(USE_MPI) && defined(HAVE_MPI_COMM_F2C)
#if defined(USE_MPI)
int flag = 0;
if (MPI_Initialized(&flag) == MPI_SUCCESS && flag)
comm_c = MPI_Comm_f2c((MPI_Fint)*comm_f);
......
......@@ -56,7 +56,6 @@
* is needed. Therefore this file provides an interposition of that
* function.
*/
#ifdef HAVE_MPI_COMM_F2C
void ParMETIS_V3_PartKway_Wrapper(
idxtype *vtxdist,
idxtype *xadj,
......@@ -88,7 +87,6 @@ FCALLSCSUB15(ParMETIS_V3_PartKway_Wrapper, PARMETIS_V3_PARTKWAY,
PINT, PINT, PINT, PINT, PINT, PINT, PINT, PINT,
PINT, PFLOAT, PFLOAT, PINT, PINT, PINT, PVOID)
#endif
/*
* Local Variables:
* license-project-url: "https://www.dkrz.de/redmine/projects/show/scales-ppm"
......
Supports Markdown
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