[petsc-dev] PETSc with CUDA on windows with VS2013 and CUDA 6.5

Paul Mullowney paulmullowney at gmail.com
Fri Sep 5 14:08:13 CDT 2014


Hi,

I've been trying to build PETSc in cygwin with Visual Studio 2013 and CUDA
6.5. I successfully built and ran the PETSc GPU code following the
instructions for building on cygwin. However I ran in to a few problems
along the way. If anyone has insight into the second problem, I would
appreciate it.

1) cuda.py (lines 112, 113):
if not config.setCompilers.Configure.isGNU(self.setCompilers.CC):
  raise RuntimeError('Must use GNU compilers with CUDA')

I had to comment these lines out to enable configuration success.

2) This may be related to why the GNU restriction in 1) was put in place.
Whenever PETSc has to compile a .cu, it fails. For example for a single
threaded build, the first .cu file to be compiled is veccusp.cu. For a
verbose build, I see:

/home/Paul/projects/petsc/bin/win32fe/win32fe nvcc -c -O -arch=sm_30
 --compiler-options="-MT -wd4996 -O2   -I/home/Paul/projects/petsc/include
-I/home/Paul/projects/petsc/cuda_build/include
-I/cygdrive/c/CUDA_6.5/include -I/home/Paul/projects/cusp/
-I/home/Paul/projects/cusp/include -I/cygdrive/c/CUDA_6.5/include/thrust/
-I/home/Paul/projects/petsc/include/mpiuni   "
/home/Paul/projects/petsc/src/vec/vec/impls/seq/seqcusp/veccusp.cu -o
cuda_build/obj/src/vec/vec/impls/seq/seqcusp/veccusp.o # Compile first so
that if there is an error, it comes from a normal compile

veccusp.cu
*nvcc fatal   : redefinition of argument 'optimize'*


However, if I copy and paste the the compile line above and run it in the
terminal, it succeeds. If you do this for every file .cu file in PETSc
(~10-15 files). PETSc will build and work properly on GPUs in cygwin.

I don't know what the problem is here. Insight from anyone with
windows/cygwin/CUDA experience would be much appreciated. I've attached a
configure.log and make.log.

-Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140905/ec62ef18/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 5981136 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140905/ec62ef18/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 11864 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140905/ec62ef18/attachment-0001.obj>


More information about the petsc-dev mailing list