CompiledSubDomain Error


273
views
0
7 months ago by
Saro  
Hello,

  I tried running these commands:
from fenics import *
left = CompiledSubDomain('near(x[0],0.0)')


but what I got was this:

--- Instant: compiling ---
In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/home/saro/.cache/instant/python2.7/error/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/compile.log'


  The log file says the following:

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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/python2 (found version "2.7.12") 
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'craypetsc_real;PETSc'
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of PetscInt
-- Check size of PetscInt - done
-- Checking for one of the modules 'crayslepc_real;SLEPc'
-- Found SWIG: /usr/bin/swig (found version "3.0.8") 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    DEBUG

...[Some details excluded due to post size limit.]...

cd /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/DependInfo.cmake --color=
Dependee "/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/DependInfo.cmake" is newer than depender "/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/depend.internal".
Dependee "/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/depend.internal".
Scanning dependencies of target _dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4
make[2]: Leaving directory '/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4'
make -f CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/build.make CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/build
make[2]: Entering directory '/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4'
[ 66%] Building CXX object CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx.o
/usr/bin/c++   -DDOLFIN_LA_INDEX_SIZE=4 -DDOLFIN_SIZE_T=8 -DDOLFIN_VERSION=\"2017.1.0\" -DHAS_CHOLMOD -DHAS_HDF5 -DHAS_MPI -DHAS_OPENMP -DHAS_PETSC -DHAS_PETSC4PY -DHAS_SCOTCH -DHAS_SLEPC -DHAS_SLEPC4PY -DHAS_UMFPACK -DHAS_VTK -DHAS_ZLIB -DNDEBUG -DNPY_NO_DEPRECATED_API=NPY_1_11_API_VERSION -DNUMPY_VERSION_MAJOR=1 -DNUMPY_VERSION_MICRO=0 -DNUMPY_VERSION_MINOR=11 -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4_EXPORTS -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -isystem /usr/include/vtk-6.2 -isystem /usr/include/x86_64-linux-gnu -I/usr/include/hdf5/serial -I/usr/include/jsoncpp -I/usr/include/tcl -isystem /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -isystem /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -isystem /usr/lib/openmpi/include -isystem /usr/lib/openmpi/include/openmpi -isystem /usr/include/freetype2 -isystem /usr/include/x86_64-linux-gnu/freetype2 -I/usr/include/python2.7 -I/usr/include/libxml2 -isystem /usr/include/suitesparse -isystem /usr/include/scotch -isystem /usr/include/eigen3 -isystem /usr/include/hdf5/openmpi -I/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/. -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/lib/python2.7/dist-packages/petsc4py/include -I/usr/lib/python2.7/dist-packages/slepc4py/include -I/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4 -isystem /usr/lib/slepcdir/3.7.2/x86_64-linux-gnu-real/include -isystem /usr/lib/petscdir/3.7.3/x86_64-linux-gnu-real/include  -fpermissive    -fopenmp -O2 -fPIC   -std=c++11 -o CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx.o -c /tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx
/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx:3293:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/build.make:70: recipe for target 'CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx.o' failed
make[2]: *** [CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4PYTHON_wrap.cxx.o] Error 1
make[2]: Leaving directory '/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/all' failed
make[1]: *** [CMakeFiles/_dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4.dir/all] Error 2
make[1]: Leaving directory '/tmp/tmpgvBvHO2018-1-8-15-36_instant_5d0ba354b9edb01cf933748d8b18619da3734db2/dolfin_9c2f22a2aae9514a6f603201d3987ea8615fccb4'
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2


  Any thoughts as to how to make a CompiledSubDomain?

Community: FEniCS Project

1 Answer


0
7 months ago by
You do not have mesh, JIT will not have access to the coordinates: use this
from fenics import *
mesh = UnitSquareMesh(10,10)
left = CompiledSubDomain('near(x[0],0)')​
Please login to add an answer/comment or follow this question.

Similar posts:
Search »