Commit 4fb39d18 authored by incardon's avatar incardon

Fixed for metis detection

parent 509f64e8
......@@ -13,6 +13,7 @@ m4_ifdef([AX_BOOST],,[m4_include([m4/ax_boost.m4])])
m4_ifdef([ACX_MPI],,[m4_include([m4/acx_mpi.m4])])
m4_ifdef([AX_OPENMP],,[m4_include([m4/ax_openmp.m4])])
m4_ifdef([AX_CUDA],,[m4_include([m4/ax_cuda.m4])])
m4_ifdef([IMMDX_LIB_METIS],,[m4_include([m4/immdx_lib_metis.m4])])
CXXFLAGS+=" --std=c++11 -march=native -mtune=native "
NVCCFLAGS=" "
......@@ -73,6 +74,10 @@ fi
#########
## Check for Metis
IMMDX_LIB_METIS([],[AC_MSG_ERROR(["Cannot detect metis, use the --with-metis option if it is not installed in the default location"])])
####### include OpenFPM_devices include path
INCLUDES_PATH+="-I. -Isrc/config/ -I../../metis_install/include -I../../OpenFPM_IO/src -I../../OpenFPM_data/src -I../../OpenFPM_devices/src -I../../OpenFPM_vcluster/src/"
......
AC_DEFUN([IMMDX_LIB_METIS], [
AC_MSG_CHECKING(for METIS library)
AC_REQUIRE([AC_PROG_CC])
#
# User hints...
#
AC_ARG_VAR([METIS], [METIS library location])
AC_ARG_WITH([metis],
[AC_HELP_STRING([--with-metis],
[user defined path to METIS library])],
[
if test -n "$METIS" ; then
AC_MSG_RESULT(yes)
with_metis=$METIS
elif test "$withval" != no ; then
AC_MSG_RESULT(yes)
with_metis=$withval
else
AC_MSG_RESULT(no)
fi
],
[
if test -n "$METIS" ; then
with_metis=$METIS
AC_MSG_RESULT(yes)
else
with_metis=/usr
if test ! -f "$with_metis/include/metis.h" ; then
with_metis=/usr/local
if test ! -f "$with_metis/include/metis.h" ; then
with_metis=""
AC_MSG_RESULT(failed)
else
AC_MSG_RESULT(yes)
fi
else
AC_MSG_RESULT(yes)
fi
fi
])
#
# locate METIS library
#
if test -n "$with_metis" ; then
old_CFLAGS=$CFLAGS
old_LDFLAGS=$LDFLAGS
CFLAGS="-I$with_metis/include"
LDFLAGS="-L$with_metis/lib"
AC_LANG_SAVE
AC_LANG_C
AC_CHECK_LIB(metis, METIS_PartMeshDual,
[metis_lib=yes], [metis_lib=yes], [-lm])
AC_CHECK_HEADER(metis.h, [metis_h=yes],
[metis_h=no], [/* check */])
AC_LANG_RESTORE
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
AC_MSG_CHECKING(METIS in $with_metis)
if test "$metis_lib" = "yes" -a "$metis_h" = "yes" ; then
AC_SUBST(METIS_INCLUDE, [-I$with_metis/include])
AC_SUBST(METIS_LIB, [-L$with_metis/lib])
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT(failed)
fi
fi
#
#
#
if test x = x"$METIS_LIB" ; then
ifelse([$2],,[AC_MSG_ERROR(Failed to find valid METIS library)],[$2])
:
else
ifelse([$1],,[AC_DEFINE(HAVE_METIS,1,[Define if you have METIS library])],[$1])
:
fi
])dnl IMMDX_LIB_METIS
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
......@@ -87,7 +87,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ax_boost.m4 $(top_srcdir)/m4/acx_mpi.m4 \
$(top_srcdir)/m4/ax_openmp.m4 $(top_srcdir)/m4/ax_cuda.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/immdx_lib_metis.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
......@@ -166,12 +166,12 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing aclocal-1.13
ACLOCAL = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AUTOCONF = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing autoconf
AUTOHEADER = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing autoheader
AUTOMAKE = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing automake-1.13
AUTOMAKE = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing automake-1.14
AWK = gawk
BOOST_CPPFLAGS = -pthread -I/usr/include
BOOST_DATE_TIME_LIB = -lboost_date_time
......@@ -193,7 +193,7 @@ CUDA_CFLAGS = -I -I -I/usr/local/cuda/include
CUDA_LIBS = -L -L -L/usr/local/cuda/lib64 -lcuda -lcudart
CXX = mpic++
CXXDEPMODE = depmode=gcc3
CXXFLAGS = --std=c++11 -march=native -mtune=native -g3 -Wall -O0
CXXFLAGS = --std=c++11 -march=native -mtune=native -Wall -O3 -g3 -funroll-loops
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
......@@ -212,9 +212,12 @@ LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing makeinfo
METIS =
METIS_INCLUDE = -I../metis_install//include
METIS_LIB = -L../metis_install//lib
MKDIR_P = /usr/bin/mkdir -p
NVCC = /usr/local/cuda/bin/nvcc
NVCCFLAGS = -g -O0
NVCCFLAGS = -O3
NVCC_EXIST = yes
OBJEXT = o
PACKAGE = full-package-name
......
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
......@@ -87,7 +87,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ax_boost.m4 $(top_srcdir)/m4/acx_mpi.m4 \
$(top_srcdir)/m4/ax_openmp.m4 $(top_srcdir)/m4/ax_cuda.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/immdx_lib_metis.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
......@@ -212,6 +212,9 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
METIS = @METIS@
METIS_INCLUDE = @METIS_INCLUDE@
METIS_LIB = @METIS_LIB@
MKDIR_P = @MKDIR_P@
NVCC = @NVCC@
NVCCFLAGS = @NVCCFLAGS@
......
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