Open nagasam opened 8 years ago
nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ ll total 108 drwxrwxr-x 10 nagarjuna nagarjuna 4096 1月 17 01:13 ./ drwxr-xr-x 24 nagarjuna nagarjuna 4096 1月 17 01:17 ../ -rw-rw-r-- 1 nagarjuna nagarjuna 77 7月 18 18:12 AUTHORS drwxrwxr-x 2 nagarjuna nagarjuna 4096 7月 18 18:12 cmake/ -rw-rw-r-- 1 nagarjuna nagarjuna 4460 7月 18 18:12 CMakeLists.txt -rw-rw-r-- 1 nagarjuna nagarjuna 35147 7月 18 18:12 COPYING -rw-rw-r-- 1 nagarjuna nagarjuna 7639 7月 18 18:12 COPYING.LESSER drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 doc/ -rw-rw-r-- 1 nagarjuna nagarjuna 2555 7月 18 18:12 Dockerfile drwxrwxr-x 6 nagarjuna nagarjuna 4096 7月 18 18:12 examples/ drwxrwxr-x 2 nagarjuna nagarjuna 4096 7月 18 18:12 git_hooks/ -rw-rw-r-- 1 nagarjuna nagarjuna 361 7月 18 18:12 .gitignore drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 magnumfe/ -rw-rw-r-- 1 nagarjuna nagarjuna 2957 7月 18 18:12 README.md drwxrwxr-x 3 nagarjuna nagarjuna 4096 7月 18 18:12 site-packages/ drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 tests/ drwxrwxr-x 3 nagarjuna nagarjuna 4096 7月 18 18:12 virtual/ nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ mkdir build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ cd build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master/build$ cmake .. -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found SWIG: /usr/bin/swig3.0 (found version "3.0.5") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") -- Found Python: /usr/lib/x86_64-linux-gnu/libpython2.7.so (Required is at least version "2") -- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.6") -- Found NumPy: version "1.8.2" /usr/lib/python2.7/dist-packages/numpy/core/include -- Found Python 2.7, will install at /usr/local/lib/python2.7/dist-packages -- Configuring done -- Generating done -- Build files have been written to: /home/nagarjuna/magnum.fe-master/build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master/build$ sudo make [sudo] password for nagarjuna: Scanning dependencies of target magnumfe [ 16%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/SubMeshInterpolator.cpp.o [ 33%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/DofForm.cpp.o [ 50%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/DofAssembler.cpp.o /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp: In static member function ‘static void magnumfe::DofAssembler::assemble(dolfin::GenericTensor&, const magnumfe::DofForm&, bool)’: /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:58:76: error: taking address of temporary [-fpermissive] dofs[i] = &(a.function_space(i)->dofmap()->celldofs(cell->index())); ^ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:58:17: error: cannot convert ‘dolfin::ArrayView’ to ‘gnu_cxx::__alloctraits<std::allocator<const std::vector> >::valuetype {aka const std::vector}’ in assignment dofs[i] = &(a.function_space(i)->dofmap()->cell_dofs(cell->index())); ^ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:68:42: error: no matching function for call to ‘dolfin::GenericSparsityPattern::insertglobal(std::vector<const std::vector>&)’ pattern.insert_global(ptr_entries); ^ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:68:42: note: candidate is: In file included from /usr/include/dolfin/la/dolfin_la.h:13:0, from /usr/include/dolfin.h:22, from /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.h:23, from /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:20: /usr/include/dolfin/la/GenericSparsityPattern.h:66:18: note: virtual void dolfin::GenericSparsityPattern::insert_global(const std::vector<dolfin::ArrayView >&) virtual void insertglobal(const std::vector< ^ /usr/include/dolfin/la/GenericSparsityPattern.h:66:18: note: no known conversion for argument 1 from ‘std::vector<const std::vector>’ to ‘const std::vector<dolfin::ArrayView >&’ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:100:74: error: taking address of temporary [-fpermissive] dofs[i] = &(a.function_space(i)->dofmap()->celldofs(cell->index())); ^ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:100:15: error: cannot convert ‘dolfin::ArrayView’ to ‘gnu_cxx::__alloctraits<std::allocator<const std::vector> >::valuetype {aka const std::vector}’ in assignment dofs[i] = &(a.function_space(i)->dofmap()->cell_dofs(cell->index())); ^ make[2]: * [CMakeFiles/magnumfe.dir/magnumfe/DofAssembler.cpp.o] Error 1 make[1]: * [CMakeFiles/magnumfe.dir/all] Error 2 make: *\ [all] Error 2
I found this error occurs because magnam.fe is not fully compatible with fenics >= 1.6.0. When I downgraded fenics (and other related packages) into v1.5.x, this issue was solved.
nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ ll total 108 drwxrwxr-x 10 nagarjuna nagarjuna 4096 1月 17 01:13 ./ drwxr-xr-x 24 nagarjuna nagarjuna 4096 1月 17 01:17 ../ -rw-rw-r-- 1 nagarjuna nagarjuna 77 7月 18 18:12 AUTHORS drwxrwxr-x 2 nagarjuna nagarjuna 4096 7月 18 18:12 cmake/ -rw-rw-r-- 1 nagarjuna nagarjuna 4460 7月 18 18:12 CMakeLists.txt -rw-rw-r-- 1 nagarjuna nagarjuna 35147 7月 18 18:12 COPYING -rw-rw-r-- 1 nagarjuna nagarjuna 7639 7月 18 18:12 COPYING.LESSER drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 doc/ -rw-rw-r-- 1 nagarjuna nagarjuna 2555 7月 18 18:12 Dockerfile drwxrwxr-x 6 nagarjuna nagarjuna 4096 7月 18 18:12 examples/ drwxrwxr-x 2 nagarjuna nagarjuna 4096 7月 18 18:12 git_hooks/ -rw-rw-r-- 1 nagarjuna nagarjuna 361 7月 18 18:12 .gitignore drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 magnumfe/ -rw-rw-r-- 1 nagarjuna nagarjuna 2957 7月 18 18:12 README.md drwxrwxr-x 3 nagarjuna nagarjuna 4096 7月 18 18:12 site-packages/ drwxrwxr-x 4 nagarjuna nagarjuna 4096 7月 18 18:12 tests/ drwxrwxr-x 3 nagarjuna nagarjuna 4096 7月 18 18:12 virtual/ nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ mkdir build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master$ cd build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master/build$ cmake .. -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found SWIG: /usr/bin/swig3.0 (found version "3.0.5") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") -- Found Python: /usr/lib/x86_64-linux-gnu/libpython2.7.so (Required is at least version "2") -- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.6") -- Found NumPy: version "1.8.2" /usr/lib/python2.7/dist-packages/numpy/core/include -- Found Python 2.7, will install at /usr/local/lib/python2.7/dist-packages -- Configuring done -- Generating done -- Build files have been written to: /home/nagarjuna/magnum.fe-master/build nagarjuna@nagarjuna-Inspiron-5548:~/magnum.fe-master/build$ sudo make [sudo] password for nagarjuna: Scanning dependencies of target magnumfe [ 16%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/SubMeshInterpolator.cpp.o [ 33%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/DofForm.cpp.o [ 50%] Building CXX object CMakeFiles/magnumfe.dir/magnumfe/DofAssembler.cpp.o /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp: In static member function ‘static void magnumfe::DofAssembler::assemble(dolfin::GenericTensor&, const magnumfe::DofForm&, bool)’: /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:58:76: error: taking address of temporary [-fpermissive] dofs[i] = &(a.function_space(i)->dofmap()->celldofs(cell->index())); ^ /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:58:17: error: cannot convert ‘dolfin::ArrayView ’ to ‘gnu_cxx::__alloctraits<std::allocator<const std::vector > >::valuetype {aka const std::vector }’ in assignment
dofs[i] = &(a.function_space(i)->dofmap()->cell_dofs(cell->index()));
^
/home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:68:42: error: no matching function for call to ‘dolfin::GenericSparsityPattern::insertglobal(std::vector<const std::vector >&)’
pattern.insert_global(ptr_entries);
^
/home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:68:42: note: candidate is:
In file included from /usr/include/dolfin/la/dolfin_la.h:13:0,
from /usr/include/dolfin.h:22,
from /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.h:23,
from /home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:20:
/usr/include/dolfin/la/GenericSparsityPattern.h:66:18: note: virtual void dolfin::GenericSparsityPattern::insert_global(const std::vector<dolfin::ArrayView >&)
virtual void insertglobal(const std::vector<
^
/usr/include/dolfin/la/GenericSparsityPattern.h:66:18: note: no known conversion for argument 1 from ‘std::vector<const std::vector >’ to ‘const std::vector<dolfin::ArrayView >&’
/home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:100:74: error: taking address of temporary [-fpermissive]
dofs[i] = &(a.function_space(i)->dofmap()->celldofs(cell->index()));
^
/home/nagarjuna/magnum.fe-master/magnumfe/DofAssembler.cpp:100:15: error: cannot convert ‘dolfin::ArrayView ’ to ‘ gnu_cxx::__alloctraits<std::allocator<const std::vector > >::valuetype {aka const std::vector }’ in assignment
dofs[i] = &(a.function_space(i)->dofmap()->cell_dofs(cell->index()));
^
make[2]: * [CMakeFiles/magnumfe.dir/magnumfe/DofAssembler.cpp.o] Error 1
make[1]: * [CMakeFiles/magnumfe.dir/all] Error 2
make: *\ [all] Error 2