Skip to content

[Rcpp-devel] Why might loadModule() fail?

6 messages · Qiang Kou, Dirk Eddelbuettel, Jeskynar

#
Hi

I'm trying to build the mxnet library from source but the installation is
failing somewhere inside loadModule('mxnet'). There's no error message
(other than ERROR: loading failed). What conditions might cause loadModule
to fail?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200811/79e3b728/attachment.html>
#
I am the original maintainer of the mxnet R package.

Can you give me a little more information?

Best,

KK
On Tue, Aug 11, 2020 at 9:42 AM Jeskynar <jeskynar at gmail.com> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200811/3981dbac/attachment.html>
#
Hi
I've built mxnet 1.7.0 (from branch v1.7.x) on Windows using Visual Studio
2019 successfully.
I've installed CUDA 10.2 and have a GTX1050 GPU.
Whilst building the R package it compiles the mxnet.dll ok then tests the
package can be loaded from the temporary location.
This calls mxnet/R-pacakge/zzz.R which does this:
library.dynam('libmxnet')
library.dynam('mxnet')
loadModule('mxnet', TRUE)
It fails inside the loadModule.
I'm trying to determine what possible problems might cause that.
Thanks for any tips!
Andrew
On Tue, 11 Aug 2020 at 17:52, Qiang Kou <qkou at qkou.info> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200811/13518116/attachment.html>
#
On 11 August 2020 at 18:26, Jeskynar wrote:
| I've built mxnet 1.7.0 (from branch v1.7.x) on Windows using Visual Studio
| 2019 successfully.

Maybe see the Rcpp FAQ, particularly question 2.9 ?

Dirk
#
Sorry for the confusion, mxnet is built with VS2019 but the R module is
still built using RTools.
Presumably the DLLs are compatible once compiled (after all, mxnet R used
to work a few years ago).
On Tue, 11 Aug 2020 at 18:37, Dirk Eddelbuettel <edd at debian.org> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200811/10face1c/attachment.html>
#
On 11 August 2020 at 20:17, Jeskynar wrote:
| Sorry for the confusion, mxnet is built with VS2019 but the R module is
| still built using RTools.
| Presumably the DLLs are compatible once compiled (after all, mxnet R used
| to work a few years ago).

"Maybe."  It is a less-commonly traveled way to go about it.

And we cannot really help you without a MCVE.

If I were you, I'd take a minimal working demo Modules package, rebuild it to
show it work, and then incrementally (and slowly) add the features that
pertain to your currently broken setup. And rebuild frequently and check to
see it still works.

If it should "just work" as you say, then linking with it and calling an
initializer, or versionGetter, or ... should be enough.  If it doesn't then
you have at least a smaller setup to sort out.

Dirk