It's broken because it tries to call AssemblerBase::init_global_tensor with 6 arguments. Plus it also uses that function as a static function when an object is needed.
-- Anders On Fri, Sep 14, 2012 at 12:05:38PM +0200, Johannes Ring wrote: > Strange. I'm working on a new buildbot and all the slaves fails to > build the multicore benchmark: > > http://fenicsproject.org:8010/waterfall?project=dolfin&category=dolfin.trunk > > Johannes > > On Fri, Sep 14, 2012 at 11:57 AM, Garth N. Wells <gn...@cam.ac.uk> wrote: > > Builds fine for me. > > > > Garth > > > > On Fri, Sep 14, 2012 at 10:35 AM, Johannes Ring <joha...@simula.no> wrote: > >> The multicore benchmark fails to build after this commit. The error > >> message is: > >> > >> [100%] Building CXX object > >> bench/fem/multicore/cpp/CMakeFiles/bench_fem_multicore_cpp.dir/main.cpp.o > >> /home/johannr/dev/fenics/src/dolfin/trunk/bench/fem/multicore/cpp/main.cpp: > >> In function ‘double bench(std::string, boost::shared_ptr<const > >> dolfin::Form>)’: > >> /home/johannr/dev/fenics/src/dolfin/trunk/bench/fem/multicore/cpp/main.cpp:97:82: > >> error: no matching function for call to > >> ‘dolfin::AssemblerBase::init_global_tensor(dolfin::Matrix&, const > >> dolfin::Form&, std::vector<std::pair<std::pair<unsigned int, unsigned > >> int>, std::pair<unsigned int, unsigned int> > >&, bool, bool, bool)’ > >> /home/johannr/dev/fenics/src/dolfin/trunk/bench/fem/multicore/cpp/main.cpp:97:82: > >> note: candidate is: > >> In file included from > >> /home/johannr/dev/fenics/src/dolfin/trunk/local/include/dolfin/fem/dolfin_fem.h:18:0, > >> from > >> /home/johannr/dev/fenics/src/dolfin/trunk/local/include/dolfin.h:21, > >> from > >> /home/johannr/dev/fenics/src/dolfin/trunk/bench/fem/multicore/cpp/main.cpp:27: > >> /home/johannr/dev/fenics/src/dolfin/trunk/local/include/dolfin/fem/AssemblerBase.h:77:10: > >> note: void > >> dolfin::AssemblerBase::init_global_tensor(dolfin::GenericTensor&, > >> const dolfin::Form&, const std::vector<std::pair<std::pair<unsigned > >> int, unsigned int>, std::pair<unsigned int, unsigned int> > >&) > >> /home/johannr/dev/fenics/src/dolfin/trunk/local/include/dolfin/fem/AssemblerBase.h:77:10: > >> note: candidate expects 3 arguments, 6 provided > >> make[2]: *** > >> [bench/fem/multicore/cpp/CMakeFiles/bench_fem_multicore_cpp.dir/main.cpp.o] > >> Error 1 > >> make[1]: *** > >> [bench/fem/multicore/cpp/CMakeFiles/bench_fem_multicore_cpp.dir/all] > >> Error 2 > >> make: *** [all] Error 2 > >> > >> I tried to make it work, but had no luck. Can someone push a fix? > >> > >> Johannes > >> > >> On Mon, Sep 10, 2012 at 4:52 PM, <nore...@launchpad.net> wrote: > >>> ------------------------------------------------------------ > >>> revno: 6899 > >>> committer: Garth N. Wells <gn...@cam.ac.uk> > >>> branch nick: all > >>> timestamp: Mon 2012-09-10 15:50:55 +0100 > >>> message: > >>> Fix multicore bench code and some more assembler tidy-up. > >>> modified: > >>> bench/fem/multicore/cpp/main.cpp > >>> dolfin/fem/Assembler.cpp > >>> dolfin/fem/AssemblerBase.cpp > >>> dolfin/fem/AssemblerBase.h > >>> dolfin/fem/LinearVariationalSolver.cpp > >>> dolfin/fem/OpenMpAssembler.cpp > >>> dolfin/fem/SymmetricAssembler.cpp > >>> dolfin/fem/SystemAssembler.cpp > >>> > >>> > >>> > >>> Your team DOLFIN Core Team is subscribed to branch lp:dolfin. > >>> To unsubscribe from this branch go to > >>> https://code.launchpad.net/~dolfin-core/dolfin/trunk/+edit-subscription > >>> > >>> === modified file 'bench/fem/multicore/cpp/main.cpp' > >>> --- bench/fem/multicore/cpp/main.cpp 2012-09-10 08:15:56 +0000 > >>> +++ bench/fem/multicore/cpp/main.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -98,8 +98,10 @@ > >>> > >>> // Assemble > >>> Timer timer("Total time"); > >>> + Assembler assembler; > >>> + assembler.reset_sparsity = false; > >>> for (dolfin::uint i = 0; i < NUM_REPS; ++i) > >>> - assemble(A, *a, false); > >>> + assemble(A, *a); > >>> const double t = timer.stop(); > >>> > >>> // Write summary > >>> > >>> === modified file 'dolfin/fem/Assembler.cpp' > >>> --- dolfin/fem/Assembler.cpp 2012-09-08 09:49:23 +0000 > >>> +++ dolfin/fem/Assembler.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -156,8 +156,7 @@ > >>> > >>> // Initialize global tensor > >>> const std::vector<std::pair<std::pair<uint, uint>, std::pair<uint, > >>> uint> > > periodic_master_slave_dofs; > >>> - AssemblerBase::init_global_tensor(A, a, periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> + init_global_tensor(A, a, periodic_master_slave_dofs); > >>> > >>> // Assemble over cells > >>> assemble_cells(A, a, ufc, cell_domains, 0); > >>> > >>> === modified file 'dolfin/fem/AssemblerBase.cpp' > >>> --- dolfin/fem/AssemblerBase.cpp 2012-09-09 10:53:56 +0000 > >>> +++ dolfin/fem/AssemblerBase.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -48,8 +48,7 @@ > >>> > >>> > >>> //----------------------------------------------------------------------------- > >>> void AssemblerBase::init_global_tensor(GenericTensor& A, const Form& a, > >>> - const std::vector<std::pair<std::pair<uint, uint>, > >>> std::pair<uint, uint> > >& periodic_master_slave_dofs, > >>> - bool reset_sparsity, bool add_values, bool keep_diagonal) > >>> + const std::vector<std::pair<std::pair<uint, uint>, > >>> std::pair<uint, uint> > >& periodic_master_slave_dofs) > >>> { > >>> dolfin_assert(a.ufc_form()); > >>> > >>> > >>> === modified file 'dolfin/fem/AssemblerBase.h' > >>> --- dolfin/fem/AssemblerBase.h 2012-09-09 10:53:56 +0000 > >>> +++ dolfin/fem/AssemblerBase.h 2012-09-10 14:50:55 +0000 > >>> @@ -36,8 +36,8 @@ > >>> class GenericTensor; > >>> class Form; > >>> > >>> - /// This class provides some common functions used in the > >>> - /// Assembler and SystemAssembler classes. > >>> + /// This class provides some common functions used in > >>> + /// assembler classes. > >>> > >>> class AssemblerBase > >>> { > >>> @@ -74,9 +74,8 @@ > >>> bool keep_diagonal; > >>> > >>> // Initialize global tensor > >>> - static void init_global_tensor(GenericTensor& A, const Form& a, > >>> - const std::vector<std::pair<std::pair<uint, uint>, > >>> std::pair<uint, uint> > >& periodic_master_slave_dofs, > >>> - bool reset_sparsity, bool add_values, bool keep_diagonal); > >>> + void init_global_tensor(GenericTensor& A, const Form& a, > >>> + const std::vector<std::pair<std::pair<uint, uint>, > >>> std::pair<uint, uint> > >& periodic_master_slave_dofs); > >>> > >>> protected: > >>> > >>> > >>> === modified file 'dolfin/fem/LinearVariationalSolver.cpp' > >>> --- dolfin/fem/LinearVariationalSolver.cpp 2012-09-08 09:49:23 +0000 > >>> +++ dolfin/fem/LinearVariationalSolver.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -26,6 +26,7 @@ > >>> #include <dolfin/la/GenericVector.h> > >>> #include <dolfin/la/LinearAlgebraFactory.h> > >>> #include <dolfin/la/LinearSolver.h> > >>> +#include "Assembler.h" > >>> #include "AssemblerBase.h" > >>> #include "assemble.h" > >>> #include "DirichletBC.h" > >>> @@ -138,10 +139,12 @@ > >>> > >>> > >>> // Intialise matrix, taking into account periodic dofs > >>> - AssemblerBase::init_global_tensor(*A, *a, dof_pairs, true, false, > >>> false); > >>> + Assembler assembler; > >>> + assembler.init_global_tensor(*A, *a, dof_pairs); > >>> + assembler.reset_sparsity = false; > >>> > >>> // Assemble linear system > >>> - assemble(*A, *a, false); > >>> + assembler.assemble(*A, *a); > >>> if (L->ufc_form()) > >>> assemble(*b, *L); > >>> else > >>> > >>> === modified file 'dolfin/fem/OpenMpAssembler.cpp' > >>> --- dolfin/fem/OpenMpAssembler.cpp 2012-09-08 09:49:23 +0000 > >>> +++ dolfin/fem/OpenMpAssembler.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -91,8 +91,7 @@ > >>> > >>> // Initialize global tensor > >>> const std::vector<std::pair<std::pair<uint, uint>, std::pair<uint, > >>> uint> > > periodic_master_slave_dofs; > >>> - AssemblerBase::init_global_tensor(A, a, periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> + init_global_tensor(A, a, periodic_master_slave_dofs); > >>> > >>> // FIXME: The below selections should be made robust > >>> > >>> > >>> === modified file 'dolfin/fem/SymmetricAssembler.cpp' > >>> --- dolfin/fem/SymmetricAssembler.cpp 2012-09-08 09:49:23 +0000 > >>> +++ dolfin/fem/SymmetricAssembler.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -205,11 +205,10 @@ > >>> coefficients[i]->update(); > >>> > >>> // Initialize global tensors > >>> - const std::vector<std::pair<std::pair<uint, uint>, std::pair<uint, > >>> uint> > > periodic_master_slave_dofs; > >>> - AssemblerBase::init_global_tensor(A, a, periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> - AssemblerBase::init_global_tensor(A_asymm, a, > >>> periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> + error("SymmetricAssembler is presently broken. It will be removed > >>> soon."); > >>> + //const std::vector<std::pair<std::pair<uint, uint>, std::pair<uint, > >>> uint> > > periodic_master_slave_dofs; > >>> + //init_global_tensor(A, a, periodic_master_slave_dofs); > >>> + //init_global_tensor(A_asymm, a, periodic_master_slave_dofs); > >>> > >>> // Get dofs that are local to this processor > >>> processor_dof_range = A.local_range(0); > >>> > >>> === modified file 'dolfin/fem/SystemAssembler.cpp' > >>> --- dolfin/fem/SystemAssembler.cpp 2012-09-08 09:49:23 +0000 > >>> +++ dolfin/fem/SystemAssembler.cpp 2012-09-10 14:50:55 +0000 > >>> @@ -180,10 +180,8 @@ > >>> > >>> // Initialize global tensors > >>> const std::vector<std::pair<std::pair<uint, uint>, std::pair<uint, > >>> uint> > > periodic_master_slave_dofs; > >>> - AssemblerBase::init_global_tensor(A, a, periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> - AssemblerBase::init_global_tensor(b, L, periodic_master_slave_dofs, > >>> - reset_sparsity, add_values, > >>> keep_diagonal); > >>> + init_global_tensor(A, a, periodic_master_slave_dofs); > >>> + init_global_tensor(b, L, periodic_master_slave_dofs); > >>> > >>> // Allocate data > >>> Scratch data(a, L); > >>> > >>> > >> > >> _______________________________________________ > >> Mailing list: https://launchpad.net/~dolfin > >> Post to : dolfin@lists.launchpad.net > >> Unsubscribe : https://launchpad.net/~dolfin > >> More help : https://help.launchpad.net/ListHelp > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : dolfin@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp