Unfortunately it doesn't work. I'll send the logs to petsc-maint, but here's the error. If you remove these lines:
#ifndef PETSC_HAVE___INT64 #define PETSC_HAVE___INT64 1 #endif from $PETSC_ARCH/include/petscconf.h, it builds ok (and make test passes). Here's the error: nvcc -O -arch=sm_20 -c --compiler-options=-fPIC -I/home/jfe/local/petsc-dev/include -I/home/jfe/local/petsc-dev/intel-opt-cuda-precise/include -I/usr/local/cuda/include -I/home/jfe/local/petsc-dev/intel-opt-cuda-precise/include/txpetscgpu/include -I/usr/local/encap/platform_mpi-8.01/include -D__INSDIR__=src/vec/vec/impls/seq/seqcusp/ veccusp.cu /home/jfe/local/petsc-dev/include/petscsys.h(219): error: identifier "__int64" is undefined John On Fri, Feb 24, 2012 at 10:53 AM, Satish Balay <balay at mcs.anl.gov> wrote: > >>>>>>>>>> > --compiler-bindir <directory> (-ccbin) > Specify the directory in which the compiler executable (Microsoft > Visual Studion cl, or a gcc derivative) resides. By default, this > executable is expected in the current executable search path. > <<<<<<<< > > It says it will look for the default compiler in the specified path - > and doesn't mention that it can switch the compiler. Ah - the manpage > is misleading.. Looks like '--ccbin icc' works.. > > balay at bb30:~/junk>nvcc -v -ccbin icc sizeof.c > #$ _SPACE_= > #$ _CUDART_=cudart > #$ _HERE_=/usr/local/cuda/bin > #$ _THERE_=/usr/local/cuda/bin > #$ _TARGET_SIZE_=64 > #$ TOP=/usr/local/cuda/bin/.. > #$ > LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib:/soft/intel/11.0.081/lib/intel64:/soft/intel/11.0.081/lib/intel64:/usr/local/cuda/lib64:/usr/local/cuda/lib64 > #$ > PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/soft/intel/11.0.081/bin/intel64:/soft/intel/11.0.081/bin/intel64:/usr/mpi/gcc/mvapich2-1.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/cuda/bin:/usr/local/cuda/bin > #$ INCLUDES="-I/usr/local/cuda/bin/../include" > "-I/usr/local/cuda/bin/../include/cudart" > #$ LIBRARIES= "-L/usr/local/cuda/bin/../lib64" -lcudart > #$ CUDAFE_FLAGS= > #$ OPENCC_FLAGS= > #$ PTXAS_FLAGS= > #$ icc -c -x c "-I/usr/local/cuda/bin/../include" > "-I/usr/local/cuda/bin/../include/cudart" -m64 -o > "/tmp/tmpxft_00000199_00000000-1_sizeof.o" "sizeof.c" > #$ icpc -m64 -o "a.out" -Wl,--start-group > "/tmp/tmpxft_00000199_00000000-1_sizeof.o" > "-L/usr/local/cuda/bin/../lib64" -lcudart -Wl,--end-group > balay at bb30:~/junk> > > > So '--with-cc=icc' --with-nvcc='nvcc --ccbin icc' should work.. Will > check.. > > Satish > > On Fri, 24 Feb 2012, John Fettig wrote: > > > Some time ago I asked about using icc with nvcc. You can use icc with > nvcc > > by passing it as an argument: > > > > nvcc -ccbin /path/to/icc > > > > Has anybody tried building PETSc with CUDA this way? > > > > John > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120224/00168d40/attachment.html>
