Discussion:
[Rcpp-devel] using SparseSuite and RcppEigen in package
Simon Barthelmé
2018-01-17 12:10:08 UTC
Permalink
Dear all,

I'm trying to use some CHOLMOD functionality inside an R package
(specifically, sparse Cholesky updates/downdates). There's an
CHOLMOD/Eigen interface for that, but unfortunately the header I need is
not shipped as part of either the Matrix package or the Rcpp package.
The file is cholmod_modify.h, and it does appear in the src/ directory
of the Matrix package, but not in the include/ directory.

If I include it by hand I risk version conflicts, because the rest of
CHOLMOD is provided by the Matrix package via RcppEigen. What's the
clean way of handling that? Thanks for your input!

Best

Simon Barthelme
Dirk Eddelbuettel
2018-01-17 12:35:47 UTC
Permalink
On 17 January 2018 at 13:10, Simon Barthelmé wrote:
| I'm trying to use some CHOLMOD functionality inside an R package
| (specifically, sparse Cholesky updates/downdates). There's an
| CHOLMOD/Eigen interface for that, but unfortunately the header I need is
| not shipped as part of either the Matrix package or the Rcpp package.
| The file is cholmod_modify.h, and it does appear in the src/ directory
| of the Matrix package, but not in the include/ directory.
|
| If I include it by hand I risk version conflicts, because the rest of
| CHOLMOD is provided by the Matrix package via RcppEigen. What's the
| clean way of handling that? Thanks for your input!

I know "some" (eg rstan) have completemented the BH package with local
headers when BH was missing what they needed (as BH grew, I think we by now
added all they need). So you could just do that, being careful to stick with
the same version.

Or would Yixuan's RSpectra help? https://cran.r-project.org/package=RSpectra

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Yixuan Qiu
2018-01-17 12:50:13 UTC
Permalink
RSpectra does not use CHOLMOD, so probably it is not helpful here.

I would suggest that you build CHOLMOD as an external library with
headers, and then directly link Eigen and your code to the external
CHOLMOD, ignoring the one shipped with Matrix. It is just like all
other R packages that require external libraries.


Best,
Yixuan
Post by Dirk Eddelbuettel
| I'm trying to use some CHOLMOD functionality inside an R package
| (specifically, sparse Cholesky updates/downdates). There's an
| CHOLMOD/Eigen interface for that, but unfortunately the header I need is
| not shipped as part of either the Matrix package or the Rcpp package.
| The file is cholmod_modify.h, and it does appear in the src/ directory
| of the Matrix package, but not in the include/ directory.
|
| If I include it by hand I risk version conflicts, because the rest of
| CHOLMOD is provided by the Matrix package via RcppEigen. What's the
| clean way of handling that? Thanks for your input!
I know "some" (eg rstan) have completemented the BH package with local
headers when BH was missing what they needed (as BH grew, I think we by now
added all they need). So you could just do that, being careful to stick with
the same version.
Or would Yixuan's RSpectra help? https://cran.r-project.org/package=RSpectra
Dirk
--
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Yixuan Qiu <***@cos.name>
Department of Statistics,
Purdue University
Simon Barthelmé
2018-01-17 14:06:18 UTC
Permalink
Hi Dirk,

Thanks for your suggestion - I had thought of doing that but it requires
tracking the versions of SuiteSparse used by Matrix, which means extra
maintenance work. OTOH maybe updates are rare enough that it's not worth
worrying about. It'd be nice if Matrix could expose more of SuiteSparse,
though, I'm sure I'm not the only one who needs that stuff.

Best

Simon
Post by Dirk Eddelbuettel
| I'm trying to use some CHOLMOD functionality inside an R package
| (specifically, sparse Cholesky updates/downdates). There's an
| CHOLMOD/Eigen interface for that, but unfortunately the header I need is
| not shipped as part of either the Matrix package or the Rcpp package.
| The file is cholmod_modify.h, and it does appear in the src/ directory
| of the Matrix package, but not in the include/ directory.
|
| If I include it by hand I risk version conflicts, because the rest of
| CHOLMOD is provided by the Matrix package via RcppEigen. What's the
| clean way of handling that? Thanks for your input!
I know "some" (eg rstan) have completemented the BH package with local
headers when BH was missing what they needed (as BH grew, I think we by now
added all they need). So you could just do that, being careful to stick with
the same version.
Or would Yixuan's RSpectra help? https://cran.r-project.org/package=RSpectra
Dirk
Martyn Plummer
2018-01-17 17:23:18 UTC
Permalink
I think it is worth asking Martin Maechler if he could expose more
SuiteSparse functionality through the Matrix package.

Martyn
Post by Simon Barthelmé
Hi Dirk,
Thanks for your suggestion - I had thought of doing that but it requires
tracking the versions of SuiteSparse used by Matrix, which means extra
maintenance work. OTOH maybe updates are rare enough that it's not worth
worrying about. It'd be nice if Matrix could expose more of SuiteSparse,
though, I'm sure I'm not the only one who needs that stuff.
Best
Simon
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
I'm trying to use some CHOLMOD functionality inside an R package
(specifically, sparse Cholesky updates/downdates). There's an
CHOLMOD/Eigen interface for that, but unfortunately the header I need is
not shipped as part of either the Matrix package or the Rcpp package.
The file is cholmod_modify.h, and it does appear in the src/ directory
of the Matrix package, but not in the include/ directory.
If I include it by hand I risk version conflicts, because the rest of
CHOLMOD is provided by the Matrix package via RcppEigen. What's the
clean way of handling that? Thanks for your input!
I know "some" (eg rstan) have completemented the BH package with local
headers when BH was missing what they needed (as BH grew, I think we by now
added all they need). So you could just do that, being careful to stick with
the same version.
Or would Yixuan's RSpectra help? https://cran.r-project.org/package=RSpectra
Dirk
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Dmitriy Selivanov
2018-01-18 11:03:35 UTC
Permalink
I was going to suggest the same - Martin is very responsive and open for
improvements.

18 яМв. 2018 г. 15:00 пПльзПватель <
rcpp-devel-***@lists.r-forge.r-project.org> МапОсал:

Send Rcpp-devel mailing list submissions to
rcpp-***@lists.r-forge.r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.r-forge.r-project.org/cgi-bin/mailman/
listinfo/rcpp-devel

or, via email, send a message with subject or body 'help' to
rcpp-devel-***@lists.r-forge.r-project.org

You can reach the person managing the list at
rcpp-devel-***@lists.r-forge.r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rcpp-devel digest..."


Today's Topics:

1. Re: using SparseSuite and RcppEigen in package (Martyn Plummer)


----------------------------------------------------------------------

Message: 1
Date: Wed, 17 Jan 2018 17:23:18 +0000
From: Martyn Plummer <***@iarc.fr>
To: "***@gipsa-lab.fr" <***@gipsa-lab.fr>,
"***@debian.org" <***@debian.org>,
"rcpp-***@lists.r-forge.r-project.org"
<rcpp-***@lists.r-forge.r-project.org>
Subject: Re: [Rcpp-devel] using SparseSuite and RcppEigen in package
Message-ID: <***@iarc.fr>
Content-Type: text/plain; charset="utf-8"

I think it is worth asking Martin Maechler if he could expose more
SuiteSparse functionality through the Matrix package.

Martyn
Post by Simon Barthelmé
Hi Dirk,
Thanks for your suggestion - I had thought of doing that but it requires
tracking the versions of SuiteSparse used by Matrix, which means extra
maintenance work. OTOH maybe updates are rare enough that it's not worth
worrying about. It'd be nice if Matrix could expose more of SuiteSparse,
though, I'm sure I'm not the only one who needs that stuff.
Best
Simon
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
I'm trying to use some CHOLMOD functionality inside an R package
(specifically, sparse Cholesky updates/downdates). There's an
CHOLMOD/Eigen interface for that, but unfortunately the header I need
is
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
not shipped as part of either the Matrix package or the Rcpp package.
The file is cholmod_modify.h, and it does appear in the src/ directory
of the Matrix package, but not in the include/ directory.
If I include it by hand I risk version conflicts, because the rest of
CHOLMOD is provided by the Matrix package via RcppEigen. What's the
clean way of handling that? Thanks for your input!
I know "some" (eg rstan) have completemented the BH package with local
headers when BH was missing what they needed (as BH grew, I think we by
now
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
added all they need). So you could just do that, being careful to
stick with
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
the same version.
Or would Yixuan's RSpectra help? https://cran.r-project.org/
package=RSpectra
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Dirk
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
------------------------------

_______________________________________________
Rcpp-devel mailing list
Rcpp-***@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

End of Rcpp-devel Digest, Vol 99, Issue 6
*****************************************
Simon Barthelmé
2018-01-18 11:20:00 UTC
Permalink
Thanks everyone, I'll try and submit a pull request when I have a minute.

Best

Simon
Post by Dmitriy Selivanov
I was going to suggest the same - Martin is very responsive and open
for improvements.
18 яМв. 2018 г. 15:00 пПльзПватель
Send Rcpp-devel mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
<https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel>
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rcpp-devel digest..."
1. Re: using SparseSuite and RcppEigen in package (Martyn Plummer)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jan 2018 17:23:18 +0000
Subject: Re: [Rcpp-devel] using SparseSuite and RcppEigen in package
Content-Type: text/plain; charset="utf-8"
I think it is worth asking Martin Maechler if he could expose more
SuiteSparse functionality through the Matrix package.
Martyn
Post by Simon Barthelmé
Hi Dirk,
Thanks for your suggestion - I had thought of doing that but it
requires
Post by Simon Barthelmé
tracking the versions of SuiteSparse used by Matrix, which means
extra
Post by Simon Barthelmé
maintenance work. OTOH maybe updates are rare enough that it's
not worth
Post by Simon Barthelmé
worrying about. It'd be nice if Matrix could expose more of
SuiteSparse,
Post by Simon Barthelmé
though, I'm sure I'm not the only one who needs that stuff.
Best
Simon
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
I'm trying to use some CHOLMOD functionality inside an R package
(specifically, sparse Cholesky updates/downdates). There's an
CHOLMOD/Eigen interface for that, but unfortunately the
header I need is
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
not shipped as part of either the Matrix package or the Rcpp
package.
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
The file is cholmod_modify.h, and it does appear in the src/
directory
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
of the Matrix package, but not in the include/ directory.
If I include it by hand I risk version conflicts, because
the rest of
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
CHOLMOD is provided by the Matrix package via RcppEigen.
What's the
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Post by Simon Barthelmé
clean way of handling that? Thanks for your input!
I know "some" (eg rstan) have completemented the BH package
with local
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
headers when BH was missing what they needed (as BH grew, I
think we by now
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
added all they need). So you could just do that, being
careful to stick with
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
the same version.
Or would Yixuan's RSpectra help?
https://cran.r-project.org/package=RSpectra
<https://cran.r-project.org/package=RSpectra>
Post by Simon Barthelmé
Post by Dirk Eddelbuettel
Dirk
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
<https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel>
------------------------------
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
<https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel>
End of Rcpp-devel Digest, Vol 99, Issue 6
*****************************************
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Loading...