DOLFIN doesn't compile anymore after "multimesh" branch merge

Issue #327 resolved
Simone Pezzuto created an issue

Here the offending errors (osx, clang 5.1):

1.

dolfin/mesh/MultiMesh.h:288:25: error: no function named 'plot' with type 'void
      (std::shared_ptr<const MultiMesh>)' was found in the specified scope

A #include <dolfin/plot/plot.h> should fix the error.

2.

dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:36478:26: error: use of
      undeclared identifier 'smartarg1'
      (void)arg1; delete smartarg1;

Don't know how to fix this.

3.

dolfin/swig/modules/function/modulePYTHON_wrap.cxx:18684:26: error: use of
      undeclared identifier 'smartarg1'
      (void)arg1; delete smartarg1;

4.

dolfin/swig/modules/fem/modulePYTHON_wrap.cxx:27989:11: error: no type named
      'CCFEMForm' in namespace 'dolfin'
  dolfin::CCFEMForm *arg2 = 0 ;
  ~~~~~~~~^
dolfin/swig/modules/fem/modulePYTHON_wrap.cxx:28022:36: error: no type named
      'CCFEMForm' in namespace 'dolfin'
  arg2 = reinterpret_cast< dolfin::CCFEMForm * >(argp2);
                           ~~~~~~~~^
dolfin/swig/modules/fem/modulePYTHON_wrap.cxx:28025:39: error: no member
      named 'build_ccfem' in 'dolfin::SparsityPatternBuilder'
      dolfin::SparsityPatternBuilder::build_ccfem(*arg1,(dolfin::CCFEMForm const &)*arg2);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
dolfin/swig/modules/fem/modulePYTHON_wrap.cxx:28025:66: error: no member
      named 'CCFEMForm' in namespace 'dolfin'
      dolfin::SparsityPatternBuilder::build_ccfem(*arg1,(dolfin::CCFEMForm const &)*arg2);

Comments (21)

  1. Prof Garth Wells

    @logg Can you make this a priority, or roll back the changes? master is broken for OSX/clang.

  2. Anders Logg (Chalmers)

    I didn't notice any of the buildbots being red and I carefully checked next before I merged into master. Don't we have clang on the buildbots?

  3. Prof Garth Wells

    @logg We don't have good compiler coverage on the buildbots. It would be nice to have recent Clang and Intel compilers (the latter is less straightforward because we'd need a license).

  4. Anders Logg (Chalmers)

    So how can I test clang in Ubuntu? Is it as easy as apt-get install clang && export CXX=clang?

    We really need to get clang on the buildbots, it's really annoying to have a merge reverted just because it fails on a system not supported by our tests.

  5. Prof Garth Wells

    @logg Yes, it's as easy as that (except you need export CXX=clang++). You might need to disable CGAL as CGAL inserts compiler dependent code when it is built.

  6. Anders Logg (Chalmers)

    ok. We should rip out CGAL now anyway. Benjamin has gotten the new mshr library in good shape and I believe it's ready to replace the mesh generation in DOLFIN.

  7. Anders Logg (Chalmers)

    This has been fixed in master now. I did not get the SWIG errors (2-4) reported above. They are likely the result of not cleaning out a previous build. Try git clean -fdx and rebuild (note: will remove files not controlled by git).

  8. Simone Pezzuto reporter

    @logg No it doesn't fix SWIG errors (I always do it when I get those errors, but this time doesn't help). Are you using SWIG 3.x?

  9. Anders Logg (Chalmers)

    No, I use 2.0.10. But how can you possibly get those errors? One of the error messages in particular refers to CCFEMForm which is nowhere to be found in the code. Looks like a remnant from an old branch.

  10. Simone Pezzuto reporter

    Problem solved, but solution is not trivial.

    After trying again from scratch (without git clean, but using git clone in a new folder) and I got the same errors. Don't know exactly how SWIGed files are handled, but I figured out that the compiler is picking up an include file from the (previously) installed directory instead of the new one.

    This might occur if you install dolfin in /usr/local (here I'm using homebrew which links files into /usr/local). But the problem is still on the dolfin side, maybe during the swig process, there is something wrong with the include dirs.

    A solution (besides a healthy git clean -xdf) is to do not install dolfin in a common location, or to brew unlink dolfin for mac/homebrew users.

  11. Simone Pezzuto reporter

    Only on my computer. All the dependencies are available on homebrew-science, so in order to install fenics can use pip for the pure-python part, and brew diy inside dolfin source folder. This will provide a cmake prefix to install it into homebrew Cellar, so you can do brew link dolfin (you can also specify the version).

    Otherwise you need the dolfin.rb file, but I don't have it yet (but very easy to write).

    I prefer the first method for the git version. It would be nice to have also the second one, but I don't have much time at the moment (maybe in a couple week, will see).

  12. Prof Garth Wells

    This whole MultiMesh work was merged way too soon. The name change from CCFEMFoo to MultiMesh is a real pain for other developers (because CCFEMFoo are in cases derived classes) because it causes major merging problems. Code should not hit the master branch before it's ready.

  13. Anders Logg (Chalmers)

    I completely disagree. The code is ready for merge. The name change happened a long time ago.

  14. Anders Logg (Chalmers)

    So it's not allowed to change the name of a class anymore? When did you make that decision?

  15. Prof Garth Wells

    Of course it's allowed, but hopefully doesn't happen too often. If a sub-class is added prematurely and needs to change name, it causes a problem if any work is done on the base class. In this case, work is going in GenericDofMap, and CCFEMDofMap was updated to reflect this, which gets screwed up when CCFEMDofMap is removed from master but is present with modification in topic branches.

  16. Log in to comment