Ngsxfem installing issues

Hello Developers,

I’m trying to install ngsxfem on Ubuntu 18.04.3 but I’m having issues. I don’t have ngsolve/netgen installed so I followed the directions for building ngsxfem with ngsolve. I’ve installed all the necessary prerequisite packages to the OS.

Here are the commands that I used:

git clone https://github.com/ngsxfem/ngsxfem.git
cdngsxfem
mkdir build
cd build

git submodule update --init --recursive 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/Desktop/Solver -DBUILD_NGSOLVE=ON 
(I've also tried adding -DCMAKE_PREFIX_PATH= ~/Desktop/Solver... but it still fails at the same point during the build process; Am I specifying the wrong location for -DCMAKE_PREFIX_PATH?)

Once the last command is inputted to the terminal, the build starts but ends with an error after a while. The error that I’m getting is the following:

[ 29%] Building CXX object fem/CMakeFiles/ngfem.dir/h1hofe.cpp.o
.
(some codes)
.
fem/CMakeFiles/ngfem.dir/build.make:206: recipe for target 'fem/CMakeFiles/ngfem.dir/h1hofe.cpp.o' failed
CMakeFiles/Makefile2:425: recipe for target 'fem/CMakeFiles/ngfem.dir/all' failed
Makefile:140: recipe for target 'all' failed
CMakeFiles/ngsolve.dir/build.make:115: recipe for target 'dependencies/Stamp/ngsolve/ngsolve-build' failed
CMakeFiles/Makefile2:211: recipe for target 'CMakeFiles/ngsolve.dir/all' failed
make[5]: *** [fem/CMakeFiles/ngfem.dir/h1hofe.cpp.o] Error 1
make[4]: *** [fem/CMakeFiles/ngfem.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [dependencies/Stamp/ngsolve/ngsolve-build] Error 2
make[1]: *** [CMakeFiles/ngsolve.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
CMake Error at CMakeLists.txt:86 (find_package):
  Could not find a package configuration file provided by "NGSolve" with any
  of the following names:

    NGSolveConfig.cmake
    ngsolve-config.cmake

  Add the installation prefix of "NGSolve" to CMAKE_PREFIX_PATH or set
  "NGSolve_DIR" to a directory containing one of the above files.  If
  "NGSolve" provides a separate development package or SDK, be sure it has
  been installed.

Thanks for all your help in advance!

hi jkim,

As you did not install ngsolve beforehand, ngsxfem builds ngsolve as part of its own build process. In this step (building ngsolve) however something seems to go wrong (the important part for understanding what goes wrong is in the “… (some codes) …”-block. Please provide this part. Alternatively, you can first install NGSolve (it’s very easy on Ubuntu) and afterwards build ngsxfem with -DBUILD_NGSOLVE=OFF .

Best,
Christoph

Hi Christoph,

I installed ngsolve/netgen prior to installing ngsxfem as you suggested but I get another error once I type ‘make.’

Here are the codes that I typed in:

git clone https://github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build 

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/bin -DBUILD_NGSOLVE=OFF
make 

Here is the error message that I’m getting:

[ 60%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/ngsxstd.cpp.o
[ 63%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/p1interpol.cpp.o
[ 66%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/restrictedblf.cpp.o
/home/imga/Desktop/ngsxfem/utils/restrictedblf.cpp: In member function ‘virtual ngla::MatrixGraph* ngcomp::RestrictedBilinearForm::GetGraph(int, bool)’:
/home/imga/Desktop/ngsxfem/utils/restrictedblf.cpp:32:63: error: ‘using element_type = class ngcomp::FESpace {aka class ngcomp::FESpace}’ has no member named ‘GetSpecialElements’; did you mean ‘GetSpatialDimension’?
     const Array<SpecialElement*> & specialelements = fespace->GetSpecialElements();
                                                               ^~~~~~~~~~~~~~~~~~
                                                               GetSpatialDimension
python/CMakeFiles/ngsxfem_py.dir/build.make:518: recipe for target 'python/CMakeFiles/ngsxfem_py.dir/__/utils/restrictedblf.cpp.o' failed
make[2]: *** [python/CMakeFiles/ngsxfem_py.dir/__/utils/restrictedblf.cpp.o] Error 1
CMakeFiles/Makefile2:1049: recipe for target 'python/CMakeFiles/ngsxfem_py.dir/all' failed
make[1]: *** [python/CMakeFiles/ngsxfem_py.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Thank You

Dear jkim,

The problem is that you have been using incompatible version of ngsolve and ngsxfem. In this case your ngsolve version was newer than compatible with the latest ngsxfem (release branch) version. Now, thanks to Christopher this has been fixed in the updated version. So, please update ngsxfem (git pull) and try again.

Best,
Christoph

Hi Christoph,

It works now! Thanks for all your help!

Thanks

Hi,

I’m having trouble installing ngsxfem as well.
I followed all the steps, but I’m still getting an error.

I’m using NGSolve-6.2.2002 on Unbuntu.

And, to install ngsxfem I perform the following steps:

git clone https://github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/bin -DBUILD_NGSOLVE=OFF

Then, I received

-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- 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 PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version "3.6.9", minimum required is "3") 
-- Found Netgen: /usr/lib/cmake/netgen
-- Found Netgen: /usr/lib/cmake/netgen
-- Setting build type to NGSolve build type: Release

------------------------------------------------------------------------
  xfem 1.1-1909:  Automatic configuration OK.

  Install directory:
    /usr/bin

  Compiler:
    CMAKE_CXX_COMPILER = /usr/bin/c++
    
  Compiler Flags:
    flags =  

  Generator:
    Unix Makefiles

  Build Type:
    type = 

  Build NGSolve from scratch: OFF
  Build xfem (and NGSolve) with ccache: OFF

  Building:

    Type 'make' to compile xfem.

    Type 'make install' to install xfem.

------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /home/alan/ngsxfem/build

When I digit

make

I received the following error:

[  3%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/python_ngsxfem.cpp.o
[  6%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/fieldeval.cpp.o
[  9%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/spacetimecutrule.cpp.o
/home/alan/ngsxfem/cutint/spacetimecutrule.cpp: In function ‘std::tuple<const ngfem::IntegrationRule*, ngcore::Array<double, long unsigned int> > xintegration::SpaceTimeCutIntegrationRule(ngbla::FlatVector<double>, const ngfem::ElementTransformation&, ngfem::ScalarFiniteElement<1>*, DOMAIN_TYPE, int, int, SWAP_DIMENSIONS_POLICY, ngcore::LocalHeap&)’:
/home/alan/ngsxfem/cutint/spacetimecutrule.cpp:151:30: error: ‘class ngfem::IntegrationPoint’ has no member named ‘SetPrecomputedGeometry’
  151 |                     (*ir)[k].SetPrecomputedGeometry(true);
      |                              ^~~~~~~~~~~~~~~~~~~~~~
python/CMakeFiles/ngsxfem_py.dir/build.make:110: recipe for target 'python/CMakeFiles/ngsxfem_py.dir/__/cutint/spacetimecutrule.cpp.o' failed
make[2]: *** [python/CMakeFiles/ngsxfem_py.dir/__/cutint/spacetimecutrule.cpp.o] Error 1
CMakeFiles/Makefile2:1049: recipe for target 'python/CMakeFiles/ngsxfem_py.dir/all' failed
make[1]: *** [python/CMakeFiles/ngsxfem_py.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

In the terminal (~/ngsxfem/build$ ) I digit

git pull origin master
git submodule update --init --recursive

Then, I redo the cmake …

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/bin -DBUILD_NGSOLVE=OFF 

Then, I got

-- Found Netgen: /usr/lib/cmake/netgen
-- Found Netgen: /usr/lib/cmake/netgen
-- Setting build type to NGSolve build type: Release

------------------------------------------------------------------------
  xfem 1.1-1909:  Automatic configuration OK.

  Install directory:
    /usr/bin

  Compiler:
    CMAKE_CXX_COMPILER = /usr/bin/c++
    
  Compiler Flags:
    flags =  

  Generator:
    Unix Makefiles

  Build Type:
    type = 

  Build with space-time quadrature sanity checks (abuses ngsolve's intrule nr): ON

  Build NGSolve from scratch: OFF
  Build xfem (and NGSolve) with ccache: OFF


  Building:

    Type 'make' to compile xfem.

    Type 'make install' to install xfem.

------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /home/alan/ngsxfem/build

I digit and it compiles with no error

make
Scanning dependencies of target ngsxfem_py
[  3%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/python_ngsxfem.cpp.o
[  6%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/fieldeval.cpp.o
[  9%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/spacetimecutrule.cpp.o
[ 12%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/straightcutrule.cpp.o
[ 16%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/xdecompose.cpp.o
[ 19%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/cutint/xintegration.cpp.o
[ 22%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/calcgeomerrors.cpp.o
[ 25%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/calcpointshift.cpp.o
[ 29%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/lsetrefine.cpp.o
[ 32%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/projshift.cpp.o
[ 35%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/shiftedevaluate.cpp.o
[ 38%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/lsetcurving/shiftintegrators.cpp.o
[ 41%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/spacetime/diffopDt.cpp.o
[ 45%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/spacetime/SpaceTimeFE.cpp.o
[ 48%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/spacetime/SpaceTimeFESpace.cpp.o
[ 51%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/spacetime/timecf.cpp.o
[ 54%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/spacetime/spacetime_vtk.cpp.o
[ 58%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/bitarraycf.cpp.o
[ 61%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/ngsxstd.cpp.o
[ 64%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/p1interpol.cpp.o
[ 67%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/restrictedblf.cpp.o
[ 70%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/utils/xprolongation.cpp.o
[ 74%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/cutinfo.cpp.o
[ 77%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/ghostpenalty.cpp.o
[ 80%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/sFESpace.cpp.o
[ 83%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/symboliccutbfi.cpp.o
[ 87%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/symboliccutlfi.cpp.o
[ 90%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/xfemdiffops.cpp.o
[ 93%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/xFESpace.cpp.o
[ 96%] Building CXX object python/CMakeFiles/ngsxfem_py.dir/__/xfem/xfiniteelement.cpp.o
[100%] Linking CXX shared library ngsxfem_py.so
[100%] Built target ngsxfem_py

But when I try to

make install 

I received the following error

Install the project...
-- Install configuration: ""
-- Installing: /usr/bin/share/ngsxfem/cutint/area_of_a_circle_quads.py
CMake Error at cutint/py_demos/cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/home/alan/ngsxfem/cutint/py_demos/area_of_a_circle_quads.py" to
  "/usr/bin/share/ngsxfem/cutint/area_of_a_circle_quads.py".
Call Stack (most recent call first):
  cutint/cmake_install.cmake:42 (include)
  cmake_install.cmake:42 (include)


Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1

What I am doing wrong? Am I missing something?

Thank you in advance.

Hi,
it’s a compatibility problem of the ngsxfem and ngsolve version. If you check for the ngsolve-submodules version you can see which ngsolve-version is compatible with the corresponding ngsxfem-version. We do not in general provide a day-to-day compatibility of our main branches. To clarify on the compatibility you can use the submodule information.

In your case: The ngsxfem-commit that you pulled is not compatible with the most recent ngsolve version (due to an only seemingly minor change in the core of ngsolve).

Anyhow, I updated ngsxfem now so that it should be compatible to the recent ngsolve, so updating ngsxfem may be sufficient for now.

Best,
Christoph

Hi Christoph,

Thank you for the quick response.
I updated NGSxfem and, when I tried to install it, I received the following message

[100%] Built target ngsxfem_py
Install the project...
-- Install configuration: ""
-- Installing: /usr/bin/share/ngsxfem/cutint/area_of_a_circle_quads.py
CMake Error at cutint/py_demos/cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/home/alan/ngsxfem/cutint/py_demos/area_of_a_circle_quads.py" to
  "/usr/bin/share/ngsxfem/cutint/area_of_a_circle_quads.py".
Call Stack (most recent call first):
  cutint/cmake_install.cmake:42 (include)
  cmake_install.cmake:42 (include)


Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1

My NGSolve was updated automatically for the new version NGSolve-6.2.2002. If better, how can I install an old version of NGSolve? Tell me how to install an old version and I will do it on my computer.

Thank you for your time.

Hi again,

Not sure what is going wrong here. The build was complete, which is good. Installation, i.e. merely copying the files seems to go wrong. Do you have the rights to write to /usr/bin, i.e. are you calling with sudo? Otherwise, have you tried installing locally, instead?

Best,
Christoph

Hi Christoph,

Using sudo it was possible to install

sudo make install
[100%] Built target ngsxfem_py
Install the project...
-- Install configuration: ""
-- Installing: /usr/bin/share/ngsxfem/cutint/area_of_a_circle_quads.py
-- Installing: /usr/bin/share/ngsxfem/cutint/integrate_one_big_quad2D.py
-- Installing: /usr/bin/share/ngsxfem/cutint/integrate_one_big_quad3D.py
-- Installing: /usr/bin/lib/python3/dist-packages/xfem/ngsxfem_py.so
-- Set runtime path of "/usr/bin/lib/python3/dist-packages/xfem/ngsxfem_py.so" to "$ORIGIN/../../../netgen"
-- Installing: /usr/bin/lib/python3/dist-packages/xfem/__init__.py
-- Installing: /usr/bin/lib/python3/dist-packages/xfem/cutmg.py
-- Installing: /usr/bin/include/netgen/p1interpol.hpp
-- Installing: /usr/bin/include/netgen/xprolongation.hpp
-- Installing: /usr/bin/include/netgen/restrictedblf.hpp
-- Installing: /usr/bin/include/netgen/ngsxstd.hpp
-- Installing: /usr/bin/include/netgen/bitarraycf.hpp
-- Installing: /usr/bin/include/netgen/cutinfo.hpp
-- Installing: /usr/bin/include/netgen/ghostpenalty.hpp
-- Installing: /usr/bin/include/netgen/xFESpace.hpp
-- Installing: /usr/bin/include/netgen/sFESpace.hpp
-- Installing: /usr/bin/include/netgen/xfemdiffops.hpp
-- Installing: /usr/bin/include/netgen/xfiniteelement.hpp
-- Installing: /usr/bin/include/netgen/symboliccutbfi.hpp
-- Installing: /usr/bin/include/netgen/symboliccutlfi.hpp
-- Installing: /usr/bin/share/ngsxfem/cutfem.py
-- Installing: /usr/bin/share/ngsxfem/fictdom_dg_ghostpen.py
-- Installing: /usr/bin/share/ngsxfem/fictdom_ghostpen.py
-- Installing: /usr/bin/share/ngsxfem/fictdom_ghostpen_restrictedblf.py
-- Installing: /usr/bin/share/ngsxfem/moving_domain.py
-- Installing: /usr/bin/share/ngsxfem/nxfem.py
-- Installing: /usr/bin/share/ngsxfem/nxfem_higher_order.py
-- Installing: /usr/bin/share/ngsxfem/stokesxfem.py
-- Installing: /usr/bin/share/ngsxfem/traceconverg.py
-- Installing: /usr/bin/share/ngsxfem/tracefem.py
-- Installing: /usr/bin/share/ngsxfem/tracefem3d.py
-- Installing: /usr/bin/share/ngsxfem/xfespaces.py
-- Installing: /usr/bin/share/ngsxfem/mpi/mpi_nxfem.py
-- Installing: /usr/bin/include/netgen/shiftintegrators.hpp
-- Installing: /usr/bin/include/netgen/calcpointshift.hpp
-- Installing: /usr/bin/include/netgen/calcgeomerrors.hpp
-- Installing: /usr/bin/include/netgen/lsetrefine.hpp
-- Installing: /usr/bin/include/netgen/projshift.hpp
-- Installing: /usr/bin/include/netgen/shiftedevaluate.hpp
-- Installing: /usr/bin/lib/python3/dist-packages/xfem/lsetcurv.py
-- Installing: /usr/bin/share/ngsxfem/lsetcurv/integrate.py
-- Installing: /usr/bin/share/ngsxfem/lsetcurv/lsetgeoms.py
-- Installing: /usr/bin/share/ngsxfem/report/ngsxfem_report.py
-- Installing: /usr/bin/include/netgen/SpaceTimeFE.hpp
-- Installing: /usr/bin/include/netgen/SpaceTimeFESpace.hpp
-- Installing: /usr/bin/include/netgen/diffopDt.hpp
-- Installing: /usr/bin/include/netgen/timecf.hpp
-- Installing: /usr/bin/include/netgen/spacetime_vtk.hpp
-- Installing: /usr/bin/lib/python3/dist-packages/xfem/lset_spacetime.py
-- Installing: /usr/bin/share/ngsxfem/spaceP1_timeDGP1.py

But when I ran the tests

Running tests...
Test project /home/alan/ngsxfem/build
      Start  1: cpu_usage
 1/20 Test  #1: cpu_usage ........................   Passed    0.19 sec
      Start  2: py_tutorial_nxfem_lo
 2/20 Test  #2: py_tutorial_nxfem_lo .............***Failed    0.38 sec
      Start  3: py_tutorial_cutfem_lo
 3/20 Test  #3: py_tutorial_cutfem_lo ............***Failed    0.39 sec
      Start  4: py_tutorial_nxfem_ho
 4/20 Test  #4: py_tutorial_nxfem_ho .............***Failed    0.26 sec
      Start  5: py_tutorial_tracefem
 5/20 Test  #5: py_tutorial_tracefem .............***Failed    0.38 sec
      Start  6: py_tutorial_stokesxfem
 6/20 Test  #6: py_tutorial_stokesxfem ...........***Failed    0.26 sec
      Start  7: py_tutorial_fictdom
 7/20 Test  #7: py_tutorial_fictdom ..............***Failed    0.39 sec
      Start  8: py_tutorial_fictdom_dg
 8/20 Test  #8: py_tutorial_fictdom_dg ...........***Failed    0.39 sec
      Start  9: pytests_xfes_ndof
 9/20 Test  #9: pytests_xfes_ndof ................***Failed    0.05 sec
      Start 10: pytests_cutint
10/20 Test #10: pytests_cutint ...................***Failed    0.06 sec
      Start 11: pytests_straightcutrule
11/20 Test #11: pytests_straightcutrule ..........***Failed    0.04 sec
      Start 12: pytests_backupcutrule
12/20 Test #12: pytests_backupcutrule ............***Failed    0.03 sec
      Start 13: pytests_intcurved
13/20 Test #13: pytests_intcurved ................***Failed    0.04 sec
      Start 14: pytests_nxfem
14/20 Test #14: pytests_nxfem ....................***Failed    0.05 sec
      Start 15: pytests_shifteval
15/20 Test #15: pytests_shifteval ................***Failed    0.05 sec
      Start 16: pytests_quadchallenges
16/20 Test #16: pytests_quadchallenges ...........***Failed    0.03 sec
      Start 17: pytests_num_nxfem
17/20 Test #17: pytests_num_nxfem ................***Failed    0.05 sec
      Start 18: pytests_spacetimecutrule
18/20 Test #18: pytests_spacetimecutrule .........***Failed    0.05 sec
      Start 19: pytests_spacetime_vtk
19/20 Test #19: pytests_spacetime_vtk ............***Failed    0.04 sec
      Start 20: pytests_navier_stokes
20/20 Test #20: pytests_navier_stokes ............***Failed    0.05 sec

5% tests passed, 19 tests failed out of 20

Total Test time (real) =   3.18 sec

The following tests FAILED:
	  2 - py_tutorial_nxfem_lo (Failed)
	  3 - py_tutorial_cutfem_lo (Failed)
	  4 - py_tutorial_nxfem_ho (Failed)
	  5 - py_tutorial_tracefem (Failed)
	  6 - py_tutorial_stokesxfem (Failed)
	  7 - py_tutorial_fictdom (Failed)
	  8 - py_tutorial_fictdom_dg (Failed)
	  9 - pytests_xfes_ndof (Failed)
	 10 - pytests_cutint (Failed)
	 11 - pytests_straightcutrule (Failed)
	 12 - pytests_backupcutrule (Failed)
	 13 - pytests_intcurved (Failed)
	 14 - pytests_nxfem (Failed)
	 15 - pytests_shifteval (Failed)
	 16 - pytests_quadchallenges (Failed)
	 17 - pytests_num_nxfem (Failed)
	 18 - pytests_spacetimecutrule (Failed)
	 19 - pytests_spacetime_vtk (Failed)
	 20 - pytests_navier_stokes (Failed)
Errors while running CTest
Makefile:129: recipe for target 'test' failed
make: *** [test] Error 8

Or running a simple tutorial example I received this message

optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.2002
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 8 thread(s)
importing NGSolve-6.2.2002
Traceback (most recent call last):
  File "testBasics.py", line 10, in <module>
    from xfem import *
ModuleNotFoundError: No module named 'xfem'

Sorry to bother you with this.

Ok, the default install target seems to be wrong.

It seems that the CMAKE_INSTALL_PREFIX is one level to low. It seems to be /usr/bin where it should only be /usr .
First uninstall ngsxfem again by calling “sudo xargs rm < install_manifest.txt” from the build directory. Then, reconfigure with “cmake … -DCMAKE_INSTALL_PREFIX=/usr” or (better) choose a different local directory.

Best,
Christoph

I also meet the same errors when I run make test
The following tests FAILED:
2 - py_tutorial_nxfem_lo (Failed)
3 - py_tutorial_cutfem_lo (Failed)
4 - py_tutorial_nxfem_ho (Failed)
5 - py_tutorial_tracefem (Failed)
6 - py_tutorial_stokesxfem (Failed)
7 - py_tutorial_fictdom (Failed)
8 - py_tutorial_fictdom_dg (Failed)
9 - pytests_xfes_ndof (Failed)
10 - pytests_cutint (Failed)
11 - pytests_straightcutrule (Failed)
12 - pytests_backupcutrule (Failed)
13 - pytests_intcurved (Failed)
14 - pytests_nxfem (Failed)
15 - pytests_shifteval (Failed)
16 - pytests_quadchallenges (Failed)
17 - pytests_num_nxfem (Failed)
18 - pytests_spacetimecutrule (Failed)
19 - pytests_spacetime_vtk (Failed)
20 - pytests_navier_stokes (Failed)
Errors while running CTest
Makefile:129: recipe for target ‘test’ failed
make: *** [test] Error 8

I really want to know what the meaning if the INSTLOCATION in cmake …/ -DCMAKE_INSTALL_PREFIX=INSTLOCATION , how can I find what it is and where I install the ngsolve.
And when I type cmake … -DCMAKE_INSTALL_PREFIX=/usr, the output always is :
CMake Error: The source directory “/home/kaipeng/ngx/ngsxfem/build/…” does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

I am really need help. Thank you very much!!!

but
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import xfem
from xfem import *

~/ngx/ngsxfem/build$ make test
Running tests...
Test project /home/kaipeng/ngx/ngsxfem/build
      Start  1: cpu_usage
 1/25 Test  #1: cpu_usage ........................   Passed    0.17 sec
      Start  2: py_tutorial_nxfem_lo
 2/25 Test  #2: py_tutorial_nxfem_lo .............***Failed    0.39 sec
      Start  3: py_tutorial_cutfem_lo
 3/25 Test  #3: py_tutorial_cutfem_lo ............***Failed    0.35 sec
      Start  4: py_tutorial_nxfem_ho
 4/25 Test  #4: py_tutorial_nxfem_ho .............***Failed    0.34 sec
      Start  5: py_tutorial_tracefem
 5/25 Test  #5: py_tutorial_tracefem .............***Failed    0.34 sec
      Start  6: py_tutorial_stokesxfem
 6/25 Test  #6: py_tutorial_stokesxfem ...........***Failed    0.34 sec
      Start  7: py_tutorial_fictdom
 7/25 Test  #7: py_tutorial_fictdom ..............***Failed    0.33 sec
      Start  8: py_tutorial_fictdom_dg
 8/25 Test  #8: py_tutorial_fictdom_dg ...........***Failed    0.34 sec
      Start  9: pytests_xfes_ndof
 9/25 Test  #9: pytests_xfes_ndof ................***Failed    0.02 sec
      Start 10: pytests_apply
10/25 Test #10: pytests_apply ....................***Failed    0.02 sec
      Start 11: pytests_calc_linearized
11/25 Test #11: pytests_calc_linearized ..........***Failed    0.02 sec
      Start 12: pytests_cutint
12/25 Test #12: pytests_cutint ...................***Failed    0.02 sec
      Start 13: pytests_straightcutrule
13/25 Test #13: pytests_straightcutrule ..........***Failed    0.02 sec
      Start 14: pytests_backupcutrule
14/25 Test #14: pytests_backupcutrule ............***Failed    0.02 sec
      Start 15: pytests_intcurved
15/25 Test #15: pytests_intcurved ................***Failed    0.02 sec
      Start 16: pytests_nxfem
16/25 Test #16: pytests_nxfem ....................***Failed    0.02 sec
      Start 17: pytests_shifteval
17/25 Test #17: pytests_shifteval ................***Failed    0.02 sec
      Start 18: pytests_quadchallenges
18/25 Test #18: pytests_quadchallenges ...........***Failed    0.02 sec
      Start 19: pytests_num_nxfem
19/25 Test #19: pytests_num_nxfem ................***Failed    0.02 sec
      Start 20: pytests_spacetimecutrule
20/25 Test #20: pytests_spacetimecutrule .........***Failed    0.02 sec
      Start 21: pytests_spacetime_vtk
21/25 Test #21: pytests_spacetime_vtk ............***Failed    0.02 sec
      Start 22: pytests_navier_stokes
22/25 Test #22: pytests_navier_stokes ............***Failed    0.02 sec
      Start 23: pytests_mlset_module
23/25 Test #23: pytests_mlset_module .............***Failed    0.02 sec
      Start 24: pytests_mlset_integrate
24/25 Test #24: pytests_mlset_integrate ..........***Failed    0.02 sec
      Start 25: pytests_mlset_pde
25/25 Test #25: pytests_mlset_pde ................***Failed    0.02 sec

4% tests passed, 24 tests failed out of 25

Total Test time (real) =   2.95 sec

The following tests FAILED:
	  2 - py_tutorial_nxfem_lo (Failed)
	  3 - py_tutorial_cutfem_lo (Failed)
	  4 - py_tutorial_nxfem_ho (Failed)
	  5 - py_tutorial_tracefem (Failed)
	  6 - py_tutorial_stokesxfem (Failed)
	  7 - py_tutorial_fictdom (Failed)
	  8 - py_tutorial_fictdom_dg (Failed)
	  9 - pytests_xfes_ndof (Failed)
	 10 - pytests_apply (Failed)
	 11 - pytests_calc_linearized (Failed)
	 12 - pytests_cutint (Failed)
	 13 - pytests_straightcutrule (Failed)
	 14 - pytests_backupcutrule (Failed)
	 15 - pytests_intcurved (Failed)
	 16 - pytests_nxfem (Failed)
	 17 - pytests_shifteval (Failed)
	 18 - pytests_quadchallenges (Failed)
	 19 - pytests_num_nxfem (Failed)
	 20 - pytests_spacetimecutrule (Failed)
	 21 - pytests_spacetime_vtk (Failed)
	 22 - pytests_navier_stokes (Failed)
	 23 - pytests_mlset_module (Failed)
	 24 - pytests_mlset_integrate (Failed)
	 25 - pytests_mlset_pde (Failed)
Errors while running CTest
make: *** [Makefile:107: test] Error 8

~/ngx/ngsxfem/build$ make test
Running tests…
Test project /home/kaipeng/ngx/ngsxfem/build
Start 1: cpu_usage
1/25 Test #1: cpu_usage … Passed 0.17 sec
Start 2: py_tutorial_nxfem_lo
2/25 Test #2: py_tutorial_nxfem_lo …***Failed 0.39 sec
Start 3: py_tutorial_cutfem_lo
3/25 Test #3: py_tutorial_cutfem_lo …***Failed 0.35 sec
Start 4: py_tutorial_nxfem_ho
4/25 Test #4: py_tutorial_nxfem_ho …***Failed 0.34 sec
Start 5: py_tutorial_tracefem
5/25 Test #5: py_tutorial_tracefem …***Failed 0.34 sec
Start 6: py_tutorial_stokesxfem
6/25 Test #6: py_tutorial_stokesxfem …***Failed 0.34 sec
Start 7: py_tutorial_fictdom
7/25 Test #7: py_tutorial_fictdom …***Failed 0.33 sec
Start 8: py_tutorial_fictdom_dg
8/25 Test #8: py_tutorial_fictdom_dg …***Failed 0.34 sec
Start 9: pytests_xfes_ndof
9/25 Test #9: pytests_xfes_ndof …***Failed 0.02 sec
Start 10: pytests_apply
10/25 Test #10: pytests_apply …***Failed 0.02 sec
Start 11: pytests_calc_linearized
11/25 Test #11: pytests_calc_linearized …***Failed 0.02 sec
Start 12: pytests_cutint
12/25 Test #12: pytests_cutint …***Failed 0.02 sec
Start 13: pytests_straightcutrule
13/25 Test #13: pytests_straightcutrule …***Failed 0.02 sec
Start 14: pytests_backupcutrule
14/25 Test #14: pytests_backupcutrule …***Failed 0.02 sec
Start 15: pytests_intcurved
15/25 Test #15: pytests_intcurved …***Failed 0.02 sec
Start 16: pytests_nxfem
16/25 Test #16: pytests_nxfem …***Failed 0.02 sec
Start 17: pytests_shifteval
17/25 Test #17: pytests_shifteval …***Failed 0.02 sec
Start 18: pytests_quadchallenges
18/25 Test #18: pytests_quadchallenges …***Failed 0.02 sec
Start 19: pytests_num_nxfem
19/25 Test #19: pytests_num_nxfem …***Failed 0.02 sec
Start 20: pytests_spacetimecutrule
20/25 Test #20: pytests_spacetimecutrule …***Failed 0.02 sec
Start 21: pytests_spacetime_vtk
21/25 Test #21: pytests_spacetime_vtk …***Failed 0.02 sec
Start 22: pytests_navier_stokes
22/25 Test #22: pytests_navier_stokes …***Failed 0.02 sec
Start 23: pytests_mlset_module
23/25 Test #23: pytests_mlset_module …***Failed 0.02 sec
Start 24: pytests_mlset_integrate
24/25 Test #24: pytests_mlset_integrate …***Failed 0.02 sec
Start 25: pytests_mlset_pde
25/25 Test #25: pytests_mlset_pde …***Failed 0.02 sec

4% tests passed, 24 tests failed out of 25

Total Test time (real) = 2.95 sec

The following tests FAILED:
2 - py_tutorial_nxfem_lo (Failed)
3 - py_tutorial_cutfem_lo (Failed)
4 - py_tutorial_nxfem_ho (Failed)
5 - py_tutorial_tracefem (Failed)
6 - py_tutorial_stokesxfem (Failed)
7 - py_tutorial_fictdom (Failed)
8 - py_tutorial_fictdom_dg (Failed)
9 - pytests_xfes_ndof (Failed)
10 - pytests_apply (Failed)
11 - pytests_calc_linearized (Failed)
12 - pytests_cutint (Failed)
13 - pytests_straightcutrule (Failed)
14 - pytests_backupcutrule (Failed)
15 - pytests_intcurved (Failed)
16 - pytests_nxfem (Failed)
17 - pytests_shifteval (Failed)
18 - pytests_quadchallenges (Failed)
19 - pytests_num_nxfem (Failed)
20 - pytests_spacetimecutrule (Failed)
21 - pytests_spacetime_vtk (Failed)
22 - pytests_navier_stokes (Failed)
23 - pytests_mlset_module (Failed)
24 - pytests_mlset_integrate (Failed)
25 - pytests_mlset_pde (Failed)
Errors while running CTest
make: *** [Makefile:107: test] Error 8

~/ngx/ngsxfem/build$ make test
Running tests…
Test project /home/kaipeng/ngx/ngsxfem/build
Start 1: cpu_usage
1/25 Test #1: cpu_usage … Passed 0.17 sec
Start 2: py_tutorial_nxfem_lo
2/25 Test #2: py_tutorial_nxfem_lo …***Failed 0.39 sec
Start 3: py_tutorial_cutfem_lo
3/25 Test #3: py_tutorial_cutfem_lo …***Failed 0.35 sec
Start 4: py_tutorial_nxfem_ho
4/25 Test #4: py_tutorial_nxfem_ho …***Failed 0.34 sec
Start 5: py_tutorial_tracefem
5/25 Test #5: py_tutorial_tracefem …***Failed 0.34 sec
Start 6: py_tutorial_stokesxfem
6/25 Test #6: py_tutorial_stokesxfem …***Failed 0.34 sec
Start 7: py_tutorial_fictdom
7/25 Test #7: py_tutorial_fictdom …***Failed 0.33 sec
Start 8: py_tutorial_fictdom_dg
8/25 Test #8: py_tutorial_fictdom_dg …***Failed 0.34 sec
Start 9: pytests_xfes_ndof
9/25 Test #9: pytests_xfes_ndof …***Failed 0.02 sec
Start 10: pytests_apply
10/25 Test #10: pytests_apply …***Failed 0.02 sec
Start 11: pytests_calc_linearized
11/25 Test #11: pytests_calc_linearized …***Failed 0.02 sec
Start 12: pytests_cutint
12/25 Test #12: pytests_cutint …***Failed 0.02 sec
Start 13: pytests_straightcutrule
13/25 Test #13: pytests_straightcutrule …***Failed 0.02 sec
Start 14: pytests_backupcutrule
14/25 Test #14: pytests_backupcutrule …***Failed 0.02 sec
Start 15: pytests_intcurved
15/25 Test #15: pytests_intcurved …***Failed 0.02 sec
Start 16: pytests_nxfem
16/25 Test #16: pytests_nxfem …***Failed 0.02 sec
Start 17: pytests_shifteval
17/25 Test #17: pytests_shifteval …***Failed 0.02 sec
Start 18: pytests_quadchallenges
18/25 Test #18: pytests_quadchallenges …***Failed 0.02 sec
Start 19: pytests_num_nxfem
19/25 Test #19: pytests_num_nxfem …***Failed 0.02 sec
Start 20: pytests_spacetimecutrule
20/25 Test #20: pytests_spacetimecutrule …***Failed 0.02 sec
Start 21: pytests_spacetime_vtk
21/25 Test #21: pytests_spacetime_vtk …***Failed 0.02 sec
Start 22: pytests_navier_stokes
22/25 Test #22: pytests_navier_stokes …***Failed 0.02 sec
Start 23: pytests_mlset_module
23/25 Test #23: pytests_mlset_module …***Failed 0.02 sec
Start 24: pytests_mlset_integrate
24/25 Test #24: pytests_mlset_integrate …***Failed 0.02 sec
Start 25: pytests_mlset_pde
25/25 Test #25: pytests_mlset_pde …***Failed 0.02 sec

4% tests passed, 24 tests failed out of 25

Total Test time (real) = 2.95 sec

The following tests FAILED:
2 - py_tutorial_nxfem_lo (Failed)
3 - py_tutorial_cutfem_lo (Failed)
4 - py_tutorial_nxfem_ho (Failed)
5 - py_tutorial_tracefem (Failed)
6 - py_tutorial_stokesxfem (Failed)
7 - py_tutorial_fictdom (Failed)
8 - py_tutorial_fictdom_dg (Failed)
9 - pytests_xfes_ndof (Failed)
10 - pytests_apply (Failed)
11 - pytests_calc_linearized (Failed)
12 - pytests_cutint (Failed)
13 - pytests_straightcutrule (Failed)
14 - pytests_backupcutrule (Failed)
15 - pytests_intcurved (Failed)
16 - pytests_nxfem (Failed)
17 - pytests_shifteval (Failed)
18 - pytests_quadchallenges (Failed)
19 - pytests_num_nxfem (Failed)
20 - pytests_spacetimecutrule (Failed)
21 - pytests_spacetime_vtk (Failed)
22 - pytests_navier_stokes (Failed)
23 - pytests_mlset_module (Failed)
24 - pytests_mlset_integrate (Failed)
25 - pytests_mlset_pde (Failed)
Errors while running CTest
make: *** [Makefile:107: test] Error 8

~/ngx/ngsxfem/build$ make test
Running tests…
Test project /home/kaipeng/ngx/ngsxfem/build
Start 1: cpu_usage
1/25 Test #1: cpu_usage … Passed 0.17 sec
Start 2: py_tutorial_nxfem_lo
2/25 Test #2: py_tutorial_nxfem_lo …***Failed 0.39 sec
Start 3: py_tutorial_cutfem_lo
3/25 Test #3: py_tutorial_cutfem_lo …***Failed 0.35 sec
Start 4: py_tutorial_nxfem_ho
4/25 Test #4: py_tutorial_nxfem_ho …***Failed 0.34 sec
Start 5: py_tutorial_tracefem
5/25 Test #5: py_tutorial_tracefem …***Failed 0.34 sec
Start 6: py_tutorial_stokesxfem
6/25 Test #6: py_tutorial_stokesxfem …***Failed 0.34 sec
Start 7: py_tutorial_fictdom
7/25 Test #7: py_tutorial_fictdom …***Failed 0.33 sec
Start 8: py_tutorial_fictdom_dg
8/25 Test #8: py_tutorial_fictdom_dg …***Failed 0.34 sec
Start 9: pytests_xfes_ndof
9/25 Test #9: pytests_xfes_ndof …***Failed 0.02 sec
Start 10: pytests_apply
10/25 Test #10: pytests_apply …***Failed 0.02 sec
Start 11: pytests_calc_linearized
11/25 Test #11: pytests_calc_linearized …***Failed 0.02 sec
Start 12: pytests_cutint
12/25 Test #12: pytests_cutint …***Failed 0.02 sec
Start 13: pytests_straightcutrule
13/25 Test #13: pytests_straightcutrule …***Failed 0.02 sec
Start 14: pytests_backupcutrule
14/25 Test #14: pytests_backupcutrule …***Failed 0.02 sec
Start 15: pytests_intcurved
15/25 Test #15: pytests_intcurved …***Failed 0.02 sec
Start 16: pytests_nxfem
16/25 Test #16: pytests_nxfem …***Failed 0.02 sec
Start 17: pytests_shifteval
17/25 Test #17: pytests_shifteval …***Failed 0.02 sec
Start 18: pytests_quadchallenges
18/25 Test #18: pytests_quadchallenges …***Failed 0.02 sec
Start 19: pytests_num_nxfem
19/25 Test #19: pytests_num_nxfem …***Failed 0.02 sec
Start 20: pytests_spacetimecutrule
20/25 Test #20: pytests_spacetimecutrule …***Failed 0.02 sec
Start 21: pytests_spacetime_vtk
21/25 Test #21: pytests_spacetime_vtk …***Failed 0.02 sec
Start 22: pytests_navier_stokes
22/25 Test #22: pytests_navier_stokes …***Failed 0.02 sec
Start 23: pytests_mlset_module
23/25 Test #23: pytests_mlset_module …***Failed 0.02 sec
Start 24: pytests_mlset_integrate
24/25 Test #24: pytests_mlset_integrate …***Failed 0.02 sec
Start 25: pytests_mlset_pde
25/25 Test #25: pytests_mlset_pde …***Failed 0.02 sec

4% tests passed, 24 tests failed out of 25

Total Test time (real) = 2.95 sec

The following tests FAILED:
2 - py_tutorial_nxfem_lo (Failed)
3 - py_tutorial_cutfem_lo (Failed)
4 - py_tutorial_nxfem_ho (Failed)
5 - py_tutorial_tracefem (Failed)
6 - py_tutorial_stokesxfem (Failed)
7 - py_tutorial_fictdom (Failed)
8 - py_tutorial_fictdom_dg (Failed)
9 - pytests_xfes_ndof (Failed)
10 - pytests_apply (Failed)
11 - pytests_calc_linearized (Failed)
12 - pytests_cutint (Failed)
13 - pytests_straightcutrule (Failed)
14 - pytests_backupcutrule (Failed)
15 - pytests_intcurved (Failed)
16 - pytests_nxfem (Failed)
17 - pytests_shifteval (Failed)
18 - pytests_quadchallenges (Failed)
19 - pytests_num_nxfem (Failed)
20 - pytests_spacetimecutrule (Failed)
21 - pytests_spacetime_vtk (Failed)
22 - pytests_navier_stokes (Failed)
23 - pytests_mlset_module (Failed)
24 - pytests_mlset_integrate (Failed)
25 - pytests_mlset_pde (Failed)
Errors while running CTest
make: *** [Makefile:107: test] Error 8

Dear kaipeng,

The INSTLOCATION is the target for the installation. Do you have a pre-installed ngsolve installation or are you building ngsolve with ngsxfem? In the first caseit is the most simple approach to use the same installation direction (although not necessary). If you take a different directory, make sure that libraries are found by setting the environment variables correctly.
Please write down the steps of your (failed) installation try from start to finish to give us an idea on what your configuration is like.

Best,
Christoph

I tried to reinstall ngsolve and ngsxfem today, and ran into a problem. After reinstalling the newest version of ngsolve, I got the following error when compiling ngsxfem:

error: conflicting return type specified for ‘virtual ngla::MatrixGraph ngcomp::RestrictedBilinearForm::GetGraph(int, bool)’
     virtual MatrixGraph GetGraph (int level, bool symmetric);

and

error:   overriding ‘virtual ngla::MatrixGraph* ngcomp::BilinearForm::GetGraph(int, bool)’
     virtual MatrixGraph * GetGraph (int level, bool symmetric);

I see that the file containing this function is changed in the latest release (from August 7th). Is this a bug?

I am currently installing the version of ngsxfem from April along with the corresponding ngsolve version, but it would be nice to use a newer version.