Commit 15143555 authored by Shane Snyder's avatar Shane Snyder
Browse files

HAVE_MPI => SSG_HAVE_MPI

parent 0c3e972a
......@@ -15,7 +15,7 @@ EXTRA_DIST =
BUILT_SOURCES =
src_libssg_la_SOURCES =
include_HEADERS = include/ssg.h
if HAVE_MPI
if SSG_HAVE_MPI
include_HEADERS += include/ssg-mpi.h
endif
noinst_HEADERS = ssg-config.h
......
......@@ -49,7 +49,7 @@ if test "x${check_mpi}" = xauto -o "x${check_mpi}" = xyes ; then
AC_MSG_CHECKING([If MPI programs can be compiled])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include<mpi.h>]], [[MPI_Init(0,0);]])],
[AC_DEFINE([HAVE_MPI], [1], [Define to 1 if compiled with MPI support])
[AC_DEFINE([SSG_HAVE_MPI], [1], [Define to 1 if compiled with MPI support])
AC_MSG_RESULT([yes])
check_mpi_status=success],
[AC_MSG_RESULT([no])])
......@@ -59,7 +59,7 @@ if test "x${check_mpi_status}" = xfail -a "x${check_mpi}" = xyes; then
AC_MSG_ERROR([MPI requested but unable to be used. Did you specify an MPI compiler?])
fi
AM_CONDITIONAL([HAVE_MPI], [test "x${check_mpi_status}" = xsuccess])
AM_CONDITIONAL([SSG_HAVE_MPI], [test "x${check_mpi_status}" = xsuccess])
PKG_CHECK_MODULES([MARGO],[margo],[],
[AC_MSG_ERROR([Could not find working margo installation!])])
......
......@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifdef HAVE_MPI
#ifdef SSG_HAVE_MPI
#include <mpi.h>
#endif
......@@ -23,6 +23,9 @@
#include <margo.h>
#include "ssg.h"
#ifdef SSG_HAVE_MPI
#include "ssg-mpi.h"
#endif
#include "ssg-internal.h"
#if USE_SWIM_FD
#include "swim-fd/swim-fd.h"
......@@ -328,7 +331,7 @@ fini:
return sret;
}
#ifdef HAVE_MPI
#ifdef SSG_HAVE_MPI
int ssg_group_create_mpi(
const char * group_name,
MPI_Comm comm,
......
......@@ -9,7 +9,7 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#if HAVE_MPI
#ifdef SSG_HAVE_MPI
#include <mpi.h>
#endif
......@@ -17,7 +17,7 @@
#include <mercury.h>
#include <abt.h>
#include <ssg.h>
#if HAVE_MPI
#ifdef SSG_HAVE_MPI
#include <ssg-mpi.h>
#endif
......@@ -78,7 +78,7 @@ static void parse_args(int argc, char *argv[], int *sleep_time, const char **add
}
else if (strcmp(*mode, "mpi") == 0)
{
#ifdef HAVE_MPI
#ifdef SSG_HAVE_MPI
if (ndx != argc)
{
usage();
......@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
ABT_init(argc, argv);
#if HAVE_MPI
#ifdef SSG_HAVE_MPI
if (strcmp(mode, "mpi") == 0)
MPI_Init(&argc, &argv);
#endif
......@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
if(strcmp(mode, "conf") == 0)
sret = ssg_group_create_config(group_name, conf_file, &g_id);
#if HAVE_MPI
#ifdef SSG_HAVE_MPI
else if(strcmp(mode, "mpi") == 0)
sret = ssg_group_create_mpi(group_name, MPI_COMM_WORLD, &g_id);
#endif
......@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
if(hgctx) HG_Context_destroy(hgctx);
if(hgcl) HG_Finalize(hgcl);
#if HAVE_MPI
#ifdef SSG_HAVE_MPI
if (strcmp(mode, "mpi") == 0)
MPI_Finalize();
#endif
......
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