[petsc-dev] buildsystem: cusp location
Satish Balay
balay at mcs.anl.gov
Sun Mar 25 12:51:16 CDT 2012
On Sun, 25 Mar 2012, Jed Brown wrote:
> On Sun, Mar 25, 2012 at 12:16, Satish Balay <balay at mcs.anl.gov> wrote:
>
> > I don't see how the above is abusing --with-cusp-dir=
> > option. --with-package-dir option - by definition is to specify the
> > default install root dir of the given package. [assuming all packages
> > default to PACKAGE_DIR/include is wrong].
> >
>
> Okay, but apparently we see it installed this way in practice.
Cusp installer is nothing but unzip. The recommended installation
methond is:
https://code.google.com/p/cusp-library/wiki/QuickStartGuide
>>>>>>>>
Simply download the newest version of Cusp from here and extract the contents of each zip file to a directory. We suggest installing Cusp to the CUDA include directory, which is usually
/usr/local/cuda/include/ on a Linux and Mac OSX
C:\CUDA\include\ on a Windows system
If you are unable to install to the CUDA include directory, then you can place the files somewhere in your home directory, for example: /home/nathan/cuda_libraries/cusp/.
Warning: Do not install Cusp to a standard include path like /usr/local/include/. It appears that nvcc treats such paths differently than the suggestions above which causes errors like error: expected primary-expression before ‘<’ token.
<<<<<<<<<<<
In the above example --with-cusp-dir=/home/nathan/cuda_libraries/cusp/ would have worked.
So when one specifies --with-cusp-dir=/opt/local to petsc configure
and expects -I/opt/local/include to work - the install process was perhaps:
cd /opt/local/include
unzip cusp.zip
[i.e equivalent to using --prefix=/opt/local/include]
Note: one case where users stumble with specifying cusp to cuda is:
- unzip at say /home/nathan/soft
[but this creates stuff like /home/nathan/soft/cusp/*.h]
- Now use --with-cusp-dir=/home/nathan/soft/cusp [but this is wrong - and broken]
Satish
More information about the petsc-dev
mailing list