<div dir="ltr"><div>Hi,</div><div><br></div>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.<div><br></div><div>1) cuda.py (lines 112, 113):</div><div><div>if not config.setCompilers.Configure.isGNU(<a href="http://self.setCompilers.CC">self.setCompilers.CC</a>):</div></div><div><div>  raise RuntimeError('Must use GNU compilers with CUDA')</div></div><div><br></div><div>I had to comment these lines out to enable configuration success.</div><div><br></div><div>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 <a href="http://veccusp.cu">veccusp.cu</a>. For a verbose build, I see:</div><div><br></div><div><div>/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/<a href="http://veccusp.cu">veccusp.cu</a> -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</div><div><br></div><div><a href="http://veccusp.cu">veccusp.cu</a></div><div><b>nvcc fatal   : redefinition of argument 'optimize'</b></div></div><div><br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>-Paul</div></div>