Commit 0ab9571d authored by incardon's avatar incardon

Starting project

parents
SUBDIRS = src
bin_PROGRAMS =
\ No newline at end of file
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([src/main.cpp])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([src/config/config.h])
m4_ifdef([ACX_PTHREAD],,[m4_include([m4/acx_pthread.m4])])
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])])
CXXFLAGS+=" --std=c++11 -march=native -mtune=native -Wno-unused-local-typedefs -Wextra -Wno-unused-parameter "
NVCCFLAGS=" "
INCLUDES_PATH=" "
# Add openfpm_vcluster to prefix forlder (if prefix end if openfpm_pdata remove that path)
if [ echo "$prefix" | grep -qE "/openfpm_pdata$" ]; then
prefix=$(echo "$prefix" | sed 's/\(.*\)\/openfpm_pdata$/\1/g')
fi
prefix="$prefix/openfpm_vcluster"
echo "Installation dir is: $prefix"
AC_PROG_RANLIB
AM_PROG_AR
# Checks for programs.
AC_PROG_CXX
# Checks g++ flags
AC_CANONICAL_HOST
###### Check for verbose
AC_MSG_CHECKING(whether to build with verbose print)
verbose=no
AC_ARG_ENABLE(verbose,
AC_HELP_STRING(
[--enable-verbose],
[enable verbose print (def=no)]
),
verbose="$enableval"
)
AC_MSG_RESULT($verbose)
if test x"$verbose" = x"yes"; then
AC_DEFINE([VERBOSE_TEST],[],[Verbose test])
fi
###### Check for debug compilation
AC_MSG_CHECKING(whether to build with debug information)
debuger=no
AC_ARG_ENABLE(debug,
AC_HELP_STRING(
[--enable-debug],
[enable debug data generation (def=no)]
),
debuger="$enableval"
)
AC_MSG_RESULT($debuger)
if test x"$debuger" = x"yes"; then
AC_DEFINE([DEBUG_MODE],[],[Debug])
AC_DEFINE([DEBUG],[],[Debug])
CXXFLAGS="$CXXFLAGS -g3 -Wall -O0 "
NVCCFLAGS+="$NVCCFLAGS -g -O0 "
else
CXXFLAGS="$CXXFLAGS -Wall -O3 -g3 -funroll-loops "
NVCCFLAGS+="$NVCCFLAGS -O3 "
fi
####### include openfpm_devices include path
INCLUDES_PATH+=" -I/usr/local/include -I. -Iconfig -I../../openfpm_devices/src -I../../openfpm_data/src"
###### Check for memleak check compilation
AC_MSG_CHECKING(whether to build with memory check)
mem_check=no
AC_ARG_ENABLE(memcheck,
AC_HELP_STRING(
[--enable-memcheck],
[enable memory checking (def=no)]
),
mem_check="$enableval"
)
AC_MSG_RESULT($mem_check)
if test x"$mem_check" = x"yes"; then
AC_DEFINE([MEMLEAK_CHECK],[],[Memory check])
fi
####################################
DEFAULT_LIB=""
# At least for glibc, clock_gettime is in librt. But don't pull that
# in if it still doesn't give us the function we want.
AC_CHECK_LIB(rt, clock_gettime,[DEFAULT_LIB+=" -lrt "],[],[])
##### CHECK FOR BOOST ##############
AX_BOOST([1.52],[],[])
####### Checking for GPU support
AX_CUDA
if test x"$NVCC_EXIST" = x"yes"; then
AC_MSG_CHECKING(whether to build with GPU support)
gpu_support=yes
AC_ARG_ENABLE(gpu,
AC_HELP_STRING(
[--enable-gpu],
[enable gpu support]
),
gpu_support="$enableval"
)
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AC_DEFINE([CUDA_GPU],[],[CUDA GPU support])
fi
else
gpu_support=no
fi
# Set this conditional if cuda is wanted
#
AM_CONDITIONAL(BUILDCUDA, test x$gpu_support = x"yes")
##########################
AC_SUBST(NVCCFLAGS)
AC_SUBST(INCLUDES_PATH)
AC_SUBST(DEFAULT_LIB)
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
echo ""
echo "***********************************"
echo "* *"
if [ test x"$profiler" = x"yes" ]; then
echo "* profiler: yes *"
else
echo "* profiler: no *"
fi
if [ test x"$memcheck" = x"yes" ]; then
echo "* memcheck: yes *"
else
echo "* memcheck: no *"
fi
if [ test x"$debuger" = x"yes" ]; then
echo "* debug: yes *"
else
echo "* debug: no *"
fi
if [ test x"$gpu_support" = x"no" ]; then
echo "* gpu: no *"
else
echo "* gpu: yes *"
fi
echo "* *"
echo "***********************************"
10
dir
936
svn://ibird.ath.cx/svn/repo/rhmc/trunk/rhmc_20_07_2010/m4
svn://ibird.ath.cx/svn/repo/rhmc
2012-01-18T23:10:09.412529Z
608
ibird
05885b04-6644-4e05-9b08-5043e251875b
acx_mpi.m4
file
2012-02-27T09:44:46.656966Z
64b9623c0f01aeabbc07c1c14e31e474
2011-05-01T16:40:35.209298Z
118
ibird
3902
ax_boost_program_options.m4
file
2012-02-27T09:44:46.657966Z
df549125ea719d25a168766b45ff8321
2011-02-18T01:07:35.655725Z
1
i-bird
4809
acx_pthread.m4
file
2012-02-27T09:44:46.657966Z
c77c1b458009722a892e9c848d491d9c
2011-02-18T01:07:35.655725Z
1
i-bird
9512
ax_lib_mysql.m4
file
2012-02-27T09:44:46.657966Z
2324a6f7e740da3ae198c00126dacb22
2011-02-18T01:07:35.655725Z
1
i-bird
4506
ax_boost_thread.m4
file
2012-02-27T09:44:46.658966Z
f6c41db1f191380670192b1416ec144e
2011-03-30T23:32:49.807437Z
48
ibird
5396
ax_openmp.m4
file
2012-02-27T09:44:46.658966Z
8a00cbce21bf0ed1e8272064f679c111
2012-01-18T23:02:08.895776Z
605
ibird
4284
ax_boost_base.m4
file
2012-02-27T09:44:46.659966Z
1c3d3941a1d2a34b5093df43f4eff3f9
2011-02-18T01:07:35.655725Z
1
i-bird
10265
ax_opencl.m4
file
2012-02-27T09:44:46.659966Z
fd297403b44095eff6045a2f75d7b000
2011-02-18T01:07:35.655725Z
1
i-bird
4043
ax_gcc_version.m4
file
2012-02-27T09:44:46.659966Z
4472b41f4b48be2a792a34cb059caa31
2012-01-18T23:07:46.147457Z
607
ibird
2512
programs.m4
file
2012-02-27T09:44:46.660966Z
62c9967f8e83f3376724ebd9518c535f
2011-02-18T01:07:35.655725Z
1
i-bird
30907
ax_check_compiler_flags.m4
file
2012-02-27T09:44:46.660966Z
ce1509a8b02892e0a4aa61a01ce2d3b0
2011-02-18T01:07:35.655725Z
1
i-bird
3297
ax_gcc_archflag.m4
file
2012-02-27T09:44:46.661966Z
9f182cd30107f224f43bc103c18dc36c
2012-01-18T23:10:09.412529Z
608
ibird
9475
ax_gcc_x86_cpuid.m4
file
2012-02-27T09:44:46.661966Z
ab8de3a5954a15ed48f6998f205f4e26
2012-01-18T23:07:03.291507Z
606
ibird
3313
dnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl This macro tries to find out how to compile programs that use MPI
dnl (Message Passing Interface), a standard API for parallel process
dnl communication (see http://www-unix.mcs.anl.gov/mpi/)
dnl
dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to
dnl the name of the MPI compiler, depending upon the current language.
dnl (This may just be $CC/$CXX/$F77, but is more often something like
dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are
dnl needed for linking MPI (e.g. -lmpi, if a special
dnl MPICC/MPICXX/MPIF77 was not found).
dnl
dnl If you want to compile everything with MPI, you should set:
dnl
dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77"
dnl LIBS="$MPILIBS $LIBS"
dnl
dnl The user can force a particular library/compiler by setting the
dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables.
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_MPI.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2004-11-05
dnl @license GPLWithACException
AC_DEFUN([ACX_MPI], [
AC_PREREQ(2.50) dnl for AC_LANG_CASE
AC_LANG_CASE([C], [
AC_REQUIRE([AC_PROG_CC])
AC_ARG_VAR(MPICC,[MPI C compiler command])
AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc cmpicc, $CC)
acx_mpi_save_CC="$CC"
LAMMPICC="$CC"
CC="$MPICC"
AC_SUBST(MPICC)
],
[C++], [
AC_REQUIRE([AC_PROG_CXX])
AC_ARG_VAR(MPICXX,[MPI C++ compiler command])
AC_CHECK_PROGS(MPICXX, mpic++ mpicxx mpiCC mpCC hcp mpxlC mpxlC_r cmpic++, $CXX)
acx_mpi_save_CXX="$CXX"
LAMMPICXX="$CXX"
CXX="$MPICXX"
AC_SUBST(MPICXX)
],
[Fortran 77], [
AC_REQUIRE([AC_PROG_F77])
AC_ARG_VAR(MPIF77,[MPI Fortran compiler command])
AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, $F77)
acx_mpi_save_F77="$F77"
LAMMPIF77="$F77"
F77="$MPIF77"
AC_SUBST(MPIF77)
])
if test x = x"$MPILIBS"; then
AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
[C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
[Fortran 77], [AC_MSG_CHECKING([for MPI_Init])
AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" "
AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])])
fi
if test x = x"$MPILIBS"; then
AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"])
fi
if test x = x"$MPILIBS"; then
AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
fi
dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
dnl latter uses $CPP, not $CC (which may be mpicc).
AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
export LAMMPICC="$acx_mpi_save_CC"
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_MSG_RESULT(no)])
unset LAMMPICC
fi],
[C++], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
export LAMMPICXX="$acx_mpi_save_CXX"
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_MSG_RESULT(no)])
unset LAMMPICXX
fi])
AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"],
[C++], [CXX="$acx_mpi_save_CXX"],
[Fortran 77], [F77="$acx_mpi_save_F77"])
AC_SUBST(MPILIBS)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x = x"$MPILIBS"; then
$2
:
else
ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1])
:
fi
])dnl ACX_MPI
dnl
dnl ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl Description
dnl
dnl This macro figures out how to build C programs using POSIX threads. It
dnl sets the PTHREAD_LIBS output variable to the threads library and linker
dnl flags, and the PTHREAD_CFLAGS output variable to any special C compiler
dnl flags that are needed. (The user can also force certain compiler
dnl flags/libs to be tested by setting these environment variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise). (This is
dnl necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl NOTE: You are assumed to not only compile your program with these flags,
dnl but also link it with them as well. e.g. you should link with $PTHREAD_CC
dnl $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
dnl
dnl If you are only building threads programs, you may wish to use these