installing fenics on redhat5 platform (CentOS)

Asked by Payman Tohidifar

Hi,
I'm trying to install fenics locally on a cluster which runs on rhel5 CentOS platform. I ran dorsal-1.1.0 using rhel5.platform from contributed directory and added some other packages to install as for prerequisites . Since I can only install packages locally, I ran into several problems with some of the packages like gmp, mpfr, CGAL and trilinos, but eventually figured them out and installed them, but when I was building dolfin as the last package, I got the following error. Can anyone help me out since I have no idea what this error implys?! I would really appreciate it.

  [ 89%] Building CXX object dolfin/CMakeFiles/dolfin.dir/plot/VTKPlottableMesh.cpp.o
[ 89%] Building CXX object dolfin/CMakeFiles/dolfin.dir/plot/VTKPlottableMeshFunction.cpp.o
[ 91%] Building CXX object dolfin/CMakeFiles/dolfin.dir/plot/VTKPlotter.cpp.o
/mnt/people/tohidif2/Work/FEniCS/src/dolfin-1.1.0/dolfin/plot/VTKPlotter.cpp: In function 'void<unnamed>::round_significant_digits(double&, double (*)(double), int)':
/mnt/people/tohidif2/Work/FEniCS/src/dolfin-1.1.0/dolfin/plot/VTKPlotter.cpp:79: warning: converting to 'int' from 'double'
[ 91%] Building CXX object dolfin/CMakeFiles/dolfin.dir/plot/VTKWindowOutputStage.cpp.o
[ 91%] Building CXX object dolfin/CMakeFiles/dolfin.dir/plot/plot.cpp.o
[ 92%] Building CXX object dolfin/CMakeFiles/dolfin.dir/quadrature/BarycenterQuadrature.cpp.o
[ 92%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/BisectionRefinement.cpp.o
[ 92%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/LocalMeshCoarsening.cpp.o
[ 93%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/LocalMeshRefinement.cpp.o
[ 93%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/RegularCutRefinement.cpp.o
[ 93%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/RivaraRefinement.cpp.o
[ 94%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/UniformMeshRefinement.cpp.o
[ 94%] Building CXX object dolfin/CMakeFiles/dolfin.dir/refinement/refine.cpp.o
Linking CXX shared library libdolfin.so
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmpfr.a(clear.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmpfr.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [dolfin/libdolfin.so.1.1.0] Error 1
make[2]: Leaving directory `/scs/people/tohidif2/Work/FEniCS/src/dolfin-1.1.0/dorsal_build_dir'
make[1]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2
make[1]: Leaving directory `/scs/people/tohidif2/Work/FEniCS/src/dolfin-1.1.0/dorsal_build_dir'
make: *** [all] Error 2
make: Leaving directory `/scs/people/tohidif2/Work/FEniCS/src/dolfin-1.1.0/dorsal_build_dir'
Failure with exit status: 2
Exit message: There was a problem building dolfin-1.1.0.

Question information

Language:
English Edit question
Status:
Answered
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

Try adding "mpfr" before "gmp" in your platform file. Make sure you remove dorsal_build_dir in the CGAL source directory before doing a rebuild.

Revision history for this message
Johannes Ring (johannr) said :
#2

Sorry, "mpfr" should be added _after_ "gmp". You might also need to add "--with-gmp=${GMP_DIR}" to the configure line in FEniCS/packages/mpfr.package.

Revision history for this message
Payman Tohidifar (payman-che) said :
#3

Thanks Johannes for your response. Actually I installed gmp-5.0.5, then
mpfr-2.2.0. Then I tried CGAL-4.1 which was in the cgal.package, but it
didn't work, So I installed CGAL-4.2 instead and it was built successfully,
then I tried to build dolfin-1.1.0 and again got the same error. By the
way, do I need to disable "shared" in mpfr configuration. Also, Do I need
to installed CGAL with QT3 or QT4, because sometimes I get configuration
error/warning that dolfin is missing QT3 or QT4.
Also I attached my platform file. Please let me know if I'm missing a
package. I appreciate your help in advance.

On Fri, Apr 26, 2013 at 5:16 AM, Johannes Ring <
<email address hidden>> wrote:

> Your question #227477 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/227477
>
> Johannes Ring proposed the following answer:
> Sorry, "mpfr" should be added _after_ "gmp". You might also need to add
> "--with-gmp=${GMP_DIR}" to the configure line in
> FEniCS/packages/mpfr.package.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/fenics/+question/227477/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/fenics/+question/227477
>
> You received this question notification because you asked the question.
>

Revision history for this message
Payman Tohidifar (payman-che) said :
#4

and here is the error associated with QT3-4

-- The following optional packages were found:
-- -------------------------------------------
-- (OK) OPENMP
-- (OK) MPI
-- (OK) PETSC
-- (OK) SLEPC
-- (OK) TRILINOS
-- (OK) UMFPACK
-- (OK) SCOTCH
-- (OK) PARMETIS
-- (OK) CGAL
-- (OK) ZLIB
-- (OK) PYTHON
-- (OK) VTK
--
-- The following optional packages could not be found:
-- ---------------------------------------------------
-- (**) CHOLMOD
-- (**) PASTIX
-- (**) SPHINX
-- (**) HDF5
-- (**) QT
--
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
QT_QTCORE_LIBRARY)
CMake Warning at demo/undocumented/plot-qt/cpp/CMakeLists.txt:67 (message):
  QT not found, or QT/VTK not enabled in DOLFIN. Not building demo_plot-qt

Disabling generation of documentation because Sphinx is missing.
-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring dolfin-1.1.0.

On Fri, Apr 26, 2013 at 10:51 AM, Payman Tohidifar <
<email address hidden>> wrote:

> Your question #227477 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/227477
>
> Status: Answered => Open
>
> You are still having a problem:
> Thanks Johannes for your response. Actually I installed gmp-5.0.5, then
> mpfr-2.2.0. Then I tried CGAL-4.1 which was in the cgal.package, but it
> didn't work, So I installed CGAL-4.2 instead and it was built successfully,
> then I tried to build dolfin-1.1.0 and again got the same error. By the
> way, do I need to disable "shared" in mpfr configuration. Also, Do I need
> to installed CGAL with QT3 or QT4, because sometimes I get configuration
> error/warning that dolfin is missing QT3 or QT4.
> Also I attached my platform file. Please let me know if I'm missing a
> package. I appreciate your help in advance.
>
>
> On Fri, Apr 26, 2013 at 5:16 AM, Johannes Ring <
> <email address hidden>> wrote:
>
> > Your question #227477 on FEniCS Project changed:
> > https://answers.launchpad.net/fenics/+question/227477
> >
> > Johannes Ring proposed the following answer:
> > Sorry, "mpfr" should be added _after_ "gmp". You might also need to add
> > "--with-gmp=${GMP_DIR}" to the configure line in
> > FEniCS/packages/mpfr.package.
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> >
> https://answers.launchpad.net/fenics/+question/227477/+confirm?answer_id=1
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/fenics/+question/227477
> >
> > You received this question notification because you asked the question.
> >
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Johannes Ring (johannr) said :
#5

No, don't disable shared when building mpfr. It is also not necessary to build CGAL with Qt.

The problem in your last post has been fixed in DOLFIN 1.2.0 and 1.1.1. If you for some reason need FEniCS 1.1.0, then you need to update Dorsal to build DOLFIN 1.1.1. This can be done by changing the version numbers in FEniCS/packages/dolfin-stable.package in Dorsal. However, it is recommended to use the latest stable releases, which is the 1.2.0 releases. It is also recommended to use the latest Dorsal from Bitbucket (https://bitbucket.org/fenics-project/dorsal).

Revision history for this message
Payman Tohidifar (payman-che) said :
#6

I tried to install the dolfin-1.2.0 with the newest version of dolfin. But,
I had a problem with installing dolfin. Actually cmake cannot find the
newest version of boost and and also can't import UFC. Would you please
help me fix the problem?

I also tried the devel version of dolfin, but got the same error.

-------------------------------------------------------------
# platform: RedHat rel5
# Default values for platform specific variables
default LAPACKANDBLAS_DIR=/usr/lib64
default PYTHONVER=2.6
default PETSC_ARCH=linux-gnu-cxx-opt
default GMP_ARCH=x86_64-linux-gnu
default SCOTCH_ARCH=pc_linux2

# Define the packages this platform needs
PACKAGES=(

#=========== preliminary devel versions
libxml2
lapack
blas
# subversion // file.package not available
zlib
# openssl // file.package not available
libffi
glib2
bzip2
# libXt // file.package not available
# libX11 // file.package not available
#======= others
python
bazaar
scon
numpy
boost
swig
openmpi
cmake
petsc
slepc
trilinos
armadillo
gmp
mtl
scotch
cgal
# vtkdata
# vtk
scientificpython
fiat
ferari
ufc
ufl
ffc
# viper
instant
dolfin
)

----------------------------------------
CMake Error at
/mnt/people/tohidif2/Work/FEniCS/share/cmake-2.8/Modules/FindBoost.cmake:1135
(message):
  Unable to find the requested Boost libraries.

  Boost version: 1.33.1

  Boost include path: /usr/include

  Detected version of Boost is too old. Requested version was 1.36 (or
  newer).
Call Stack (most recent call first):
  CMakeLists.txt:235 (find_package)

-- Boost version: 1.33.1
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- thread
-- iostreams
-- mpi
-- serialization
-- UFC version: 2.2.0
-- Checking for package 'Armadillo'
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- A library with BLAS API found.
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Performing Test ARMADILLO_TEST_RUNS
-- Performing Test ARMADILLO_TEST_RUNS - Success
-- Found Armadillo:
/mnt/people/tohidif2/Work/FEniCS/lib/libarmadillo.so;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;/usr/lib64/libblas.so
(Required is at least version "2.4.2")
-- Found LibXml2: /mnt/people/tohidif2/Work/FEniCS/lib/libxml2.so
-- Found PythonInterp: /mnt/people/tohidif2/Work/FEniCS/bin/python2.7
(Required is at least version "2")
-- Found PythonLibs:
/mnt/people/tohidif2/Work/FEniCS/lib/libpython2.7.so(Required is at
least version "2")
-- NumPy headers found
-- Found SWIG: /mnt/people/tohidif2/Work/FEniCS/bin/swig (found version
"2.0.3")
-- Checking for package 'PETSc'
-- PETSC_DIR is /mnt/people/tohidif2/Work/FEniCS
-- PETSC_ARCH is empty
-- Found petscconf.h
-- Performing test PETSC_TEST_RUNS - Success
-- Performing Test PETSC_CUSP_FOUND
-- Performing Test PETSC_CUSP_FOUND - Failed
-- PETSc configured without Cusp support
-- Found PETSc: /mnt/people/tohidif2/Work/FEniCS/lib/libpetsc.so (Required
is at least version "3.2")
-- Checking for package 'SLEPc'
-- SLEPC_DIR is /mnt/people/tohidif2/Work/FEniCS
-- Performing test SLEPC_TEST_RUNS - Success
-- Found SLEPc: /mnt/people/tohidif2/Work/FEniCS/lib/libslepc.so (Required
is at least version "3.2")
-- Performing Test PARMETIS_TEST_RUNS
-- Performing Test PARMETIS_TEST_RUNS - Success
-- Found ParMETIS:
/mnt/people/tohidif2/Work/FEniCS/lib/libparmetis.so;/mnt/people/tohidif2/Work/FEniCS/lib/libmetis.so
(Required is at least version "4.0.2")
-- Checking for package 'SCOTCH-PT'
-- Found SCOTCH (version 6.0.0)
-- Performing test SCOTCH_TEST_RUNS
-- Performing test SCOTCH_TEST_RUNS - Success
-- Found SCOTCH:
/mnt/people/tohidif2/Work/FEniCS/lib/libptscotch.a;/mnt/people/tohidif2/Work/FEniCS/lib/libscotch.a;/mnt/people/tohidif2/Work/FEniCS/lib/libptscotcherr.a
-- Checking for package 'AMD'
-- Checking for package 'UMFPACK'
-- Checking for package 'AMD'
-- Checking for package 'CHOLMOD'
-- Checking for package 'AMD'
-- A library with BLAS API found.
-- Performing Test UMFPACK_TEST_RUNS
-- Performing Test UMFPACK_TEST_RUNS - Success
-- Checking for package 'CHOLMOD'
-- Checking for package 'AMD'
-- A library with BLAS API found.
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
-- PASTIX_LIBRARIES
PASTIX_LIBRARY-NOTFOUND;/usr/lib64/librt.so;/usr/lib64/libm.so
-- A library with BLAS API found.
-- PaStiX could not be found. Be sure to set PASTIX_DIR. (missing:
 PASTIX_INCLUDE_DIRS PASTIX_TEST_RUNS PASTIX_VERSION PASTIX_VERSION_OK)
-- Checking for Trilinos
-- Trilinos version 11.0.3 found. Checking for components
-- Epetra found
-- Zoltan found
-- ML found
-- Ifpack found
-- Amesos found
-- All necessary Trilinos components found. Trilinos will be enabled.
-- Checking for package 'CGAL'
-- Performing Test CGAL_TEST_RUNS
-- Performing Test CGAL_TEST_RUNS - Success
-- Found CGAL:
/mnt/people/tohidif2/Work/FEniCS/lib/libCGAL.so;/mnt/people/tohidif2/Work/FEniCS/lib/libboost_thread.so;/mnt/people/tohidif2/Work/FEniCS/lib/libboost_system.so;/mnt/people/tohidif2/Work/FEniCS/lib/libgmp.so;/usr/lib64/libmpfr.a
(Required is at least version "4.1")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- checking for module 'cppunit'
-- package 'cppunit' not found
-- CPPUNIT could not be found. Be sure to set CPPUNIT_DIR. (missing:
 CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
-- Checking for package 'Sphinx'
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE SPHINX_VERSION_OK)
(Required is at least version "1.0.7")
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
QT_QTCORE_LIBRARY)
--
-- The following optional packages were found:
-- -------------------------------------------
-- (OK) OPENMP
-- (OK) MPI
-- (OK) PETSC
-- (OK) SLEPC
-- (OK) TRILINOS
-- (OK) UMFPACK
-- (OK) SCOTCH
-- (OK) PARMETIS
-- (OK) CGAL
-- (OK) ZLIB
-- (OK) PYTHON
--
-- The following optional packages were not be found:
-- --------------------------------------------------
-- (**) CHOLMOD
-- (**) PASTIX
-- (**) SPHINX
-- (**) HDF5
-- (**) VTK
-- (**) QT
--
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named ufc
CMake Warning at dolfin/CMakeLists.txt:297 (message):
  Unable to import UFC. Install latest UFC or check that PYTHONPATH is set
  appropriately. Python will be disabled.

-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
QT_QTCORE_LIBRARY)
-- VTK not found. Set the VTK_DIR cmake cache entry to the directory
containing VTKConfig.cmake. This is either the root of the build tree, or
PREFIX/lib/vtk for an installation. For VTK 4.0, this is the location of
UseVTK.cmake. This is either the root of the build tree or
PREFIX/include/vtk for an installation.
-- QT not found, or QT/VTK not enabled in DOLFIN. Not building demo_plot-qt
-- Disabling generation of documentation because Sphinx is missing.
-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring dolfin-1.2.0.

On Mon, Apr 29, 2013 at 9:06 AM, Johannes Ring <
<email address hidden>> wrote:

> Your question #227477 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/227477
>
> Status: Open => Answered
>
> Johannes Ring proposed the following answer:
> No, don't disable shared when building mpfr. It is also not necessary to
> build CGAL with Qt.
>
> The problem in your last post has been fixed in DOLFIN 1.2.0 and 1.1.1.
> If you for some reason need FEniCS 1.1.0, then you need to update Dorsal
> to build DOLFIN 1.1.1. This can be done by changing the version numbers
> in FEniCS/packages/dolfin-stable.package in Dorsal. However, it is
> recommended to use the latest stable releases, which is the 1.2.0
> releases. It is also recommended to use the latest Dorsal from Bitbucket
> (https://bitbucket.org/fenics-project/dorsal).
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/fenics/+question/227477/+confirm?answer_id=4
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/fenics/+question/227477
>
> You received this question notification because you asked the question.
>

Revision history for this message
Johannes Ring (johannr) said :
#7

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Questions about installation issues like this should go to <email address hidden>. Please join the mailing list before posting.

Can you help with this problem?

Provide an answer of your own, or ask Payman Tohidifar for more information if necessary.

To post a message you must log in.