<div class="gmail_quote">On Fri, Feb 24, 2012 at 10:51, John Fettig <span dir="ltr"><<a href="mailto:john.fettig@gmail.com">john.fettig@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unfortunately it doesn't work.  I'll send the logs to petsc-maint, but here's the error.  If you remove these lines:<br><br>#ifndef PETSC_HAVE___INT64<br>#define PETSC_HAVE___INT64 1<br>#endif<br></blockquote>
<div><br></div><div>What system uses __int64? If we have stdint.h, we should use int64_t because that is the standard.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>from $PETSC_ARCH/include/petscconf.h, it builds ok (and make test passes).  Here's the error:<br>


<br>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/ <a href="http://veccusp.cu" target="_blank">veccusp.cu</a><br>



/home/jfe/local/petsc-dev/include/petscsys.h(219): error: identifier "__int64" is undefined<br><font color="#888888"><br>John</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 10:53 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>>>>>>>>>><br>
--compiler-bindir <directory>               (-ccbin)<br>
        Specify the directory in which the compiler executable (Microsoft<br>
        Visual Studion cl, or a gcc derivative) resides. By default, this<br>
        executable is expected in the current executable search path.<br>
<<<<<<<<<br>
<br>
It says it will look for the default compiler in the specified path -<br>
and doesn't mention that it can switch the compiler. Ah - the manpage<br>
is misleading.. Looks like '--ccbin icc' works..<br>
<br>
balay@bb30:~/junk>nvcc -v -ccbin icc sizeof.c<br>
#$ _SPACE_=<br>
#$ _CUDART_=cudart<br>
#$ _HERE_=/usr/local/cuda/bin<br>
#$ _THERE_=/usr/local/cuda/bin<br>
#$ _TARGET_SIZE_=64<br>
#$ TOP=/usr/local/cuda/bin/..<br>
#$ 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<br>
#$ 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<br>




#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"<br>
#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib64" -lcudart<br>
#$ CUDAFE_FLAGS=<br>
#$ OPENCC_FLAGS=<br>
#$ PTXAS_FLAGS=<br>
#$ 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"<br>
#$ 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<br>
balay@bb30:~/junk><br>
<br>
<br>
So '--with-cc=icc' --with-nvcc='nvcc --ccbin icc' should work.. Will check..<br>
<span><font color="#888888"><br>
Satish<br>
</font></span><div><div><br>
On Fri, 24 Feb 2012, John Fettig wrote:<br>
<br>
> Some time ago I asked about using icc with nvcc.  You can use icc with nvcc<br>
> by passing it as an argument:<br>
><br>
> nvcc -ccbin /path/to/icc<br>
><br>
> Has anybody tried building PETSc with CUDA this way?<br>
><br>
> John<br>
><br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>