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 Dave Cunningham <sparkpr...@gmail.com> wrote on 01/29/2011 08:53:44 AM: > 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). > > > > 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 -- Igor Peshansky (note the spelling change!) IBM T.J. Watson Research Center X10: Parallel Productivity and Performance (http://x10-lang.org/) XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/) "I hear and I forget. I see and I remember. I do and I understand" -- Xun Zi ------------------------------------------------------------------------------ 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