[mlpack] why is ARMA_64BIT_WORD disabled ?
Ryan Curtin
ryan at ratml.org
Fri Apr 24 11:38:14 EDT 2015
On Fri, Apr 24, 2015 at 05:17:50PM +0200, Julien Dorval wrote:
> Hello everyone,
>
> I am completely new in the MLPACK community, I'm trying to get it to
> work for the moment, I'm particularly interested in the EMST. I
> tried a bit by myself, but I'd rather ask competent people instead
> of breaking things on my own. I managed to get cmake what it wanted,
> but the compilation stops at:
>
> dorval at zoidberg:~/peoples_codes/mlpack/mlpack-master/build: make
> ...
> _/usr/include/armadillo_bits/compiler_setup.hpp:191:111: note:
> #pragma message: WARNING: compiler is in C++11 mode, but it has
> incomplete support for C++11 features;__
> __/usr/include/armadillo_bits/compiler_setup.hpp:192:86: note:
> #pragma message: WARNING: if something breaks, you get to keep all
> the pieces__
> __/usr/include/armadillo_bits/compiler_setup.hpp:193:93: note:
> #pragma message: WARNING: To forcefully prevent Armadillo from using
> C++11 features,__
> __/usr/include/armadillo_bits/compiler_setup.hpp:194:90: note:
> #pragma message: WARNING: #define ARMA_DONT_USE_CXX11 before
> #include <armadillo>_
> ...
Hi Julien,
What compiler are you using? Is it possible that you could use a newer
compiler with C++11 support? Also, what was the CMake output? Did it
say "Checking for C++11 compiler - unavailable" and continue anyway?
The error you get, even after defining ARMA_DONT_USE_CXX11, is a C++11
related error:
> /home/dorval/peoples_codes/mlpack/mlpack-master/src/mlpack/core/dists/discrete_distribution.cpp:7:
> /home/dorval/peoples_codes/mlpack/mlpack-master/src/mlpack/../mlpack/core/dists/gaussian_distribution.hpp:34:42:
> erreur: both ‘const’ and ‘constexpr’ cannot be used here
> make[3]: ***
> [src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o]
> Erreur 1
> make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Erreur 2
> make[1]: *** [src/mlpack/methods/emst/CMakeFiles/emst.dir/rule] Erreur 2
> make: *** [emst] Erreur 2
The master branch of mlpack does require a C++11 compiler, but, older
versions (1.0.12 or older) can use a regular C++03 compiler. So maybe
you should try downloading an older version of mlpack, and an older
version of Armadillo. The emst code should run at about the same speed.
> Ok, so I tried to solve this myself by adding
>
> #define ARMA_DONT_USE_CXX11
>
> before :
>
> #include <armadillo>
>
>
> In build/include/mlpack/core/arma_extend/arma_extend.hpp and
> src/mlpack/core/arma_extend/arma_extend.hpp
>
>
> Now the compilation does this:
>
> ...
> note: #pragma message: mlpack was compiled with ARMA_64BIT_WORD, but
> you are compiling wit
> hout ARMA_64BIT_WORD. This will almost certainly cause irreparable
> disaster. Either enable ARMA_64BIT_WORD in your application which
> is using mlpack, or, recompile mlpack against a version of Arma
> dillo which has ARMA_64BIT_WORD disabled.
> ...
>
> I'm using armadillo 5.0 which I understand has ARMA_64BIT_WORD
> enabled by default. Why wasn't MLPACK compiled with ARMA_64BIT_WORD
> ? Am I not actually compiling mlpack right now ?
So, this message is actually a red herring. I wrote some CMake scripts
which check for ARMA_64BIT_WORD in Armadillo and then ensure that the
same setting is enabled for the compilation of the mlpack library. But
these scripts count on ARMA_DONT_USE_CXX11 being defined -- which it
isn't for libmlpack.so, except for the modification that you made. In
this particular case, I *think* you can ignore this warning because of
the change you made, but I really think your best bet is getting a new
compiler.
In the case that a new compiler is out of the question (i.e. if you're
on a departmental system and the IT team moves slower than molasses,
etc.), probably pairing mlpack 1.0.12 with Armadillo 3 or 4 should give
you working results. I think.
I hope this is helpful -- please let me know if I can clarify anything
further.
Thanks,
Ryan
--
Ryan Curtin | "If it's something that can be stopped, then just try to stop it!"
ryan at ratml.org | - Skull Kid
More information about the mlpack
mailing list