Thanks, adding the quotes around those statements did the trick. 

Unfortunately, I have to add the DOLFIN_SKIP_BUILD_TESTS=On in CONFOPTS because 
otherwise the configuration gets stuck at 

— Found petscconf.h

Nothing happens then; it just hangs…..for hour upon hours.

I also removed/commented out the if test and instead simply set(PETSC4PY_FOUND 
TRUE). As I know I have the right versions.

Imran

13. mai 2014 kl. 07:51 skrev Johannes Ring <[email protected]>:

> On Tue, May 13, 2014 at 7:44 AM, Johannes Ring <[email protected]> wrote:
>> On Mon, May 12, 2014 at 3:27 PM, Imran Ali
>> <[email protected]> wrote:
>>> I checked the file CMakeList.txt at the line the build was crashing, and the
>>> following is there :
>>> 
>>> # Check for PETSc, SLEPc, TAO and petsc4py
>>> if (DOLFIN_ENABLE_PETSC)
>>>  find_package(PETSc 3.2)
>>>  if (PETSC_FOUND AND DOLFIN_ENABLE_SLEPC)
>>>    find_package(SLEPc 3.2)
>>>  endif()
>>>  if (PETSC_FOUND AND DOLFIN_ENABLE_TAO)
>>>    find_package(TAO)
>>>  endif()
>>>  if (PETSC_FOUND AND PYTHON_FOUND AND DOLFIN_ENABLE_PETSC4PY)
>>>    find_package(PETSc4py)
>>>    if (PETSC4PY_FOUND)
>>>      #line 335 : The if test below where the build crashes
>> 
>> Try changing these two lines:
>> 
>>>      if (NOT (${PETSC4PY_VERSION_MAJOR} EQUAL ${PETSC_VERSION_MAJOR}
>>>               AND ${PETSC4PY_VERSION_MINOR} EQUAL ${PETSC_VERSION_MINOR}))
>> 
>> into this:
>> 
>>      if (NOT ("${PETSC4PY_VERSION_MAJOR}" EQUAL "${PETSC_VERSION_MAJOR}"
>>               AND "${PETSC4PY_VERSION_MINOR}" EQUAL 
>> "${PETSC_VERSION_MINOR}"))
>> 
>> That is, add quotes around the version numbers.
>> 
>> Johannes
> 
> BTW, the problem is likely caused by the fact that you run with
> DOLFIN_SKIP_BUILD_TESTS=ON, which will set PETSC_VERSION to "UNKNOWN".
> This is a similar bug as reported here:
> 
> https://bitbucket.org/fenics-project/dolfin/issue/253/scotch-v6-not-properly-detected-by-cmake
> 
> Johannes
> 
>>>        message(WARNING "PETSc version ${PETSC_VERSION} and petsc4py version
>>> ${PETSC4PY_VERSION} do not match.  Disabling petsc4py support")
>>>        set(PETSC4PY_FOUND FALSE)
>>>      endif()
>>>    endif()
>>>  endif()
>>> endif()
>>> 
>>> I checked my versions for petsc4py and petsc and they are respectively :
>>> 
>>> 3.4 and 3.4.4.
>>> 
>>> The error states :
>>> 
>>> 
>>> CMake Error at CMakeLists.txt:335 (if):
>>>  if given arguments:
>>> 
>>>    "NOT" "(" "3" "EQUAL" "AND" "4" "EQUAL" ")"
>>> 
>>>  Unknown arguments specified
>>> 
>>> 
>>> -- Configuring incomplete, errors occurred!
>>> 
>>> I can not make sense of this. Any one mind decrypting this for me ?
>>> 
>>> Imran
>>> 
>>> 
>>> On 2014-05-12 14:26, Imran Ali wrote:
>>>> 
>>>> An update on this error :
>>>> 
>>>> I deleted the whole Work folder and tried to reinstall all packages
>>>> using the rhel6 platform, with following packages (with versions if
>>>> different then those set by default) :
>>>> 
>>>> PACKAGES=(
>>>> bzip2
>>>> git # 1.9.0
>>>> python # 2.7.6
>>>> openmpi # 1.8.1
>>>> boost # 1_55_0
>>>> cmake # 2.8.12.2
>>>> swig # 3.0.0
>>>> # libxml2 # 2.9.1 -> crashed /usr/bin/ld: cannot find -lpython2.7
>>>> pcre # 8.35
>>>> libffi # 3.0.13
>>>> glib2 # 2.40.0
>>>> vtk
>>>> gmp # 6.0.0
>>>> mpfr
>>>> cgal # 4.4
>>>> ply
>>>> blas
>>>> eigen
>>>> lapack # 3.5.0
>>>> ipython # 1.2.1
>>>> numpy # 1.8.1
>>>> cython # 0.20.1
>>>> mpi4py # 1.3.1
>>>> hdf5 # 1.8.12
>>>> h5py # 2.3.0
>>>> parmetis # 4.0.3
>>>> scientificpython
>>>> scipy # 0.14
>>>> scotch
>>>> petsc # 3.4.4
>>>> #trilinos #-> crashes can not find umfpack
>>>> petsc4py
>>>> skip:petsc # otherwise slepc install crashes
>>>> slepc # 3.4.4
>>>> fiat
>>>> ferari
>>>> ufc
>>>> ufl
>>>> ffc
>>>> instant
>>>> dolfin
>>>> )
>>>> 
>>>> I get the exact same error when the dolfin package is building.
>>>> 
>>>> Imran
>>>> 
>>>> 11. mai 2014 kl. 12:52 skrev Imran Ali <[email protected]>:
>>>> 
>>>>> I am trying to install dolfin using dorsal (with
>>>>> DOLFIN_SKIP_BUILD_TESTS:BOOL=ON) and get the following error :
>>>>> 
>>>>> ¨Fetching dolfin-1.3.0
>>>>> Verifying dolfin-1.3.0
>>>>> dolfin-1.3.0.tar.gz: OK
>>>>> Unpacking dolfin-1.3.0
>>>>> Building dolfin-1.3.0
>>>>> patching file demo/undocumented/plot-qt/cpp/CMakeLists.txt
>>>>> Reversed (or previously applied) patch detected!  Skipping patch.
>>>>> 1 out of 1 hunk ignored -- saving rejects to file
>>>>> demo/undocumented/plot-qt/cpp/CMakeLists.txt.rej
>>>>> patching file dolfin/CMakeLists.txt
>>>>> Reversed (or previously applied) patch detected!  Skipping patch.
>>>>> 2 out of 2 hunks ignored -- saving rejects to file
>>>>> dolfin/CMakeLists.txt.rej
>>>>> fatal: Not a git repository (or any parent up to mount point
>>>>> /mn/anatu/studenter-u1)
>>>>> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not
>>>>> set).
>>>>> -- Performing Test HAVE_PIPE
>>>>> -- Performing Test HAVE_PIPE - Success
>>>>> -- Performing Test HAVE_PEDANTIC
>>>>> -- Performing Test HAVE_PEDANTIC - Success
>>>>> -- Performing Test HAVE_STD
>>>>> -- Performing Test HAVE_STD - Success
>>>>> -- Performing Test HAVE_DEBUG
>>>>> -- Performing Test HAVE_DEBUG - Success
>>>>> -- Performing Test HAVE_O2_OPTIMISATION
>>>>> -- Performing Test HAVE_O2_OPTIMISATION - Success
>>>>> -- Found MPI_C: /mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi.so
>>>>> -- Found MPI_CXX:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi_cxx.so;/mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi.so
>>>>> -- Found MPI_Fortran:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi_usempi.so;/mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi_mpifh.so;/mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libmpi.so
>>>>> -- Try OpenMP C flag = [-fopenmp]
>>>>> -- Performing Test OpenMP_FLAG_DETECTED
>>>>> -- Performing Test OpenMP_FLAG_DETECTED - Success
>>>>> -- Try OpenMP CXX flag = [-fopenmp]
>>>>> -- Performing Test OpenMP_FLAG_DETECTED
>>>>> -- Performing Test OpenMP_FLAG_DETECTED - Success
>>>>> -- Found OpenMP: -fopenmp
>>>>> -- Performing Test OPENMP_UINT_TEST_RUNS
>>>>> -- Performing Test OPENMP_UINT_TEST_RUNS - Success
>>>>> -- Boost version: 1.55.0
>>>>> -- Found the following Boost libraries:
>>>>> --   filesystem
>>>>> --   program_options
>>>>> --   system
>>>>> --   thread
>>>>> --   iostreams
>>>>> --   mpi
>>>>> --   serialization
>>>>> --   timer
>>>>> --   chrono
>>>>> -- UFC version: 2.3.0
>>>>> -- Found Eigen3:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/include/eigen3 (Required is at
>>>>> least version "3.0.0")
>>>>> -- Found LibXml2: /usr/lib64/libxml2.so (found version "2.7.6")
>>>>> -- Found PythonInterp:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/bin/python (found suitable
>>>>> version "2.7.6", minimum required is "2")
>>>>> -- NumPy header version 1.8.1 found
>>>>> -- Found SWIG: /mn/anatu/studenter-u1/imranal/Work/FEniCS/bin/swig (found
>>>>> version "3.0.0")
>>>>> -- Checking for package 'PETSc'
>>>>> -- PETSC_DIR is /mn/anatu/studenter-u1/imranal/Work/FEniCS
>>>>> -- PETSC_ARCH is empty
>>>>> -- Found petscconf.h
>>>>> -- Found PETSc:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libpetsc.so (Required is at
>>>>> least version "3.2")
>>>>> -- Checking for package 'SLEPc'
>>>>> -- SLEPC_DIR is /mn/anatu/studenter-u1/imranal/Work/FEniCS
>>>>> -- Found SLEPc:
>>>>> /mn/anatu/studenter-u1/imranal/Work/FEniCS/lib/libslepc.so (Required is at
>>>>> least version "3.2")
>>>>> -- Checking for package 'TAO'
>>>>> -- TAO_DIR is TAO_DIR-NOTFOUND
>>>>> -- TAO could not be found. Be sure to set TAO_DIR, PETSC_DIR, and
>>>>> PETSC_ARCH. (missing:  TAO_LIBRARIES TAO_DIR TAO_INCLUDE_DIRS)
>>>>> -- Checking for package 'PETSc4Py'
>>>>> -- petsc4py version 3.4 found
>>>>> CMake Error at CMakeLists.txt:335 (if):
>>>>> if given arguments:
>>>>> 
>>>>>   "NOT" "(" "3" "EQUAL" "AND" "4" "EQUAL" ")"
>>>>> 
>>>>> Unknown arguments specified
>>>>> 
>>>>> 
>>>>> -- Configuring incomplete, errors occurred!
>>>>> See also
>>>>> "/mn/anatu/studenter-u1/imranal/Work/FEniCS/src/dolfin-1.3.0/dorsal_build_dir/CMakeFiles/CMakeOutput.log".
>>>>> Failure with exit status: 1
>>>>> Exit message: There was a problem configuring dolfin-1.3.0.
>>>>> 
>>>>> 
>>>>> I have attached my CMakeOutput.log.
>>>>> 
>>>>> I had managed to successfully build dolfin. However, I encountered an
>>>>> error when importing dolfin (ImportError: No module named common).
>>>>> Apparently dolfin was installed in Work/lib64/python2.6/site-packages and
>>>>> not Work/lib/python2.7/site-packages . So deleted Work/lib64/python2.6 and
>>>>> reinstalled all fenics packages. And now this error occurs.
>>>>> 
>>>>> Imran
>>>>> 
>>>>> Imran
>>>>> <CMakeOutput.log>_______________________________________________
>>>>> fenics-support mailing list
>>>>> [email protected]
>>>>> http://fenicsproject.org/mailman/listinfo/fenics-support
>>>> 
>>>> 
>>>> _______________________________________________
>>>> fenics-support mailing list
>>>> [email protected]
>>>> http://fenicsproject.org/mailman/listinfo/fenics-support
>>> 
>>> _______________________________________________
>>> fenics-support mailing list
>>> [email protected]
>>> http://fenicsproject.org/mailman/listinfo/fenics-support

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to