[Rcpp-devel] Recommendations on how to incorporate pmvnorm function

Scott Monroe monroeleescott at gmail.com
Mon Jan 27 00:28:56 CET 2014

I've tried to build the package without the Makefile.  I get an error
referring to 'gfortran-4.2'.  I have 'gfortran-4.9' on my machine.  Any
suggestions for where to look would be appreciated.  Thanks.

clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
 -UNDEBUG -Wall -pedantic -g -O0 -fPIC  -mtune=core2 -g -O2  -c
RcppExports.cpp -o RcppExports.o
gfortran-4.2 -arch x86_64  -g -O0 -fPIC  -g -O2  -c mvt.f -o mvt.o
make: gfortran-4.2: No such file or directory
make: *** [mvt.o] Error 1
ERROR: compilation failed for package 'M2'
* removing
Error: Command failed (1)

On Sun, Jan 26, 2014 at 11:15 AM, Dirk Eddelbuettel <edd at debian.org> wrote:

> Scott,
> On 26 January 2014 at 10:58, Scott Monroe wrote:
> | I was hoping for advice on approaches to accomplishing the following
> goal.
> | I'd like to create an R package using Rcpp that calls the pmvnorm (cdf
> for
> | multivariate normal) function from the mvtnorm library.  I'd like to
> avoid
> | calling it through R, as I need to do it many times, and I'd like to
> avoid the
> | overhead in going between C++ and R.
> |
> | The source code, written by Alan Genz, is in Fortran.  I've also found on
> | GitHub a C++ wrapped version of the Fortran code:
> |
> | https://github.com/zhanxw/libMvtnorm
> |
> | The latter includes a Makefile, which I don't know how to handle.
> Sorry to break this to you on a Sunday.  You will not make very far in
> programming if that remains an obstacle for you.  You really should buckle
> down and read a few tutorial or books on this.  It. Is. Not. That. Hard.
> Especially with R. And Rcpp. And existing packages -- at current count 164
> on
> CRAN alone.  Look at their sources.  Many/most get by without a Makefile
> because R knows how to "Do The Right Thing". Including with Fortran.
> Now, the proper long-term solution is probably to talk to Torsten to have
> the
> relevant functions exported from his mvtnorm package so that other CRAN
> package can re-use the code.
> But it's a big world. Maybe someone will write this for you out of the
> kindness of their hearts, or maybe you can pay someoone.
> Dirk
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140126/0d84d1df/attachment.html>

More information about the Rcpp-devel mailing list