[petsc-dev] buildsystem: cusp location

Satish Balay balay at mcs.anl.gov
Sun Mar 25 11:59:28 CDT 2012


On Sun, 25 Mar 2012, Sean Farley wrote:

> So, I wanted to try out cuda (since I heard you can get 400x speedup) but I
> ran into a problem with cusp. I specified where I installed cusp:
> --with-cusp-dir=$HOME/local but configure gave the error:
> 
> *******************************************************************************
>          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for
> details):
> -------------------------------------------------------------------------------
> --with-cusp-dir=/opt/local did not work
> *******************************************************************************
> 
> Looking at configure.log, I see that flag passed to nvcc is -I$HOME/local
> instead of -I$HOME/local/include. Investigating even more, cusp.py has the
> following line:
> 
> self.includedir = 'include' # default and --download have different
> includedirs
> 
> I consider this a flaw. Just because a library doesn't build a .so /
> .dylib, we shove the header files anywhere? From what I can see, we could
> either:
> 
> 1) [backwards compatible] search both --with-cusp-dir=$FOO and $FOO/include
> 
> 2) set self.includedir = 'include' permanently; not just in Install()
> 
> I was never any good at Jenga so (2) is what I prefer :-) Thoughts?
> 

When configure is doing --download-cusp - it can determine how cusp is
organized. [I think we try to place in PETSC_DIR/PETSC_ARCH/include.
But since cusp decides how it installs itself [say user installs and
installs manually] - we try to support that mode using
--with-cusp-dir= option. There is no 'include/' dir in that mode of
install.

Yes - currently the situation is not ideal. The ideal situation is
folks install cusp thrust - the recommended way - i.e along with cuda
in cuda includes. One has to do this with thrust anyway - otherwise
nvcc will always pick up thrust bundled with cuda - and now what you
specify with -I/path-to-thrust.

The other problem currently with cusp/thrust is - we've been using dev
snapshot of cusp/thrust for a while. I don't know if there is a
release snapshot of these packages that we can switch to now [or not].

Satish



More information about the petsc-dev mailing list