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