It seemed to me that 'nvcc' was not able to refer the proper x10 header files and libries' path (e.g., Inull/include.) Would you be able to give me some comments how the x10c++'s post nvcc compile step makes the right path?
Best regards, Myoungkyu ============================================================= svn: r19811 $ export CPLUS_INCLUDE_PATH=/usr/local/cuda-3.2/cuda/include $ export LD_LIBRARY_PATH=/usr/local/cuda-3.2/cuda/lib: $ ant dist -DX10RT_CUDA=true -DNO_CHECKS=true -Doptimize=true ============================================================= $ '/home/mksong/x10-trunk-cuda/x10.dist/bin/x10c++' -O -NO_CHECKS -STATIC_CALLS CUDAMatMul.x10 -o CUDAMatMul -report postcompile=5 Output files: [CUDAMatMul.h, CUDAMatMul.cu, CUDAMatMul__MyRail.h, CUDAMatMul.cc] Executing post-compiler nvcc --cubin -Xptxas -v -Inull/include CUDAMatMul.cu Executing post-compiler g++ -g -I/home/mksong/x10-trunk-cuda/x10.dist/include -I/home/mksong/x10-trunk-cuda/x10.dist/stdlib/include -I/home/mksong/x10-trunk-cuda/x10.dist/samples/CUDA -I. -O2 -finline-functions -DNO_TRACING -Wno-long-long -Wno-unused-parameter -DNO_CHECKS -DX10_USE_BDWGC -pthread -o /home/mksong/x10-trunk-cuda/x10.dist/samples/CUDA/CUDAMatMul CUDAMatMul.cc xxx_main_xxx.cc -L/home/mksong/x10-trunk-cuda/x10.dist/stdlib/lib -lgc -lx10 -L/home/mksong/x10-trunk-cuda/x10.dist/lib -lx10rt_sockets -ldl -lm -lpthread -Wl,--rpath -Wl,/home/mksong/x10-trunk-cuda/x10.dist/stdlib/lib -Wl,--rpath -Wl,/home/mksong/x10-trunk-cuda/x10.dist/lib -Wl,-export-dynamic -lrt x10c++: CUDAMatMul.cu:1:27: error: x10aux/config.h: No such file or directory CUDAMatMul.cu:2:34: error: x10aux/cuda_kernel.cuh: No such file or directory x10c++: Non-zero return code: 1 x10c++: Found @CUDA annotation, but not compiling for GPU because nvcc could not be run (check your $PATH). $ $ nvcc --cubin -Xptxas -v -Inull/include CUDAMatMul.cu CUDAMatMul.cu:1:27: error: x10aux/config.h: No such file or directory CUDAMatMul.cu:2:34: error: x10aux/cuda_kernel.cuh: No such file or directory ============================================================= <21:03:28> mksong@cuda:x10-trunk-cuda$ find . | xargs grep -i "nvcc" ... ./x10.compiler/src/x10cuda/visit/CUDACodeGenerator.java: String[] nvccCmd = { "nvcc", "--cubin", "-Xptxas", "-v", ... ------------------------------------------------------------------------------------------------------------------------- >I don't know if -DX10RT_CUDA is sufficient as I always do -DX10RT_CUDA=true > >I don't know why it can't find x10aux/config.h, the nvcc options must be >wrong. Can you run x10c++ with -report postcompile=5 and show the nvcc >line? > >How come you were able to run it if it failed compile? > >By the way that behaviour of CUDAMatMul is consistent with it running on the >CPU instead of on the GPU (and hitting thread limits that are much lower on >the CPU). ------------------------------------------------------------------------------------------------------------------------- > Myoungkyu, > > The 'x10c' and 'x10c++' scripts use their own path to figure out the > location of the X10 distribution. However, when you invoke them via > the PATH, they are unable to figure that out (because their own path > is empty). Always specify a path (either relative or absolute) to > the 'x10c' or 'x10c++' invocations, e.g., 'x10.dist/bin/x10c++' or > '/home/mksong/x10-trunk-cuda/x10.dist/bin/x10c++'. > > And yes, you also need -DX10RT_CUDA=true. > Igor ------------------------------------------------------------------------------------------------------------------------- On Fri, Jan 28, 2011 at 11:57 PM, Myoungkyu Song <mks...@vt.edu> wrote: > Hi, > > I tried to test a CUDA application on the x10.dist, however I have > gotten the following error messages, while X10C++ generated *.cc/h/cu > and a.out. > > ==================================================== > $ svn co https://x10.svn.sourceforge.net/svnroot/x10/trunk x10-trunk-cuda > $ ant -Doptimize=true -DX10RT_CUDA squeakyclean dist > ==================================================== > $ x10c++ -O -NO_CHECKS -STATIC_CALLS CUDAMatMul.x10 -o CUDAMatMul > x10c++: CUDAMatMul.cu:1:27: error: x10aux/config.h: No such file or > directory > CUDAMatMul.cu:2:34: error: x10aux/cuda_kernel.cuh: No such file or > directory > x10c++: Non-zero return code: 1 > x10c++: Found @CUDA annotation, but not compiling for GPU because nvcc > could not be run (check your $PATH). > $ > $ find . -name "config.h" -print > ./x10.dist/stdlib/include/x10aux/config.h > ./x10.runtime/src-cpp/bdwgc/src/libatomic_ops-1.2/src/config.h > ./x10.runtime/src-cpp/x10aux/config.h > $ > $ find . -name "cuda_kernel.cuh" -print > ./x10.dist/stdlib/include/x10aux/cuda_kernel.cuh > ./x10.runtime/src-cpp/x10aux/cuda_kernel.cuh > $ > $ echo $PATH; > > /usr/local/cuda-3.2/cuda/bin:/home/mksong/x10-trunk-cuda/x10.dist/bin:/home/mksong/install/apache-ant-1.8.2/bin:/home/mksong/install/jdk1.6.0_23/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/cuda/bin > $ > $ echo $LD_LIBRARY_PATH > /usr/local/cuda-3.2/cuda/lib:/usr/local/cuda/lib > $ > $ which nvcc; nvcc --version > /usr/local/cuda-3.2/cuda/bin/nvcc > nvcc: NVIDIA (R) Cuda compiler driver > Copyright (c) 2005-2010 NVIDIA Corporation > Built on Wed_Nov__3_16:16:57_PDT_2010 > Cuda compilation tools, release 3.2, V0.2.1221 > $ ls -la > total 2795 > drwxr-xr-x 3 mksong mksong 480 2011-01-28 23:36 . > drwxr-xr-x 7 mksong mksong 712 2011-01-28 21:15 .. > -rw-r--r-- 1 mksong mksong 15149 2011-01-28 21:15 CUDA3DFD.x10 > -rw-r--r-- 1 mksong mksong 8147 2011-01-28 21:15 CUDABlackScholes.x10 > -rw-r--r-- 1 mksong mksong 5514 2011-01-28 21:15 CUDAKernelTest.x10 > -rwxr-xr-x 1 mksong mksong 1416681 2011-01-28 23:36 CUDAMatMul > -rw-r--r-- 1 mksong mksong 708913 2011-01-28 23:35 CUDAMatMul.cc > -rw-r--r-- 1 mksong mksong 617308 2011-01-28 23:35 CUDAMatMul.cu > -rw-r--r-- 1 mksong mksong 5109 2011-01-28 23:35 CUDAMatMul.h > -rw-r--r-- 1 mksong mksong 6065 2011-01-28 23:35 CUDAMatMul__MyRail.h > -rw-r--r-- 1 mksong mksong 37179 2011-01-28 21:15 CUDAMatMul.x10 > -rw-r--r-- 1 mksong mksong 1808 2011-01-28 21:15 CUDATopology.x10 > -rw-r--r-- 1 mksong mksong 12110 2011-01-28 21:15 KMeansCUDA.x10 > drwxr-xr-x 6 mksong mksong 240 2011-01-28 21:15 .svn > -rw-r--r-- 1 mksong mksong 199 2011-01-28 23:36 xxx_main_xxx.cc > $ > $ X10RT_ACCELS=ALL runx10 CUDAMatMul > GC Warning: Repeated allocation of very large block (appr. size 67112960): > May lead to memory leak and poor performance. > > testing sgemm( 'N', 'N', n, n, n, ... ) > > TOO MANY THREADS... ABORTING > terminate called after throwing an instance of 'int' > Aborted > $ > ==================================================== > * OS - Linux version 2.6.24-24-generic (Ubuntu 8.04.2) > * Java - 1.6.0_23 > * g++ - 4.2.4 > * x10c++ - 2.1.1 (r19798 | yzibin | 2011-01-28 20:20:10 -0500) > * cuda - 3.2, V0.2.1221 > $ lspci | grep VGA > 01:00.0 VGA compatible controller: nVidia Corporation Unknown device > 06d1 (rev a3) > 02:00.0 VGA compatible controller: nVidia Corporation Unknown device > 06d1 (rev a3) > ==================================================== > > So, could you give me some comments about the above problems? > > Best regards, > Myoungkyu Song ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users