problem compiling cusp examples

583 views
Skip to first unread message

aes....@gmail.com

unread,
Feb 20, 2014, 12:58:22 PM2/20/14
to cusp-...@googlegroups.com
I am a new user to cusp, experienced with cuda sparse matrix multiplication and cudaBlas. Yesterday I installed current versions cuda and cusp according to instructions, including updating PATH and LD_LIBRARY_PATH and compiled `version` ok. The output is as follows:

The following libraries were found:
    CUDA   v5.5
    Thrust v1.7.0
    Cusp   v0.3.0

When attempting to compile one of the solver examples however I get the following error:

nvcc cg.cu -o cg
In file included from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/detail/device/spmv/coo_flat.h:21:0,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/detail/device/multiply.h:23,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/detail/dispatch/multiply.h:20,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/detail/multiply.inl:17,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/multiply.h:90,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/krylov/detail/cg.inl:20,
                 from /usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/krylov/cg.h:132,
                 from cg.cu:3:
/usr/local/cuda/bin/../targets/x86_64-linux/include/cusp/detail/device/arch.h:22:44: fatal error: thrust/system/cuda/detail/arch.h: No such file or directory
compilation terminated.
 
The file arch.h is located in cusp/detail/device/arch.h not in thrust/system/cuda/detail/arch.h.

When I attempt compilation with an explicit path to this file I still get similar errors.

nvcc cg.cu -o cg \
-I/usr/local/cuda/include \
-I/usr/local/cuda/targets/x86_64-linux/include/cusp/detail/device/arch.h

In file included from /usr/local/cuda/include/cusp/detail/device/spmv/coo_flat.h:21:0,
                 from /usr/local/cuda/include/cusp/detail/device/multiply.h:23,
                 from /usr/local/cuda/include/cusp/detail/dispatch/multiply.h:20,
                 from /usr/local/cuda/include/cusp/detail/multiply.inl:17,
                 from /usr/local/cuda/include/cusp/multiply.h:90,
                 from /usr/local/cuda/include/cusp/krylov/detail/cg.inl:20,
                 from /usr/local/cuda/include/cusp/krylov/cg.h:132,
                 from cg.cu:3:
/usr/local/cuda/include/cusp/detail/device/arch.h:22:44: fatal error: thrust/system/cuda/detail/arch.h: No such file or directory
compilation terminated.

I use Ubuntu 12.04LTS and gcc version is gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3.

I updated the PATH and LD_LIBRARY_PATH as follows:

export PATH=/usr/local/cuda-5.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:$LD_LIBRARY_PATH

There is a softlink in /usr/local, apparently created by the ubuntu installer:

cuda -> cuda-5.5

Other than the os I believe I have the latest versions of all packages. Is there an incompatibility with the versions of gcc? CUDA? Cusp? Thrust? 

Any help would be appreciated.

Thanks, Jack

steve

unread,
Feb 20, 2014, 1:07:51 PM2/20/14
to cusp-...@googlegroups.com
Hello Jack,

    Thrust v1.7.0 renamed a few architecture related files such as thrust/system/cuda/detail/arch.h. Can you try updating to CUSP v0.4.0 at https://github.com/cusplibrary/cusplibrary? That should fix the file naming issues.

Regards,
  Steve
--
You received this message because you are subscribed to the Google Groups "cusp-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cusp-users+...@googlegroups.com.
To post to this group, send email to cusp-...@googlegroups.com.
Visit this group at http://groups.google.com/group/cusp-users.
For more options, visit https://groups.google.com/groups/opt_out.

aes....@gmail.com

unread,
Feb 20, 2014, 1:41:14 PM2/20/14
to cusp-...@googlegroups.com
Hello Steve,
Thanks for your suggestion. Please pardon my ignorance but the only version I can find at the address you suggested is v0.3.0.
Jack

steve

unread,
Feb 20, 2014, 1:45:28 PM2/20/14
to cusp-...@googlegroups.com
May be something related to the github interface. You should be able to switch between each branch and download v0.4.0. Does the following link work for you?
https://github.com/cusplibrary/cusplibrary/archive/0.4.0.zip
--

aes....@gmail.com

unread,
Feb 20, 2014, 3:00:12 PM2/20/14
to cusp-...@googlegroups.com
Steve,
Got v0.4.0 downloaded and cg.cu compiled and run. Thank you for your help. I believe much of my problem has been with the Chromium browser. Ubuntu issued an update for this browser today but I haven't installed it yet.
Thanks again,
Jack
Reply all
Reply to author
Forward
0 new messages