Compilation fails: .size() invoked on arma::rowvec

Asked by Roberto Alessi

Compiling dolfin (development), by means of dorsal, leads to the following error:

[ 55%] Building CXX object dolfin/CMakeFiles/dolfin.dir/fem/DofMapBuilder.cpp.o
[ 55%] Building CXX object dolfin/CMakeFiles/dolfin.dir/fem/SystemAssembler.cpp.o
/home/roberto/computer/programs_software/dorsal/FEniCS/src/dolfin/dolfin/fem/SystemAssembler.cpp: In static member function 'static void dolfin::SystemAssembler::apply_bc(double*, double*, const Map&, const std::vector<const std::vector<int>*>&)':
/home/roberto/computer/programs_software/dorsal/FEniCS/src/dolfin/dolfin/fem/SystemAssembler.cpp:599:50: error: 'arma::rowvec' has no member named 'size'
make[2]: *** [dolfin/CMakeFiles/dolfin.dir/fem/SystemAssembler.cpp.o] Error 1
make[2]: Leaving directory `/home/roberto/computer/programs_software/dorsal/FEniCS/src/dolfin/dorsal_build_dir'
make[1]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2
make[1]: Leaving directory `/home/roberto/computer/programs_software/dorsal/FEniCS/src/dolfin/dorsal_build_dir'
make: *** [all] Error 2
make: Leaving directory `/home/roberto/computer/programs_software/dorsal/FEniCS/src/dolfin/dorsal_build_dir'
Failure with exit status: 2
Exit message: There was a problem building dolfin.

Looking in http://bazaar.launchpad.net/~dolfin-core/dolfin/trunk/view/head:/dolfin/fem/SystemAssembler.cpp
one finds at line 599:

// Get measure of size of RHS components
      const double b_norm = arma::norm(_b, 1)/_b.size();

But armadillo has no member function size() (http://arma.sourceforge.net/docs.html#norm).

I'm not an experienced programmer so maybe some settings were wrong.
System: ubuntu 11.10 oneiric

Thanks,
Roberto

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

The version of Armadillo in Ubuntu 11.10 is too old for the development version of DOLFIN. You can fix this by letting Dorsal build Armadillo instead of relying on the Ubuntu Armadillo package. This can be done by adding "armadillo" to the PACKAGES list in FEniCS/platforms/supported/oneiric.platform or you can simply fetch the latest development version of Dorsal, which includes an updated platform file for Ubuntu 11.10.

Make sure you remove dorsal_build_dir in the DOLFIN source directory before you run Dorsal again, or otherwise, DOLFIN will still build against the old version of Armadillo.

Can you help with this problem?

Provide an answer of your own, or ask Roberto Alessi for more information if necessary.

To post a message you must log in.