[cig-commits] r20256 - short/3D/PyLith/pylith_installer/trunk
brad at geodynamics.org
brad at geodynamics.org
Thu May 31 18:00:08 PDT 2012
Author: brad
Date: 2012-05-31 18:00:08 -0700 (Thu, 31 May 2012)
New Revision: 20256
Modified:
short/3D/PyLith/pylith_installer/trunk/INSTALL
short/3D/PyLith/pylith_installer/trunk/Makefile.am
short/3D/PyLith/pylith_installer/trunk/configure.ac
Log:
Added cuda flags to installer.
Modified: short/3D/PyLith/pylith_installer/trunk/INSTALL
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/INSTALL 2012-05-31 23:45:46 UTC (rev 20255)
+++ short/3D/PyLith/pylith_installer/trunk/INSTALL 2012-06-01 01:00:08 UTC (rev 20256)
@@ -289,7 +289,27 @@
--with-make-threads=2 \
--prefix=$HOME/pylith
+---------
+CUDA SUPPORT
+---------
+ **WARNING** Recommended for expert users only!
+
+ You must have installed the CUDA toolkit and driver. If your GPU
+ does not support double-precision floating point operations you must
+ build PETSc with single-precision support (which does not work with
+ some PETSc external packages such as ParMetis/Metis and ML).
+
+ Add the following option to the installer configure:
+ --with-cuda
+
+ If building PETSc in single precision, also add
+ --petsc_options="--with-precision=single"
+
+ If you installed cusp to a custom location, then also add
+ --petsc_options="--with-cusp-dir=REPLACE_WITH_CUSP_DIR"
+
+
----------------------------------------------------------------------
STEP 3 - Setup your environment
----------------------------------------------------------------------
Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am 2012-05-31 23:45:46 UTC (rev 20255)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am 2012-06-01 01:00:08 UTC (rev 20256)
@@ -659,6 +659,9 @@
if INSTALL_HDF5
petsc_options += --with-hdf5-include=$(prefix)/include --with-hdf5-lib=$(prefix)/lib/libhdf5.dylib --LIBS=-lz
endif
+if WITH_CUDA
+petsc_options += --with-cuda=1 --with-cusp=1 --with-thrust=1 --with-nvcc=$(NVCC)
+endif
if USE_PYLITH_SVN
hg clone http://petsc.cs.iit.edu/petsc/petsc-dev
cd petsc-dev/config && \
@@ -706,6 +709,9 @@
if WITH_TESTING
pylith_options += --enable-testing
endif
+if WITH_CUDA
+pylith_options += --enable-cuda
+endif
if USE_PYLITH_SVN
pylith_options += --enable-swig
$(SVN) co http://geodynamics.org/svn/cig/short/3D/PyLith/$(pylith_svn) pylith-$(PYLITH_VER)
Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac 2012-05-31 23:45:46 UTC (rev 20255)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac 2012-06-01 01:00:08 UTC (rev 20256)
@@ -177,7 +177,6 @@
[install_mercurial=no])
AM_CONDITIONAL([INSTALL_MERCURIAL], [test "$install_mercurial" = yes])
-
# PYTHIA
install_pythia=no
if test "$install_nemesis" = yes; then
@@ -251,6 +250,14 @@
[with_h5py=no])
AM_CONDITIONAL([WITH_H5PY], [test "$with_h5py" = yes])
+# CUDA
+AC_ARG_WITH([cuda],
+ [AC_HELP_STRING([--with-cuda],
+ [enable CUDA support in PETSc and PyLith @<:@default=no@:>@])],
+ [if test "$withval" = yes; then with_cuda=yes; else with_cuda=no; fi],
+ [with_cuda=no])
+AM_CONDITIONAL([WITH_CUDA], [test "$with_cuda" = yes])
+
# PETSC options
AC_ARG_WITH([petsc-options],
[AC_HELP_STRING([--with-petsc-options],
@@ -511,6 +518,15 @@
fi
fi
+# CUDA
+if test "$with_cuda" = yes ; then
+ AC_PATH_PROG(NVCC, nvcc)
+ if test -z "$NVCC" ; then
+ AC_MSG_FAILURE([cannot find 'nvcc'.])
+ NVCC=`echo "Error: CUDA is not installed." ; false`
+ fi
+fi
+
# PETSC
if test "$install_petsc" = yes ; then
PETSC_DIR=$prefix
More information about the CIG-COMMITS
mailing list