--- rmpi-0.6-6.orig/configure +++ rmpi-0.6-6/configure @@ -627,6 +627,7 @@ EGREP GREP CPP +PKGCONFIG OBJEXT EXEEXT ac_ct_CC @@ -653,6 +654,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -727,6 +729,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -979,6 +982,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1116,7 +1128,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1269,6 +1281,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2148,8 +2161,13 @@ fi -CC=`"${R_HOME}/bin/R" CMD config CC` -CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +## Set R_HOME, respecting an environment variable if one is set +: ${R_HOME=$(R RHOME)} +if test -z "${R_HOME}"; then + as_fn_error $? "Could not determine R_HOME." "$LINENO" 5 +fi +CC=$(${R_HOME}/bin/R CMD config CC) +CFLAGS=$(${R_HOME}/bin/R CMD config CFLAGS) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2944,9 +2962,66 @@ CC="gcc -std=gnu99" fi -if test -z "$MPI_ROOT" ; then +## check for pkg-config + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PKGCONFIG"; then + ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PKGCONFIG="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PKGCONFIG=$ac_cv_prog_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +#W Use pkg-config, ass +if test x"${PKGCONFIG}" == x"yes"; then + ## check for version + OMPI_VERSION=$(pkg-config --modversion ompi) + if test -n "$OMPI_VERSION"; then + PKG_CFLAGS=$(pkg-config --cflags ompi) + PKG_LIBS=$(pkg-config --libs ompi) + + MPI_DEFS="-DMPI2" + MPITYPE="OPENMPI" + + PKG_CPPFLAGS="${PKG_CFLAGS} ${MPI_DEFS} -D${MPITYPE}" + + fi +fi + +if test -z "MPITYPE"; then + if test -z "$MPI_ROOT" ; then for d in /opt/lib /usr/lib /usr /usr/local/lib /usr/local \ - /usr/lib64/mpi/gcc/openmpi; do + /usr/lib64/mpi/gcc/openmpi /usr/lib/x86_64-linux-gnu; do if test -f $d/include/mpi.h && test -d $d/lib/openmpi; then echo "I am here $d and it is OpenMPI" MPI_ROOT=$d @@ -3011,29 +3086,29 @@ break fi done -fi + fi -if test -n "$MPI_ROOT"; then - #guess MPITYPE if it is unknown and user supplies MPI_ROOT - if test $MPITYPE = "UNKNOWN" ; then - if test -d ${MPI_ROOT}/openmpi; then - MPITYPE="OPENMPI" - elif test -d ${MPI_ROOT}/lib/openmpi; then - MPITYPE="OPENMPI" - elif test -d ${MPI_ROOT}/lib64/openmpi; then - MPITYPE="OPENMPI" - elif test -f ${MPI_ROOT}/lib/liblam.so; then - MPITYPE="LAM" - elif test -d ${MPI_ROOT}/lib/lam; then - MPITYPE="LAM" - elif test -d ${MPI_ROOT}/lib64/lam; then - MPITYPE="LAM" - elif test -f ${MPI_ROOT}/lib/libmpich.a; then - MPITYPE="MPICH" - elif test -f ${MPI_ROOT}/lib64/libmpich.a; then - MPITYPE="MPICH" - fi + if test -n "$MPI_ROOT"; then + #guess MPITYPE if it is unknown and user supplies MPI_ROOT + if test $MPITYPE = "UNKNOWN" ; then + if test -d ${MPI_ROOT}/openmpi; then + MPITYPE="OPENMPI" + elif test -d ${MPI_ROOT}/lib/openmpi; then + MPITYPE="OPENMPI" + elif test -d ${MPI_ROOT}/lib64/openmpi; then + MPITYPE="OPENMPI" + elif test -f ${MPI_ROOT}/lib/liblam.so; then + MPITYPE="LAM" + elif test -d ${MPI_ROOT}/lib/lam; then + MPITYPE="LAM" + elif test -d ${MPI_ROOT}/lib64/lam; then + MPITYPE="LAM" + elif test -f ${MPI_ROOT}/lib/libmpich.a; then + MPITYPE="MPICH" + elif test -f ${MPI_ROOT}/lib64/libmpich.a; then + MPITYPE="MPICH" fi + fi echo "Trying to find mpi.h ..." if test -f ${MPI_ROOT}/include/mpi.h; then echo "Found in ${MPI_ROOT}/include" @@ -3049,7 +3124,7 @@ echo "Please use --with-mpi=/path/to/mpi or specify the environment variable MPI_ROOT" exit 1 fi -else + else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3456,33 +3531,33 @@ fi -fi + fi -echo "Trying to find libmpi.so or libmpich.a ..." -if test -f ${MPI_ROOT}/lib/libmpi.so; then + echo "Trying to find libmpi.so or libmpich.a ..." + if test -f ${MPI_ROOT}/lib/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib" MPI_LIBPATH="${MPI_ROOT}/lib" -elif test -f ${MPI_ROOT}/libmpi.so; then - echo "Found libmpi in ${MPI_ROOT}" + elif test -f ${MPI_ROOT}/libmpi.so; then + echo "Found libmpi in ${MPI_ROOT}" MPI_LIBPATH="${MPI_ROOT}" -elif test -f ${MPI_ROOT}/lib/openmpi/libmpi.so; then + elif test -f ${MPI_ROOT}/lib/openmpi/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib/openmpi" MPI_LIBPATH="${MPI_ROOT}/lib/openmpi" -elif test -f ${MPI_ROOT}/lib64/openmpi/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/openmpi/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64/openmpi" MPI_LIBPATH="${MPI_ROOT}/lib64/openmpi" -elif test -f ${MPI_ROOT}/lib64/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64" MPI_LIBPATH="${MPI_ROOT}/lib64" -elif test -f ${MPI_ROOT}/lib/lam/libmpi.so; then + elif test -f ${MPI_ROOT}/lib/lam/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib/lam" MPI_LIBPATH="${MPI_ROOT}/lib/lam" MPI_INCL2="-I${MPI_INCLUDE_PATH}/32" -elif test -f ${MPI_ROOT}/lib64/lam/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/lam/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64/lam" MPI_LIBPATH="${MPI_ROOT}/lib64/lam" MPI_INCL2="-I${MPI_INCLUDE_PATH}/64" -elif test -f ${MPI_ROOT}/lib/libmpich.so; then + elif test -f ${MPI_ROOT}/lib/libmpich.so; then echo "Found libmpich in ${MPI_ROOT}/lib" MPI_LIBPATH="${MPI_ROOT}/lib" ac_fn_c_check_decl "$LINENO" "MPICH2" "ac_cv_have_decl_MPICH2" "#include @@ -3514,7 +3589,7 @@ MPI_DEFS="-DMPI2" fi -elif test -f ${MPI_ROOT}/lib64/libmpich.a; then + elif test -f ${MPI_ROOT}/lib64/libmpich.a; then echo "Found libmpich in ${MPI_ROOT}/lib64" MPI_LIBPATH="${MPI_ROOT}/lib64" ac_fn_c_check_decl "$LINENO" "MPICH2" "ac_cv_have_decl_MPICH2" "#include @@ -3546,7 +3621,7 @@ MPI_DEFS="-DMPI2" fi -else + else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmpi" >&5 $as_echo_n "checking for main in -lmpi... " >&6; } if ${ac_cv_lib_mpi_main+:} false; then : @@ -3585,9 +3660,8 @@ fi -fi -if test "$MPITYPE" = "OPENMPI" ; then + if test "$MPITYPE" = "OPENMPI" ; then # Extract the first word of "orted", so it can be a program name with args. set dummy orted; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -3629,9 +3703,9 @@ if test "$ORTED" = no ; then as_fn_error $? "Cannot find orted. Rmpi needs orted to run." "$LINENO" 5 fi -fi + fi -if test "$MPITYPE" = "LAM" ; then + if test "$MPITYPE" = "LAM" ; then echo "Try to find liblam.so ..." if test -f ${MPI_ROOT}/lib/liblam.so; then echo "Found liblam in ${MPI_ROOT}/lib" @@ -3680,12 +3754,12 @@ fi fi -fi + fi + fi -fi -## now we have found the include and lib paths and may know the type + ## now we have found the include and lib paths and may know the type -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 $as_echo_n "checking for openpty in -lutil... " >&6; } if ${ac_cv_lib_util_openpty+:} false; then : $as_echo_n "(cached) " >&6 @@ -3725,7 +3799,7 @@ MPI_LIBS="$MPI_LIBS -lutil" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 @@ -3760,13 +3834,13 @@ fi -if test "$MPITYPE" = "OPENMPI" -o "$MPITYPE" = "LAM" -o "$MPITYPE" = "MPICH2" -o "$MPITYPE" = "INTELMPI" -o "$MPITYPE" = "CRAY"; then + if test "$MPITYPE" = "OPENMPI" -o "$MPITYPE" = "LAM" -o "$MPITYPE" = "MPICH2" -o "$MPITYPE" = "INTELMPI" -o "$MPITYPE" = "CRAY"; then MPI_DEFS="-DMPI2" -fi + fi -PKG_CPPFLAGS="-I${MPI_INCLUDE_PATH} ${MPI_INCL2} ${MPI_DEFS} -D${MPITYPE}" + PKG_CPPFLAGS="-I${MPI_INCLUDE_PATH} ${MPI_INCL2} ${MPI_DEFS} -D${MPITYPE}" -case "$MPITYPE" in + case "$MPITYPE" in OPENMPI) PKG_LIBS="-L${MPI_LIBPATH} -lmpi ${MPI_LIBS}" ;; @@ -3788,7 +3862,14 @@ *) as_fn_error $? "Unknown type of mpi: use --with-Rmpi-type or RMPI_TYPE to specify it" "$LINENO" 5 ;; -esac + esac + fi +fi + +echo "MPI_DEFS: ${MPI_DEFS}" +echo "MPITYPE : ${MPITYPE}" +echo "CPPFLAGS: ${PKG_CPPFLAGS}" +echo "LIBS: ${PKG_LIBS}" --- rmpi-0.6-6.orig/configure.ac +++ rmpi-0.6-6/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. - + AC_INIT(DESCRIPTION) ## One way is to specify both include and lib paths @@ -71,17 +71,43 @@ fi ] ) -CC=`"${R_HOME}/bin/R" CMD config CC` -CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +## Set R_HOME, respecting an environment variable if one is set +: ${R_HOME=$(R RHOME)} +if test -z "${R_HOME}"; then + AC_MSG_ERROR([Could not determine R_HOME.]) +fi +CC=$(${R_HOME}/bin/R CMD config CC) +CFLAGS=$(${R_HOME}/bin/R CMD config CFLAGS) AC_PROG_CC if test "X$CC" = "X" ; then # Our best guess... CC="gcc -std=gnu99" fi -if test -z "$MPI_ROOT" ; then +## check for pkg-config +AC_DEFUN([AC_PROG_PKGCONFIG], [AC_CHECK_PROG(PKGCONFIG,pkg-config,yes)]) +AC_PROG_PKGCONFIG + +#W Use pkg-config, ass +if test x"${PKGCONFIG}" == x"yes"; then + ## check for version + OMPI_VERSION=$(pkg-config --modversion ompi) + if test -n "$OMPI_VERSION"; then + PKG_CFLAGS=$(pkg-config --cflags ompi) + PKG_LIBS=$(pkg-config --libs ompi) + + MPI_DEFS="-DMPI2" + MPITYPE="OPENMPI" + + PKG_CPPFLAGS="${PKG_CFLAGS} ${MPI_DEFS} -D${MPITYPE}" + + fi +fi + +if test -z "MPITYPE"; then + if test -z "$MPI_ROOT" ; then for d in /opt/lib /usr/lib /usr /usr/local/lib /usr/local \ - /usr/lib64/mpi/gcc/openmpi; do + /usr/lib64/mpi/gcc/openmpi /usr/lib/x86_64-linux-gnu; do if test -f $d/include/mpi.h && test -d $d/lib/openmpi; then echo "I am here $d and it is OpenMPI" MPI_ROOT=$d @@ -146,29 +172,29 @@ break fi done -fi + fi -if test -n "$MPI_ROOT"; then - #guess MPITYPE if it is unknown and user supplies MPI_ROOT - if test $MPITYPE = "UNKNOWN" ; then - if test -d ${MPI_ROOT}/openmpi; then - MPITYPE="OPENMPI" - elif test -d ${MPI_ROOT}/lib/openmpi; then - MPITYPE="OPENMPI" - elif test -d ${MPI_ROOT}/lib64/openmpi; then - MPITYPE="OPENMPI" - elif test -f ${MPI_ROOT}/lib/liblam.so; then - MPITYPE="LAM" - elif test -d ${MPI_ROOT}/lib/lam; then - MPITYPE="LAM" - elif test -d ${MPI_ROOT}/lib64/lam; then - MPITYPE="LAM" - elif test -f ${MPI_ROOT}/lib/libmpich.a; then - MPITYPE="MPICH" - elif test -f ${MPI_ROOT}/lib64/libmpich.a; then - MPITYPE="MPICH" - fi + if test -n "$MPI_ROOT"; then + #guess MPITYPE if it is unknown and user supplies MPI_ROOT + if test $MPITYPE = "UNKNOWN" ; then + if test -d ${MPI_ROOT}/openmpi; then + MPITYPE="OPENMPI" + elif test -d ${MPI_ROOT}/lib/openmpi; then + MPITYPE="OPENMPI" + elif test -d ${MPI_ROOT}/lib64/openmpi; then + MPITYPE="OPENMPI" + elif test -f ${MPI_ROOT}/lib/liblam.so; then + MPITYPE="LAM" + elif test -d ${MPI_ROOT}/lib/lam; then + MPITYPE="LAM" + elif test -d ${MPI_ROOT}/lib64/lam; then + MPITYPE="LAM" + elif test -f ${MPI_ROOT}/lib/libmpich.a; then + MPITYPE="MPICH" + elif test -f ${MPI_ROOT}/lib64/libmpich.a; then + MPITYPE="MPICH" fi + fi echo "Trying to find mpi.h ..." if test -f ${MPI_ROOT}/include/mpi.h; then echo "Found in ${MPI_ROOT}/include" @@ -184,60 +210,59 @@ echo "Please use --with-mpi=/path/to/mpi or specify the environment variable MPI_ROOT" exit 1 fi -else + else AC_CHECK_HEADER(mpi.h,, AC_MSG_ERROR(["Cannot find mpi.h header file"])) -fi + fi -echo "Trying to find libmpi.so or libmpich.a ..." -if test -f ${MPI_ROOT}/lib/libmpi.so; then + echo "Trying to find libmpi.so or libmpich.a ..." + if test -f ${MPI_ROOT}/lib/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib" MPI_LIBPATH="${MPI_ROOT}/lib" -elif test -f ${MPI_ROOT}/libmpi.so; then -dnl This is what Fedora 10 had + elif test -f ${MPI_ROOT}/libmpi.so; then + dnl This is what Fedora 10 had echo "Found libmpi in ${MPI_ROOT}" MPI_LIBPATH="${MPI_ROOT}" -elif test -f ${MPI_ROOT}/lib/openmpi/libmpi.so; then + elif test -f ${MPI_ROOT}/lib/openmpi/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib/openmpi" MPI_LIBPATH="${MPI_ROOT}/lib/openmpi" -elif test -f ${MPI_ROOT}/lib64/openmpi/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/openmpi/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64/openmpi" MPI_LIBPATH="${MPI_ROOT}/lib64/openmpi" -elif test -f ${MPI_ROOT}/lib64/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64" MPI_LIBPATH="${MPI_ROOT}/lib64" -elif test -f ${MPI_ROOT}/lib/lam/libmpi.so; then + elif test -f ${MPI_ROOT}/lib/lam/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib/lam" MPI_LIBPATH="${MPI_ROOT}/lib/lam" MPI_INCL2="-I${MPI_INCLUDE_PATH}/32" -elif test -f ${MPI_ROOT}/lib64/lam/libmpi.so; then + elif test -f ${MPI_ROOT}/lib64/lam/libmpi.so; then echo "Found libmpi in ${MPI_ROOT}/lib64/lam" MPI_LIBPATH="${MPI_ROOT}/lib64/lam" MPI_INCL2="-I${MPI_INCLUDE_PATH}/64" -elif test -f ${MPI_ROOT}/lib/libmpich.so; then + elif test -f ${MPI_ROOT}/lib/libmpich.so; then echo "Found libmpich in ${MPI_ROOT}/lib" MPI_LIBPATH="${MPI_ROOT}/lib" AC_CHECK_DECLS([MPICH2, MPICH2],[ MPI_DEFS="-DMPI2" ],, [#include ]) -elif test -f ${MPI_ROOT}/lib64/libmpich.a; then + elif test -f ${MPI_ROOT}/lib64/libmpich.a; then echo "Found libmpich in ${MPI_ROOT}/lib64" MPI_LIBPATH="${MPI_ROOT}/lib64" AC_CHECK_DECLS([MPICH2, MPICH2],[ MPI_DEFS="-DMPI2" ],, [#include ]) -else + else AC_CHECK_LIB(mpi, main, MPI_LIBPATH="${MPI_ROOT}/lib", [ echo "libmpi not found. exiting..." exit 1 ] -) -fi + ) -if test "$MPITYPE" = "OPENMPI" ; then + if test "$MPITYPE" = "OPENMPI" ; then AC_CHECK_PROG(ORTED, orted, yes, no) if test "$ORTED" = no ; then AC_MSG_ERROR(Cannot find orted. Rmpi needs orted to run.) fi -fi + fi -if test "$MPITYPE" = "LAM" ; then + if test "$MPITYPE" = "LAM" ; then echo "Try to find liblam.so ..." if test -f ${MPI_ROOT}/lib/liblam.so; then echo "Found liblam in ${MPI_ROOT}/lib" @@ -253,22 +278,22 @@ [ echo "liblam not found. Probably not LAM-MPI"] ) fi -fi + fi + fi dnl end of 'paths not specified' -fi dnl end of 'paths not specified' -## now we have found the include and lib paths and may know the type + ## now we have found the include and lib paths and may know the type -AC_CHECK_LIB(util, openpty, [ MPI_LIBS="$MPI_LIBS -lutil" ]) -AC_CHECK_LIB(pthread, main, [ MPI_LIBS="$MPI_LIBS -lpthread" ]) + AC_CHECK_LIB(util, openpty, [ MPI_LIBS="$MPI_LIBS -lutil" ]) + AC_CHECK_LIB(pthread, main, [ MPI_LIBS="$MPI_LIBS -lpthread" ]) -if test "$MPITYPE" = "OPENMPI" -o "$MPITYPE" = "LAM" -o "$MPITYPE" = "MPICH2" -o "$MPITYPE" = "INTELMPI" -o "$MPITYPE" = "CRAY"; then + if test "$MPITYPE" = "OPENMPI" -o "$MPITYPE" = "LAM" -o "$MPITYPE" = "MPICH2" -o "$MPITYPE" = "INTELMPI" -o "$MPITYPE" = "CRAY"; then MPI_DEFS="-DMPI2" -fi + fi -PKG_CPPFLAGS="-I${MPI_INCLUDE_PATH} ${MPI_INCL2} ${MPI_DEFS} -D${MPITYPE}" + PKG_CPPFLAGS="-I${MPI_INCLUDE_PATH} ${MPI_INCL2} ${MPI_DEFS} -D${MPITYPE}" -case "$MPITYPE" in + case "$MPITYPE" in OPENMPI) PKG_LIBS="-L${MPI_LIBPATH} -lmpi ${MPI_LIBS}" ;; @@ -290,7 +315,14 @@ *) AC_MSG_ERROR([Unknown type of mpi: use --with-Rmpi-type or RMPI_TYPE to specify it]) ;; -esac + esac + fi +fi + +echo "MPI_DEFS: ${MPI_DEFS}" +echo "MPITYPE : ${MPITYPE}" +echo "CPPFLAGS: ${PKG_CPPFLAGS}" +echo "LIBS: ${PKG_LIBS}" AC_SUBST(PKG_CPPFLAGS) AC_SUBST(PKG_LIBS) --- rmpi-0.6-6.orig/debian/changelog +++ rmpi-0.6-6/debian/changelog @@ -0,0 +1,317 @@ +rmpi (0.6-6-4build1) artful; urgency=medium + + * No-change rebuild to pick up r-api-3.4 + + -- Graham Inggs Wed, 27 Sep 2017 10:03:45 +0000 + +rmpi (0.6-6-4) unstable; urgency=medium + + * src/Rmpi.c: Also explicitly check for libmpi.so.20 as dlopen() is + required with some flags to resolve linking (Closes: #861748) + + -- Dirk Eddelbuettel Sat, 06 May 2017 14:45:22 -0500 + +rmpi (0.6-6-3) unstable; urgency=medium + + * configure.ac: Rewritten in terms of pkg-config + * debian/control: Added pkg-config to Build-Depends + + -- Dirk Eddelbuettel Fri, 06 Jan 2017 07:17:27 -0600 + +rmpi (0.6-6-2) unstable; urgency=medium + + * configure.ac: Add a new location for mpi.h to account for updated + layout in Open MPI 2.0; will send upstream too (Closes: #850336) + * configure: Updated accordingly + + -- Dirk Eddelbuettel Thu, 05 Jan 2017 19:59:00 -0600 + +rmpi (0.6-6-1) unstable; urgency=medium + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Sat, 25 Jun 2016 07:43:11 -0500 + +rmpi (0.6-5-1) unstable; urgency=low + + * New upstream release + + -- Dirk Eddelbuettel Wed, 21 May 2014 06:52:16 -0500 + +rmpi (0.6-4-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + + -- Dirk Eddelbuettel Sat, 17 May 2014 06:48:06 -0500 + +rmpi (0.6-3-2) unstable; urgency=low + + * src/Rmpi.c: Applied patch from Don Armstrong to check for libmpi.so.0 + and libmpi.so.1 which has been forwarded upstream (Closes: #741297) + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Tue, 25 Mar 2014 06:16:15 -0500 + +rmpi (0.6-3-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + + * (Re-)building with R 3.0.0 (beta) + + -- Dirk Eddelbuettel Tue, 26 Mar 2013 14:37:20 -0500 + +rmpi (0.6-2-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + * debian/control: Added 'mpi-default-bin' to Build-Depends: + + -- Dirk Eddelbuettel Sun, 10 Mar 2013 20:22:05 -0500 + +rmpi (0.6-1-1) unstable; urgency=low + + * New upstream release + + -- Dirk Eddelbuettel Mon, 20 Aug 2012 05:18:07 -0500 + +rmpi (0.6-0-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + + -- Dirk Eddelbuettel Wed, 08 Aug 2012 17:13:58 -0500 + +rmpi (0.5-9-3) unstable; urgency=low + + * configure.ac: Modified to cope with MPICH2 which should help with + architectures which cannot provide OpenMPI + + * debian/control: Set Build-Depends: to current R version + * debian/control: Change Depends to ${R:Depends} + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Tue, 15 May 2012 16:13:17 -0500 + +rmpi (0.5-9-2) unstable; urgency=low + + * Rebuilt for R 2.14.0 so that a default NAMESPACE file is created + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Sat, 22 Oct 2011 17:05:39 -0500 + +rmpi (0.5-9-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Tue, 30 Nov 2010 18:49:40 -0600 + +rmpi (0.5-8-2) unstable; urgency=low + + * debian/rules: Pass extra argument '--no-test-load' to R CMD INSTALL + as we would need an MPI env. to load Rmpi (Closes: #584353) + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Thu, 03 Jun 2010 09:50:18 -0500 + +rmpi (0.5-8-1) unstable; urgency=low + + * New upstream release + + * debian/control: Set (Build-)Depends: to current R version + + -- Dirk Eddelbuettel Tue, 19 Jan 2010 13:39:49 -0600 + +rmpi (0.5-7-4) unstable; urgency=low + + * Rebuilt for R 2.10.0 to work with new R-internal help file conversion + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Tue, 03 Nov 2009 14:02:14 -0600 + +rmpi (0.5-7-3) unstable; urgency=low + + * debian/control: Corrected typo and set Depends: to mpi-default-bin + + -- Dirk Eddelbuettel Mon, 01 Jun 2009 21:29:17 -0500 + +rmpi (0.5-7-2) unstable; urgency=low + + * debian/control: Rewrote dependency on MPI using the new meta-packages + mpi-default-dev (for Build-Depends:) and mpi-default-bin (for Depends:) + now that Open MPI 1.3.2 has hit unstable + + * debian/control: Changed Section: to new section 'gnu-r' + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version 3.8.1 + + -- Dirk Eddelbuettel Mon, 01 Jun 2009 14:12:02 -0500 + +rmpi (0.5-7-1) unstable; urgency=low + + * New upstream release + + -- Dirk Eddelbuettel Fri, 20 Feb 2009 17:38:55 -0600 + +rmpi (0.5-6-3) unstable; urgency=low + + * src/Rmpi.c: Applied a miniscule patch to set the dlopen() flag to + RTLD_GLOBAL | RTLD_LAZY which stops a most annoying segmentation fault + on amd64. Patch reported upstream to Rmpi and Open MPI after a chase + of almost two weeks. Big thanks to Jeff Squires from Open MPI for his + help in narrowing this down. + + -- Dirk Eddelbuettel Sun, 08 Feb 2009 08:51:19 -0600 + +rmpi (0.5-6-2) unstable; urgency=low + + * Rebuilt under Open MPI 1.3 + + * debian/control: (Build-)Depends: on Open MPI tightened to (>= 1.3) + * debian/control: (Build-)Depends: updated to r-base-(core|dev) (>= 2.8.2) + + -- Dirk Eddelbuettel Mon, 26 Jan 2009 21:10:26 -0600 + +rmpi (0.5-6-1) unstable; urgency=low + + * New upstream release + + * debian/control: (Build-)Depends: updated to r-base-dev (>= 2.8.0) + * debian/control: Standards-Version: upgradeded to current version + + -- Dirk Eddelbuettel Sat, 06 Dec 2008 08:48:11 -0600 + +rmpi (0.5-5-2) unstable; urgency=low + + * debian/control: Set versioned Build-Depends on libopenmpi-dev (>= 1.2.4-5) + + * configure.ac, configure: Patched to also search in /usr/lib/openmpi + for include/mpi.h and libraries; patch sent upstream; will be in next + (upstream) release 0.5-6 (Closes: #456851) + + -- Dirk Eddelbuettel Wed, 19 Dec 2007 16:22:44 -0600 + +rmpi (0.5-5-1) unstable; urgency=low + + * New upstream release + + * debian/control: Split (Build-)Depends: on MPI libraries: + libopenmpi-dev [i386 amd64 alpha ia64 powerpc sparc], + lam4-dev [!i386 !amd64 !alpha !ia64 !powerpc !sparc] + in other words we use LAM as the fallback where Open MPI is not avilable + + * Built with R 2.6.0, so setting (Build-)Depends: to + 'r-base-(core|dev) >= 2.6.0' to prevent move to testing before R 2.6.0 + + -- Dirk Eddelbuettel Wed, 24 Oct 2007 09:37:21 -0500 + +rmpi (0.5-4-2) unstable; urgency=low + + * src/Rmpi.c: Patch suggested by upstream to silence the (erroneous) + Open MPI 'osc pt2pt' warning message + + * debian/control: Add 'openmpi-bin' to Depends: as the mpirun (aka + orterun) frontend is needed + + -- Dirk Eddelbuettel Wed, 10 Oct 2007 12:52:58 -0500 + +rmpi (0.5-4-1) unstable; urgency=low + + * New upstream release + * Built with R 2.6.0 release candidate, setting (Build-)Depends: to + 'r-base-(core|dev) >> 2.5.1' to prevent move to testing before R 2.6.0 + + * Switched to using Open MPI (instead of LAM/MPI) + * debian/control: Set Build-Depends: to on libopenmpi-dev + + -- Dirk Eddelbuettel Wed, 03 Oct 2007 20:31:28 -0500 + +rmpi (0.5-3-1) unstable; urgency=low + + * New upstream release + + * debian/rules: Simplified to cdbs-based one-liner sourcing r-cran.mk + * debian/control: Build-Depends: updated to r-base-dev (>= 2.4.0) + * debian/control: Standards-Version: upgradeded to 3.7.2 + + -- Dirk Eddelbuettel Thu, 12 Oct 2006 18:22:57 -0500 + +rmpi (0.5-2-1) unstable; urgency=low + + * New upstream release + + -- Dirk Eddelbuettel Wed, 5 Apr 2006 21:18:50 -0500 + +rmpi (0.5-1-1) unstable; urgency=low + + * New upstream release + + * debian/post{inst,rm}: Really no longer call R to update html index + + -- Dirk Eddelbuettel Thu, 5 Jan 2006 20:54:37 -0600 + +rmpi (0.5-0-1) unstable; urgency=low + + * New upstream release + + * debian/watch: Updated regular expression + * debian/post{inst,rm}: No longer call R to update html index + + -- Dirk Eddelbuettel Mon, 28 Nov 2005 20:35:21 -0600 + +rmpi (0.4.9-2) unstable; urgency=low + + * Rebuilt against newer lam library for C++ transition (Closes: #329486) + * debian/control: Updated Build-Depends: to lam4-dev (>= 7.1.1-3.2) + + * debian/watch: Corrected regular expression (thanks, Rafael Laboissier) + * debian/post{inst,rm}: Call /usr/bin/R explicitly (thanks, Kurt Hornik) + * debian/control: Upgraded Standards-Version: to 3.6.2.1 + + -- Dirk Eddelbuettel Thu, 22 Sep 2005 00:40:10 -0500 + +rmpi (0.4.9-1) unstable; urgency=low + + * New upstream release + + -- Dirk Eddelbuettel Mon, 9 May 2005 21:17:05 -0500 + +rmpi (0.4.8-2) unstable; urgency=low + + * Rebuilt under R 2.0.0 + * debian/control: Updated Build-Depends: and Depends: accordingly + * debian/post{inst,rm}: Only run build-help.pl if R is installed + * debian/watch: Added watch file + * debian/control: Added Suggests: r-cran-rsprng + + -- Dirk Eddelbuettel Fri, 8 Oct 2004 20:23:16 -0500 + +rmpi (0.4.8-1) unstable; urgency=low + + * Initial Debian Release + + -- Dirk Eddelbuettel Sat, 10 Jul 2004 21:59:13 -0500 + + --- rmpi-0.6-6.orig/debian/compat +++ rmpi-0.6-6/debian/compat @@ -0,0 +1 @@ +5 --- rmpi-0.6-6.orig/debian/control +++ rmpi-0.6-6/debian/control @@ -0,0 +1,16 @@ +Source: rmpi +Section: gnu-r +Priority: optional +Maintainer: Dirk Eddelbuettel +Build-Depends: debhelper (>= 7.0.0), cdbs, r-base-dev (>= 3.3.0), mpi-default-dev, mpi-default-bin, pkg-config +Standards-Version: 3.9.7 + +Package: r-cran-rmpi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${R:Depends}, mpi-default-bin +Suggests: r-cran-rsprng +Description: GNU R package interfacing MPI libraries for distributed computing + This CRAN package provides an interface to the MPI (Message-Passing + Interface) API. It also provides an interactive R slave environment + in which distributed statistical computing can be carried out. + --- rmpi-0.6-6.orig/debian/copyright +++ rmpi-0.6-6/debian/copyright @@ -0,0 +1,34 @@ +This is the Debian GNU/Linux r-cran-rmpi package of Rmpi, an interface +package for GNU R providing access to the MPI (Message-Passing +Interface) API with interactive R slave functionalities. Rmpi was +written by Hao Yu. + +This package was created by Dirk Eddelbuettel . +The sources were downloaded from + http://cran.us.r-project.org/src/contrib/ + +The package was renamed from its upstream name 'Rmpi' to 'r-cran-rmpi' +to highlight the fact that is it a CRAN package for R. + +Copyright (C) 2003 - 2008 Hao Yu + +License: GPL-2 + +On a Debian GNU/Linux system, the GPL license (v2) is included in the file +/usr/share/common-licenses/GPL-2. + +For reference, the upstream DESCRIPTION file is included below: + + Package: Rmpi + Version: 0.4-8 + Date: 2004-04-21 + Title: Interface (Wrapper) to MPI (Message-Passing Interface) + Author: Hao Yu + Maintainer: Hao Yu + Depends: R (>= 1.8.1) + Description: Rmpi provides an interface (wrapper) to MPI APIs. It also + provides interactive R slave environment in which + distributed statistical computing can be carried out. + License: GPL version 2 or newer + URL: http://www.stats.uwo.ca/faculty/yu/Rmpi + Packaged: Thu Apr 22 10:03:22 2004; hyu --- rmpi-0.6-6.orig/debian/overrides +++ rmpi-0.6-6/debian/overrides @@ -0,0 +1 @@ +r-cran-rmpi: executable-not-elf-or-script ./usr/lib/R/site-library/Rmpi/Rslaves.bat --- rmpi-0.6-6.orig/debian/rules +++ rmpi-0.6-6/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules file for the Debian/GNU Linux r-cran-rmpi package +# Copyright 2003-2010 by Dirk Eddelbuettel + +include /usr/share/R/debian/r-cran.mk + +##extraInstallFlags="--configure-args=--with-mpi=/usr/lib/openmpi" +extraInstallFlags="--no-test-load" --- rmpi-0.6-6.orig/debian/watch +++ rmpi-0.6-6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://cran.r-project.org/src/contrib/Rmpi_(.*)\.tar.gz --- rmpi-0.6-6.orig/src/Makevars +++ rmpi-0.6-6/src/Makevars @@ -0,0 +1,5 @@ +# -*- Makefile -*- vim : ft = make + +PKG_CPPFLAGS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -pthread -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -DMPI2 -DOPENMPI +PKG_CFLAGS = $(ARCHCFLAGS) +PKG_LIBS = -L/usr/lib/openmpi/lib -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags -lmpi $(ARCHLIB) --- rmpi-0.6-6.orig/src/Rmpi.c +++ rmpi-0.6-6/src/Rmpi.c @@ -74,7 +74,8 @@ #ifndef __APPLE__ #ifdef OPENMPI - if (!dlopen("libmpi.so.1", RTLD_GLOBAL | RTLD_LAZY) + if (!dlopen("libmpi.so.20", RTLD_GLOBAL | RTLD_LAZY) + && !dlopen("libmpi.so.1", RTLD_GLOBAL | RTLD_LAZY) && !dlopen("libmpi.so.0", RTLD_GLOBAL | RTLD_LAZY) && !dlopen("libmpi.so", RTLD_GLOBAL | RTLD_LAZY)) { Rprintf("%s\n",dlerror());