Problem When Compile With OpenMPI+Hypre

Discussion about building and installing Elmer
Post Reply
dehavilland
Posts: 1
Joined: 02 Sep 2011, 07:07
Antispam: Yes

Problem When Compile With OpenMPI+Hypre

Post by dehavilland »

Hi!

I am trying to compile elmer on openSUSE 11.4 with gcc 4.6 OpenMPI 1.5.4 and Hypre 2.7.0b. But there are some problem

/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: /usr/local/hypre/lib/libHYPRE.a(HYPRE_IJMatrix.o): relocation R_X86_64_32 against `ompi_mpi_int' can not be used when making a shared object; recompile with -fPIC

/usr/local/hypre/lib/libHYPRE.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[3]: *** [libelmersolver.so] Error 1

Here is my INSTALL.sh file. All the environment variables are set in .bashrc and /etc/profile.

export CC="mpicc -fPIC"
export CXX="mpicxx"
export FC="mpif90"
export F77="mpif90"

export CFLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export CXXFLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export FCFLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export F90FLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export F77FLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export FFLAGS="-O3 -march=x86-64 -ftree-vectorize -funroll-loops -ffast-math"
export CPPFLAGS="-I$HYPRE/include"

modules="matc umfpack mathlibs meshgen2d eio hutiter fem elmergrid post"

#ENVIRONMENT VARIABLES SET IN .bashrc AND /etc/profile
# $HYPRE=/usr/local/hypre
# $ELMER_HOME=/home/username/elmer
# $MPI_HOME=/usr/local/openmpi

for m in $modules; do
cd $m
./configure --prefix=$ELMER_HOME --with-mpi=yes --with-mpi-dir=$MPI_HOME --with-64bits=yes --with-hypre="-L$HYPRE/lib -lHYPRE" && make -j2 && make install
cd ..
done
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: Problem When Compile With OpenMPI+Hypre

Post by hazelsct »

Hello, I think you need a shared version of hypre. The Debian/Ubuntu hypre package has one, but it sounds like that doesn't help you...
Post Reply